作者 王智

1

@@ -108,7 +108,8 @@ class User extends Api @@ -108,7 +108,8 @@ class User extends Api
108 if ($res) { 108 if ($res) {
109 $data = [ 109 $data = [
110 'Token' => $Token, 110 'Token' => $Token,
111 - 'Avatar' => $UserInfo['avatar'] 111 + 'Avatar' => $UserInfo['avatar'],
  112 + 'Nickname' => $UserInfo['nickname']
112 ]; 113 ];
113 $this->success('成功', $data); 114 $this->success('成功', $data);
114 } else { 115 } else {
@@ -167,5 +168,4 @@ class User extends Api @@ -167,5 +168,4 @@ class User extends Api
167 } 168 }
168 169
169 170
170 -  
171 } 171 }
@@ -332,7 +332,7 @@ class Api @@ -332,7 +332,7 @@ class Api
332 if (empty($token['token'])) { 332 if (empty($token['token'])) {
333 $this->error('请登录后在操作', '', 401); 333 $this->error('请登录后在操作', '', 401);
334 } 334 }
335 - $is_token = Db::name('user')->where(['token' => $token['token']])->find(); 335 + $is_token = Db::name('user')->where(['token' => $token['authorization']])->find();
336 if (!$is_token) { 336 if (!$is_token) {
337 $this->error('登陆已过期,请重新登陆', '', 90001); 337 $this->error('登陆已过期,请重新登陆', '', 90001);
338 } 338 }