作者 王晓刚
1 个管道 的构建 通过 耗费 1 秒

修改问题文档

@@ -111,6 +111,7 @@ class Index extends Backend @@ -111,6 +111,7 @@ class Index extends Backend
111 111
112 $user = cookie('user'); 112 $user = cookie('user');
113 dump($user); 113 dump($user);
  114 + \think\Session::get('user');
114 if(!empty($token)){ 115 if(!empty($token)){
115 $user_id = Db::name('user_token')->where(['token'=>$token])->value('user_id'); 116 $user_id = Db::name('user_token')->where(['token'=>$token])->value('user_id');
116 dump($user_id); 117 dump($user_id);
@@ -141,7 +141,6 @@ class User extends Frontend @@ -141,7 +141,6 @@ class User extends Frontend
141 $token = $this->auth->getToken(); 141 $token = $this->auth->getToken();
142 session('token',$token); 142 session('token',$token);
143 Cookie::set('token',$token); 143 Cookie::set('token',$token);
144 - session('user',$result);  
145 $this->success('SUCCESS','',['target_url'=>rawurldecode($target_url)]); 144 $this->success('SUCCESS','',['target_url'=>rawurldecode($target_url)]);
146 } 145 }
147 146
@@ -194,7 +193,6 @@ class User extends Frontend @@ -194,7 +193,6 @@ class User extends Frontend
194 $token = $this->auth->getToken(); 193 $token = $this->auth->getToken();
195 session('token',$token); 194 session('token',$token);
196 Cookie::set('token',$token); 195 Cookie::set('token',$token);
197 - session('user',$result1);  
198 $this->success('SUCCESS'); 196 $this->success('SUCCESS');
199 } 197 }
200 198