|
@@ -49,9 +49,9 @@ class Base extends Controller
|
|
|
$this->page = input('page',1) > 0 ? input('page',1) : 1;
|
|
|
$this->page_num = input('page_num',20);
|
|
|
$this->off_set = $this->page * $this->page_num - $this->page_num;
|
|
|
- //$this->is_test = input('test',0);// 测试用的 // 上线需要注释
|
|
|
+ $this->is_test = input('test',0);// 测试用的 // 上线需要注释
|
|
|
$path = explode('/',$this->request->path());
|
|
|
- //if( input('user_id')) $this->user_id = input('user_id');// 测试用的 // 上线需要注释
|
|
|
+ if( input('user_id')) $this->user_id = input('user_id');// 测试用的 // 上线需要注释
|
|
|
if(!empty($this->need_login) && in_array(end($path),$this->need_login)) $this->checkLogin();
|
|
|
!defined("APPNAME") && define('APPNAME',sysconf('app_name'));
|
|
|
!defined("APPLOGO") && define('APPLOGO',sysconf('app_logo'));
|
|
@@ -61,11 +61,11 @@ class Base extends Controller
|
|
|
{
|
|
|
$authorization = app()->request->header('Authorization');
|
|
|
if(empty($authorization) || $authorization == null){
|
|
|
- /*if($this->is_test == 1) {// 测试用的 // 上线需要注释
|
|
|
+ if($this->is_test == 1) {// 测试用的 // 上线需要注释
|
|
|
$this->user_id = input('user_id') ? input('user_id') : 22;
|
|
|
$this->account_id = $this->user_id;
|
|
|
return true;
|
|
|
- }*/
|
|
|
+ }
|
|
|
$this->error('Token不存在,拒绝访问--',null,0,-1);
|
|
|
}
|
|
|
$key = md5(config('app.jwt'));
|
|
@@ -158,7 +158,7 @@ class Base extends Controller
|
|
|
|
|
|
// 验证短信验证码
|
|
|
protected function checkPhoneCode($phone,$code,$phone_pre = 86){
|
|
|
- //return true; // 上线需要注释
|
|
|
+ return true; // 上线需要注释
|
|
|
$sel_time =date('Y-m-d H:i:s',time()-600);
|
|
|
$store_member_sms = Db::name('store_member_sms')
|
|
|
->field('id,code')
|