芯片功能初版
This commit is contained in:
parent
260d91a513
commit
1c38233e4e
36
doc/Chip.py
36
doc/Chip.py
@ -142,6 +142,42 @@ class Chip(object):
|
||||
_common.RspHead(),
|
||||
['!data', [_common.Chip()], '芯片信息']
|
||||
]
|
||||
},{
|
||||
'name': 'isNeedLucky',
|
||||
'desc': '选择需要幸运值',
|
||||
'group': 'Chip',
|
||||
'url': 'webapp/index.php?c=Chip&a=isNeedLucky',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
['token_id', '', '源芯片token id'],
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
]
|
||||
},{
|
||||
'name': 'isNotNeedLucky',
|
||||
'desc': '放弃幸运值',
|
||||
'group': 'Chip',
|
||||
'url': 'webapp/index.php?c=Chip&a=isNotNeedLucky',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
['token_id', '', '源芯片token id'],
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
]
|
||||
},{
|
||||
'name': 'waitingLucky',
|
||||
'desc': '幸运值未做选择-待定阶段',
|
||||
'group': 'Chip',
|
||||
'url': 'webapp/index.php?c=Chip&a=waitingLucky',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
['token_id', '', '源芯片token id'],
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
|
@ -666,9 +666,11 @@ class Chip(object):
|
||||
['supper_state', 0, '是否锁定:0 正常;1 锁住'],
|
||||
['inlay_state', 0, '镶嵌状态:0 未镶嵌;1 镶嵌了'],
|
||||
['!rand_attr', [ChipAttr()], '属性'],
|
||||
['lucky_temporary', '', '临时幸运值'],
|
||||
['lucky_temporary', '', '升级成功所需增加的幸运值'],
|
||||
['lucky_final', '', '最终幸运值'],
|
||||
['strength', '', '体力值'],
|
||||
['strength', '', '最终体力值'],
|
||||
['strength_temporary', '', '升级成功所得出的总体力值'],
|
||||
|
||||
]
|
||||
|
||||
class ChipPro(object):
|
||||
|
@ -220,8 +220,8 @@ class ChipController extends BaseAuthedController
|
||||
|
||||
public function syntheticChip(){
|
||||
$token_id_main = trim(getReqVal('token_id_main', 0));
|
||||
$token_id_param = getReqVal('token_id_param', 0);
|
||||
if (! $token_id_main || ! $token_id_param) {
|
||||
$token_id_param = explode(' ',getReqVal('token_id_param', 0));
|
||||
if (! $token_id_main || count($token_id_param)<=0 ) {
|
||||
$this->_rspErr(1, 'Please enter instructions');
|
||||
return;
|
||||
}
|
||||
@ -281,6 +281,20 @@ class ChipController extends BaseAuthedController
|
||||
$this->_rspOk();
|
||||
}
|
||||
|
||||
public function waitingLucky(){
|
||||
$token_id = trim(getReqVal('token_id', 0));
|
||||
if (! $token_id) {
|
||||
$this->_rspErr(1, 'Please enter instructions');
|
||||
return;
|
||||
}
|
||||
$chip = Chip::getChipByTokenId($token_id);
|
||||
$fieldsKv = [
|
||||
'supper_state'=>1,
|
||||
];
|
||||
Chip::update($chip['token_id'],$fieldsKv);
|
||||
$this->_rspOk();
|
||||
}
|
||||
|
||||
public function aKeySynthetic(){
|
||||
|
||||
}
|
||||
@ -288,7 +302,7 @@ class ChipController extends BaseAuthedController
|
||||
|
||||
|
||||
public function test(){
|
||||
$chip = Chip::getChipByTokenId(1660629360);
|
||||
$chip = Chip::getChipByTokenId(1660629357);
|
||||
print_r($chip);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user