1
This commit is contained in:
parent
e9f7034499
commit
9cd720c4e8
@ -123,6 +123,56 @@ class Market(object):
|
|||||||
['signature', '', 'signature'],
|
['signature', '', 'signature'],
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'name': 'getPhase3Box',
|
||||||
|
'desc': '开启第三阶段奖励',
|
||||||
|
'group': 'Market',
|
||||||
|
'url': 'webapp/index.php?c=Market&a=getPhase3box',
|
||||||
|
'params': [
|
||||||
|
['account', 0, '钱包账号'],
|
||||||
|
['token', '', 'token'],
|
||||||
|
['token_id', '', '宝箱token_id'],
|
||||||
|
['net_id', '', '网络id'],
|
||||||
|
],
|
||||||
|
'response': [
|
||||||
|
_common.RspHead(),
|
||||||
|
['!rows', [_common.Phase3Box()], '宝箱信息'],
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'name': 'openPhase3Box',
|
||||||
|
'desc': '开启第三阶段奖励',
|
||||||
|
'group': 'Market',
|
||||||
|
'url': 'webapp/index.php?c=Market&a=openPhase3Box',
|
||||||
|
'params': [
|
||||||
|
['account', 0, '钱包账号'],
|
||||||
|
['token', '', 'token'],
|
||||||
|
['token_id', '', '宝箱token_id'],
|
||||||
|
['net_id', '', '网络id'],
|
||||||
|
['box_id', '', '箱子id'],
|
||||||
|
],
|
||||||
|
'response': [
|
||||||
|
_common.RspHead(),
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'name': 'queryPhase3Box',
|
||||||
|
'desc': '查询阶段3开宝箱信息',
|
||||||
|
'group': 'Market',
|
||||||
|
'url': 'webapp/index.php?c=Market&a=queryPhase3Box',
|
||||||
|
'params': [
|
||||||
|
['account', 0, '钱包账号'],
|
||||||
|
['token', '', 'token'],
|
||||||
|
['net_id', '', '网络id'],
|
||||||
|
['box_id', '', '箱子id'],
|
||||||
|
],
|
||||||
|
'response': [
|
||||||
|
_common.RspHead(),
|
||||||
|
['state', '', '0:开启中 1:开启成功'],
|
||||||
|
['cec', 0, '奖励cec'],
|
||||||
|
['!nfts', [_common.NftDetail()], '获得的nft列表'],
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'name': 'queryLuckyBox',
|
'name': 'queryLuckyBox',
|
||||||
'desc': '查询开宝箱信息',
|
'desc': '查询开宝箱信息',
|
||||||
|
@ -550,3 +550,10 @@ class NftView(object):
|
|||||||
['description', '', 'nft描述'],
|
['description', '', 'nft描述'],
|
||||||
['image', '', 'nft图片'],
|
['image', '', 'nft图片'],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
class Phase3Box(object):
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.fields = [
|
||||||
|
['box_id', '', '箱子id'],
|
||||||
|
]
|
||||||
|
@ -487,4 +487,51 @@ class MarketController extends BaseController {
|
|||||||
ActivateNftService::queryResult($account, $tokenId, $netId);
|
ActivateNftService::queryResult($account, $tokenId, $netId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getPhase3Box()
|
||||||
|
{
|
||||||
|
$token = getReqVal('token', '');
|
||||||
|
$account = getReqVal('account', '');
|
||||||
|
$tokenId = getReqVal('token_id', '');
|
||||||
|
$netId = getReqVal('net_id', '');
|
||||||
|
$account = strtolower(getReqVal('account', ''));
|
||||||
|
if (!MarketService::isValidToken($account, $token)) {
|
||||||
|
myself()->_rspErr(1, 'invalid token');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$rows = array();
|
||||||
|
myself()->_rspData(array(
|
||||||
|
'rows' => $rows
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function openPhase3Box()
|
||||||
|
{
|
||||||
|
$token = getReqVal('token', '');
|
||||||
|
$account = getReqVal('account', '');
|
||||||
|
$tokenId = getReqVal('token_id', '');
|
||||||
|
$netId = getReqVal('net_id', '');
|
||||||
|
$boxId = getReqVal('box_id', '');
|
||||||
|
$account = strtolower(getReqVal('account', ''));
|
||||||
|
if (!MarketService::isValidToken($account, $token)) {
|
||||||
|
myself()->_rspErr(1, 'invalid token');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
myself()->_rspOk();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function queryPhase3Box()
|
||||||
|
{
|
||||||
|
$token = getReqVal('token', '');
|
||||||
|
$account = getReqVal('account', '');
|
||||||
|
$tokenId = getReqVal('token_id', '');
|
||||||
|
$netId = getReqVal('net_id', '');
|
||||||
|
$boxId = getReqVal('box_id', '');
|
||||||
|
$account = strtolower(getReqVal('account', ''));
|
||||||
|
if (!MarketService::isValidToken($account, $token)) {
|
||||||
|
myself()->_rspErr(1, 'invalid token');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
myself()->_rspOk();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user