作者 王智

1

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