作者 王智

1

... ... @@ -329,10 +329,10 @@ class Api
//检测Token
protected function IsToken($token)
{
if (empty($token['token'])) {
if (empty($token['authorization'])) {
$this->error('请登录后在操作', '', 401);
}
$is_token = Db::name('user')->where(['token' => $token['Authorization']])->find();
$is_token = Db::name('user')->where(['token' => $token['authorization']])->find();
if (!$is_token) {
$this->error('登陆已过期,请重新登陆', '', 90001);
}
... ...