get_down_time 不验证user_token

master
tpingzhang 5 years ago
parent 054754f66c
commit 706b05d77a

@ -17,7 +17,8 @@ class BaseController extends RestController{
]; ];
protected $noToken = [ protected $noToken = [
'user_login', 'send_sms', 'verify_sms', 'forget_password', 'user_login', 'send_sms', 'verify_sms', 'forget_password',
'init_sdk', 'device_record', 'force_update', 'thirdparty', 'get_customer_question' 'init_sdk', 'device_record', 'force_update', 'thirdparty', 'get_customer_question',
'get_down_time'
]; ];
// 不需要验证TOKEN的接口 // 不需要验证TOKEN的接口
protected $noNeedToken = [ protected $noNeedToken = [
@ -40,10 +41,13 @@ class BaseController extends RestController{
if ((!(in_array($c, $this->noNeedGame) if ((!(in_array($c, $this->noNeedGame)
|| in_array($a, $this->noNeedGame) || in_array($a, $this->noNeedGame)
|| in_array($c.".".$a, $this->noNeedGame))) && || in_array($c.".".$a, $this->noNeedGame)))) {
(!(in_array($c, $this->noToken)
if (!(in_array($c, $this->noToken)
|| in_array($a, $this->noToken) || in_array($a, $this->noToken)
|| in_array($c.".".$a, $this->noToken)))) { || in_array($c.".".$a, $this->noToken))) {
if ($data['api_ver'] == 2) { if ($data['api_ver'] == 2) {
$userToken = M('user_token', 'tab_')->where([ $userToken = M('user_token', 'tab_')->where([
'user_id' => $data['user_id'], 'user_id' => $data['user_id'],
@ -59,6 +63,9 @@ class BaseController extends RestController{
// 退出 // 退出
} }
} }
}
$this->userToken = $userToken; $this->userToken = $userToken;
/* /*

Loading…
Cancel
Save