1
This commit is contained in:
parent
44675ca7b6
commit
c175ac09a9
@ -13,10 +13,12 @@ class Market(object):
|
|||||||
'url': 'webapp/index.php?c=Market&a=getNonce',
|
'url': 'webapp/index.php?c=Market&a=getNonce',
|
||||||
'params': [
|
'params': [
|
||||||
['account', '', '钱包账号'],
|
['account', '', '钱包账号'],
|
||||||
|
['token', '', 'token'],
|
||||||
['net_id', '', '网络id'],
|
['net_id', '', '网络id'],
|
||||||
],
|
],
|
||||||
'response': [
|
'response': [
|
||||||
_common.RspHead(),
|
_common.RspHead(),
|
||||||
|
['state', 0, '0:token无效客户端需签名 1:token是有效的客户端不需要再次签名'],
|
||||||
['nonce', '', 'nonce'],
|
['nonce', '', 'nonce'],
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -485,9 +485,12 @@ class MarketController extends BaseController {
|
|||||||
|
|
||||||
public function getNonce()
|
public function getNonce()
|
||||||
{
|
{
|
||||||
|
$account = getReqVal('account', '');
|
||||||
|
$token = getReqVal('token', '');
|
||||||
$nonce = myself()->_getNowTime();
|
$nonce = myself()->_getNowTime();
|
||||||
myself()->_rspData(array(
|
myself()->_rspData(array(
|
||||||
'nonce' => $nonce
|
'state' => $this->isValidToken($account, $token) ? 1 : 0,
|
||||||
|
'nonce' => $nonce,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user