diff --git a/Application/Sdk/Controller/BaseController.class.php b/Application/Sdk/Controller/BaseController.class.php index 3e03d0b6..876aa076 100644 --- a/Application/Sdk/Controller/BaseController.class.php +++ b/Application/Sdk/Controller/BaseController.class.php @@ -11,10 +11,13 @@ class BaseController extends RestController{ 'Apple.apple_platform_pay','Spend.notice','Apple.apple_union_pay','WapPay.wap_shortcut_pay', 'WapPay.shortcut_pay','WapPay.android_shortcut_pay','WapPay.wap_shortcut_pay','WapPay.wap_shortcut_pay', 'Apple.apple_weixin_pay','Ipa365','User.user_login','user_register','platform_coin_deduction','get_user_money', - 'file_pay','pay','GameGiftPage','UserH', 'PayH5','init_sdk','sign_contract', 'Apple','Shortcut' + 'file_pay','pay','GameGiftPage','UserH', 'PayH5','init_sdk','sign_contract', 'Apple','Shortcut', // 'test','Game.get_suspend', ]; + protected $noToken = [ + 'user_login', 'user_info', 'send_sms', 'verify_sms', 'forget_password' + ]; // 不需要验证TOKEN的接口 protected $noNeedToken = [ 'Changyan', 'Exchange', 'FengHuoApi', 'File', 'Game', 'GameGift', 'GameNotify', 'Info', 'ios-wap-Pay', @@ -34,9 +37,12 @@ class BaseController extends RestController{ $a = ACTION_NAME; $data = json_decode ( base64_decode ( file_get_contents ( "php://input" ) ), true ); - if (!(in_array($c, $this->noNeedGame) + if ((!(in_array($c, $this->noNeedGame) || in_array($a, $this->noNeedGame) - || in_array($c.".".$a, $this->noNeedGame))) { + || in_array($c.".".$a, $this->noNeedGame))) && + (!(in_array($c, $this->noToken) + || in_array($a, $this->noToken) + || in_array($c.".".$a, $this->noToken)))) { if ($data['api_ver'] == 2) { $userToken = M('user_token', 'tab_')->where([ 'user_id' => $data['user_id'],