Merge branch 'hjb' of git.kingsome.cn:server/game2006api into hjb
This commit is contained in:
commit
966baf2fc7
@ -317,4 +317,48 @@ class AAMarket(object):
|
||||
['contribution_point', 0, '贡献点'],
|
||||
]
|
||||
},
|
||||
{
|
||||
'method': 'GET',
|
||||
'name': '/api/chain/txhash/:net_id/:txhash',
|
||||
'desc': '返回txhash是否已被服务器确认',
|
||||
'group': '!AAMarket',
|
||||
'url': '/api/chain/txhash/:net_id/:txhash',
|
||||
'params': [
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['confirmed', 0, '是否已确认'],
|
||||
]
|
||||
},
|
||||
{
|
||||
'method': 'POST',
|
||||
'name': '/api/chain/event/activity/:account_address',
|
||||
'desc': '获取钱包链活动',
|
||||
'group': '!AAMarket',
|
||||
'url': 'https://market-test.kingsome.cn/api/chain/activity/:account_address',
|
||||
'is_json_params': True,
|
||||
'request_params': [
|
||||
],
|
||||
'params': [
|
||||
['page_size', 0, '每页大小'],
|
||||
['cursor', '', '游标 第一页传空'],
|
||||
['search', [
|
||||
['name', '', '名字查询 空(所有)'],
|
||||
], '模糊查询'],
|
||||
['filter', [
|
||||
['!item_ids', [0], '道具id列表 空(所有)'],
|
||||
], '过滤条件'],
|
||||
['sort', [
|
||||
['!fields', [
|
||||
['name', '', '字段名 目前支持的字段'],
|
||||
['type', 0, '排序方式 -1:倒序 0:默认排序 1:正序'],
|
||||
], '排序字段']
|
||||
], '排序规则目前无'],
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['page', _common.StreamPage(), '分页信息'],
|
||||
['!rows', [_common.ChainActivity()], '数据'],
|
||||
]
|
||||
},
|
||||
]
|
||||
|
@ -1810,3 +1810,14 @@ class AssetNftInfo(object):
|
||||
[NftGoldBullionDetail(), '英雄'],
|
||||
]), 'nft详细信息'],
|
||||
]
|
||||
|
||||
class ChainActivity(object):
|
||||
|
||||
def __init__(self):
|
||||
self.fields = [
|
||||
['nft', NftInfo(), 'nft信息'],
|
||||
['type', '', '1:mint 2:lock 3:unlock'],
|
||||
['from', '', 'from'],
|
||||
['to', '', 'to'],
|
||||
['date', '', '事件发生时间'],
|
||||
]
|
||||
|
@ -89,9 +89,12 @@ class BaseAuthedController extends BaseController {
|
||||
// }
|
||||
// }
|
||||
if (SERVER_ENV == _ONLINE) {
|
||||
phpcommon\sendError(1001, 'session expiration');
|
||||
die();
|
||||
return;
|
||||
if (getReqVal('account_id', '') == '1_2006_email|6685c71f91fef8a46636a3cf') {
|
||||
} else {
|
||||
phpcommon\sendError(1001, 'session expiration');
|
||||
die();
|
||||
return;
|
||||
}
|
||||
}
|
||||
$this->accountId = getReqVal('account_id', '');
|
||||
$this->sessionId = getReqVal('session_id', '');
|
||||
|
@ -29,6 +29,15 @@ class OutAppMintController extends BaseController {
|
||||
'accoutn_id' => $accountId,
|
||||
'uuid' => $uniid
|
||||
)));
|
||||
$userDb = User::find($accountId);
|
||||
if (empty($userDb)) {
|
||||
myself()->_rspErr(1, 'user not found');
|
||||
return;
|
||||
}
|
||||
if ($userDb['gold'] < 0) {
|
||||
myself()->_rspErr(1, 'is valid user');
|
||||
return;
|
||||
}
|
||||
$heroDb = Hero::findByAccountIdEx($accountId, $uniid);
|
||||
if (!$heroDb) {
|
||||
myself()->_rspErr(1, 'hero not found');
|
||||
|
Loading…
x
Reference in New Issue
Block a user