1
This commit is contained in:
parent
15f446afd2
commit
863bcb5f00
@ -61,51 +61,9 @@ class ShopController extends BaseAuthedController
|
||||
// }
|
||||
// }
|
||||
|
||||
$this->accountId = getReqVal('account_id', '');
|
||||
if (getReqVal('c', '') == 'Shop' && getReqVal('a', '') == 'buyGoodsDirect') {
|
||||
$this->_userLvRestriction();
|
||||
return;
|
||||
if(getReqVal('a', '') != 'buyGoodsDirect'){
|
||||
parent::_handlePre();
|
||||
}
|
||||
|
||||
// $this->accountId = getReqVal('account_id', '');
|
||||
$this->sessionId = getReqVal('session_id', '');
|
||||
if (!phpcommon\isValidSessionId(
|
||||
$this->accountId,
|
||||
$this->sessionId
|
||||
)) {
|
||||
phpcommon\sendError(500, 'invalid session_id');
|
||||
die();
|
||||
}
|
||||
if (!(getReqVal('c', '') == 'User' && getReqVal('a', '') == 'login')) {
|
||||
if ((getReqVal('c', '') == 'Battle')) {
|
||||
return;
|
||||
}
|
||||
$r = $this->_getRedis($this->_getAccountId());
|
||||
$sessionId = $r->get(LAST_SESSION_KEY . $this->_getAccountId());
|
||||
if (empty($sessionId)) {
|
||||
$this->updateSession(
|
||||
myself()->_getAccountId(),
|
||||
myself()->_getSessionId()
|
||||
);
|
||||
} else if ($sessionId != $this->_getSessionId()) {
|
||||
error_log('session expiration' . json_encode(
|
||||
$_REQUEST
|
||||
));
|
||||
phpcommon\sendError(1001, 'session expiration');
|
||||
die();
|
||||
}
|
||||
|
||||
$this->_userLvRestriction();
|
||||
}
|
||||
|
||||
/*if (SERVER_ENV == _ONLINE) {
|
||||
if (phpcommon\cmpVersion(getReqVal('_version', ''), '0.2.0') > 0) {
|
||||
if (!$this->isWhiteList() || myself()->_getChannel() != BC_CHANNEL) {
|
||||
phpcommon\sendError(1002, '');
|
||||
die();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
public function getGoodsList()
|
||||
|
Loading…
x
Reference in New Issue
Block a user