|
|
@@ -41,11 +41,11 @@ class Api extends Controller
|
|
|
// 解码
|
|
|
$userInfo = AccessToken::decode($this->token);
|
|
|
// 判断登录时效
|
|
|
- if (isset($userInfo['error'])) throw new LoginException("login_error");
|
|
|
- if ($userInfo['expire'] < time()) throw new LoginException("login_exprie");
|
|
|
+ if (isset($userInfo['error'])) throw new LoginException("登录失效");
|
|
|
+ if ($userInfo['expire'] < time()) throw new LoginException("账户过期");
|
|
|
// 获取就得令牌
|
|
|
$oldToken = (new EmployeeModel())->getLogin($userInfo['uid'], 'api');
|
|
|
- if ($oldToken != md5($this->token)) throw new LoginException("login_error");
|
|
|
+ if ($oldToken != md5($this->token)) throw new LoginException("登录失效");
|
|
|
// 追加入
|
|
|
return $userInfo;
|
|
|
}
|