This commit is contained in:
aozhiwei 2022-11-07 12:53:16 +08:00
parent cacc026d13
commit f446b1c0c3
2 changed files with 11 additions and 3 deletions

View File

@ -115,7 +115,7 @@ class BlockChain(object):
'params': [
['type', 0, '1英雄 2枪械'],
['token_id', '', 'token_id'],
['chip_id', '', '需要装上的chip token_ids多个用|分割'],
['chip_ids', '', '需要装上的chip token_ids多个用|分割'],
],
'response': [
_common.RspHead(),

View File

@ -415,12 +415,19 @@ class BlockChainController extends BaseAuthedController {
{
$type = getReqVal('type', '');
$tokenId = getReqVal('token_id', '');
$chipIds = explode('|', getReqVal('chips_ids', ''));
$chipIds = explode('|', getReqVal('chip_ids', ''));
switch ($type) {
case 1:
{
$heroDb = Hero::findByTokenId($tokenId);
foreach ($chipIds as $chipId) {
$chipDb = Chip::findByTokenId($chipId);
if (!$chipDb) {
myself()->_rspErr(101, 'chip_ids paramater error');
return;
}
}
}
break;
case 2:
@ -431,6 +438,7 @@ class BlockChainController extends BaseAuthedController {
default:
{
myself()->_rspErr(101, 'type paramater error');
return;
}
break;
}