Merge branch 'hjb' of git.kingsome.cn:server/game2006api into hjb
This commit is contained in:
commit
1025a621db
@ -533,6 +533,37 @@ class AAMarket(object):
|
||||
['!rows', [_common.RechargeHistory()], '数据'],
|
||||
]
|
||||
},
|
||||
{
|
||||
'method': 'POST',
|
||||
'name': '/api/vip/bind',
|
||||
'desc': '充值-历史',
|
||||
'group': '!AAMarket',
|
||||
'url': 'https://market-test.kingsome.cn/api/vip/bind',
|
||||
'is_json_params': True,
|
||||
'headers': _common.JcJwtHeader,
|
||||
'request_params': [
|
||||
],
|
||||
'params': [
|
||||
['passport_jwt', 0, 'passport_jwt'],
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
]
|
||||
},
|
||||
{
|
||||
'method': 'GET',
|
||||
'name': '/api/vip/info',
|
||||
'desc': '充值-历史',
|
||||
'group': '!AAMarket',
|
||||
'url': 'https://market-test.kingsome.cn/api/vip/info',
|
||||
'headers': _common.JcJwtHeader,
|
||||
'params': [
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['info', _common.VipInfo(), 'vip信息'],
|
||||
]
|
||||
},
|
||||
{
|
||||
'method': 'GET',
|
||||
'name': '/api/server_switch',
|
||||
|
@ -32,7 +32,7 @@ PassportJwtHeader = [
|
||||
]
|
||||
|
||||
JcJwtHeader = [
|
||||
'Authorization Bearer {JwtToken} 洪亮 jwt'
|
||||
'Authorization Bearer {JwtToken} 洪亮 jwt(小狐狸)'
|
||||
]
|
||||
|
||||
MaybeJwtHeader = [
|
||||
@ -1916,3 +1916,12 @@ class CecContributionActivity(object):
|
||||
['total_cec_pool', 0, 'cec总奖池'],
|
||||
['my_expected_cec', 0, '我预计可得cec'],
|
||||
]
|
||||
|
||||
|
||||
class VipInfo(object):
|
||||
|
||||
def __init__(self):
|
||||
self.fields = [
|
||||
['bind_passport_address', 0, '绑定的passport地址'],
|
||||
['bind_email', 0, '绑定的email地址'],
|
||||
]
|
||||
|
@ -406,4 +406,25 @@ CREATE TABLE `t_staking_cec` (
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `t_vip_bind`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `t_vip_bind`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `t_vip_bind` (
|
||||
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
||||
`account_address` varchar(60) NOT NULL DEFAULT '' COMMENT '钱包地址(小狐狸)',
|
||||
`passport_address` varchar(60) NOT NULL DEFAULT '' COMMENT '钱包地址(passport)',
|
||||
`email` varchar(80) COMMENT 'email',
|
||||
`lower_case_email` varchar(80) COMMENT 'lower_case_email',
|
||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||
PRIMARY KEY (`idx`),
|
||||
UNIQUE KEY `uk_account_addresss` (`account_address`),
|
||||
UNIQUE KEY `uk_passport_addresss` (`passport_address`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
-- Dump completed on 2015-08-19 18:51:22
|
||||
|
@ -139,12 +139,16 @@ class ChipPage extends BaseModel
|
||||
}
|
||||
}
|
||||
$item = [];
|
||||
$i = 0;
|
||||
foreach ($attrs as $k=>$v){
|
||||
$item['attr_' . $i] = $v;
|
||||
++$i;
|
||||
/*
|
||||
if (!isset($item[$v['attr_id']])){
|
||||
$item[$v['attr_id']] = $v;
|
||||
}else{
|
||||
$item[$v['attr_id']]['val']+= $v['val'];
|
||||
}
|
||||
}*/
|
||||
}
|
||||
return $item;
|
||||
}
|
||||
@ -204,4 +208,4 @@ class ChipPage extends BaseModel
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -461,7 +461,7 @@ class Hero extends BaseModel {
|
||||
}
|
||||
|
||||
public static function abilityInfoAddition($baseAbility, $row){
|
||||
$attr = array();
|
||||
$attr = emptyReplace(json_decode($row['rand_attr'], true), array());
|
||||
$chipPageDb = ChipPage::find($row['idx']);
|
||||
if ($row['quality'] > 1 && $chipPageDb) {
|
||||
$data = emptyReplace(json_decode($chipPageDb['data'], true), array());
|
||||
@ -469,6 +469,8 @@ class Hero extends BaseModel {
|
||||
$chipDb = Chip::find($value['chip_id']);
|
||||
if (!empty($chipDb)) {
|
||||
self::mergeAttr($attr, emptyReplace(json_decode($chipDb['rand_attr'], true), array()));
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -551,7 +553,7 @@ class Hero extends BaseModel {
|
||||
{
|
||||
$pAttackAm = 0;
|
||||
$pAttackAm_Add = mt\AttrHelper::getAttrVal($attr, kHAT_pAttackAm, 0);
|
||||
$pAttackAm += $pAttackAm;
|
||||
$pAttackAm += $pAttackAm_Add;
|
||||
|
||||
$pAttackRateSe = 0;
|
||||
$pAttackRateSe_Add = mt\AttrHelper::getAttrVal($attr, kHAT_pAttackRateSe, 0);
|
||||
@ -640,7 +642,8 @@ class Hero extends BaseModel {
|
||||
}
|
||||
|
||||
public static function abilityInfo($row){
|
||||
return self::calcAbility($row['hero_id'], array());
|
||||
$attr = emptyReplace(json_decode($row['rand_attr'], true), array());
|
||||
return self::calcAbility($row['hero_id'], $attr);
|
||||
}
|
||||
|
||||
public static function addFreeHero($heroMeta)
|
||||
|
Loading…
x
Reference in New Issue
Block a user