作者 lyh

gx

@@ -35,7 +35,9 @@ class BaseLogic extends Logic @@ -35,7 +35,9 @@ class BaseLogic extends Logic
35 $this->request = request(); 35 $this->request = request();
36 $this->requestAll = request()->all(); 36 $this->requestAll = request()->all();
37 $this->user = Cache::get(request()->header('token')); 37 $this->user = Cache::get(request()->header('token'));
38 - $this->project = (new ProjectLogic())->getInfo($this->user['project_id']); 38 + if(!empty($this->user)){
  39 + $this->project = (new ProjectLogic())->getInfo($this->user['project_id']);
  40 + }
39 } 41 }
40 42
41 43
@@ -114,8 +114,6 @@ class UserLogic extends BaseLogic @@ -114,8 +114,6 @@ class UserLogic extends BaseLogic
114 * @method 114 * @method
115 */ 115 */
116 public function login(){ 116 public function login(){
117 - var_dump('1111111111111111111111');  
118 - die();  
119 //验证账号密码 117 //验证账号密码
120 $password = base64_encode(md5($this->param['password'])); 118 $password = base64_encode(md5($this->param['password']));
121 $info = $this->model->read(['mobile'=>$this->param['mobile'],'password'=>$password,'status'=>0], ['id','mobile','role_id','token','name','project_id']); 119 $info = $this->model->read(['mobile'=>$this->param['mobile'],'password'=>$password,'status'=>0], ['id','mobile','role_id','token','name','project_id']);