1
This commit is contained in:
parent
cacc026d13
commit
f446b1c0c3
@ -115,7 +115,7 @@ class BlockChain(object):
|
|||||||
'params': [
|
'params': [
|
||||||
['type', 0, '1:英雄 2:枪械'],
|
['type', 0, '1:英雄 2:枪械'],
|
||||||
['token_id', '', 'token_id'],
|
['token_id', '', 'token_id'],
|
||||||
['chip_id', '', '需要装上的chip token_ids多个用|分割'],
|
['chip_ids', '', '需要装上的chip token_ids多个用|分割'],
|
||||||
],
|
],
|
||||||
'response': [
|
'response': [
|
||||||
_common.RspHead(),
|
_common.RspHead(),
|
||||||
|
@ -415,12 +415,19 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
{
|
{
|
||||||
$type = getReqVal('type', '');
|
$type = getReqVal('type', '');
|
||||||
$tokenId = getReqVal('token_id', '');
|
$tokenId = getReqVal('token_id', '');
|
||||||
$chipIds = explode('|', getReqVal('chips_ids', ''));
|
$chipIds = explode('|', getReqVal('chip_ids', ''));
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 1:
|
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;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
@ -431,6 +438,7 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
myself()->_rspErr(101, 'type paramater error');
|
myself()->_rspErr(101, 'type paramater error');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user