作者 lyh

gx

@@ -35,8 +35,10 @@ class BaseLogic extends Logic @@ -35,8 +35,10 @@ 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 + if(!empty($this->user)){
38 $this->project = (new ProjectLogic())->getInfo($this->user['project_id']); 39 $this->project = (new ProjectLogic())->getInfo($this->user['project_id']);
39 } 40 }
  41 + }
40 42
41 43
42 /** 44 /**
@@ -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']);