This commit is contained in:
aozhiwei 2022-02-24 11:29:21 +08:00
parent 44675ca7b6
commit c175ac09a9
2 changed files with 6 additions and 1 deletions

View File

@ -13,10 +13,12 @@ class Market(object):
'url': 'webapp/index.php?c=Market&a=getNonce',
'params': [
['account', '', '钱包账号'],
['token', '', 'token'],
['net_id', '', '网络id'],
],
'response': [
_common.RspHead(),
['state', 0, '0token无效客户端需签名 1token是有效的客户端不需要再次签名'],
['nonce', '', 'nonce'],
]
},

View File

@ -485,9 +485,12 @@ class MarketController extends BaseController {
public function getNonce()
{
$account = getReqVal('account', '');
$token = getReqVal('token', '');
$nonce = myself()->_getNowTime();
myself()->_rspData(array(
'nonce' => $nonce
'state' => $this->isValidToken($account, $token) ? 1 : 0,
'nonce' => $nonce,
));
}