add
This commit is contained in:
@@ -53,19 +53,23 @@ class BaseController
|
||||
if(!$this->auth->init($token)) {
|
||||
$this->error('Token expiration', [], 409);
|
||||
}
|
||||
};
|
||||
|
||||
if ($needLogin) {
|
||||
$this->error('Token expiration', [], 409);
|
||||
}
|
||||
if ($needLogin) {
|
||||
if (!$this->auth->isLogin()) {
|
||||
}else {
|
||||
if ($needLogin) {
|
||||
$this->error('请登录', [
|
||||
'type' => $this->auth::NEED_LOGIN
|
||||
], $this->auth::LOGIN_RESPONSE_CODE);
|
||||
}
|
||||
if ($needLogin) {
|
||||
if (!$this->auth->isLogin()) {
|
||||
$this->error('请登录', [
|
||||
'type' => $this->auth::NEED_LOGIN
|
||||
], $this->auth::LOGIN_RESPONSE_CODE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user