|
@@ -51,19 +51,17 @@ class Base extends Controller
|
|
|
$this->off_set = $this->page * $this->page_num - $this->page_num;
|
|
|
$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();
|
|
|
- //if($this->user_id == 97) $this->user_id = 83;
|
|
|
!defined("APPNAME") && define('APPNAME',sysconf('app_name'));
|
|
|
!defined("APPLOGO") && define('APPLOGO',sysconf('app_logo'));
|
|
|
- setcookie('aasdf','666',time()+ 66666666666);
|
|
|
}
|
|
|
//校验jwt权限API
|
|
|
protected function checkLogin()
|
|
|
{
|
|
|
$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;
|