部分前台接口
This commit is contained in:
@@ -96,6 +96,13 @@ class BaseService
|
||||
if ($this->isAuth) {
|
||||
$this->userInfo = JWTService::getInstance()->getToken()->getUserInfo();
|
||||
$this->userId = $this->userInfo['id'] ?? 0;
|
||||
} else {
|
||||
try {
|
||||
$this->userInfo = JWTService::getInstance()->getToken()->getUserInfo();
|
||||
$this->userId = $this->userInfo['id'] ?? 0;
|
||||
} catch (Exception $e) {
|
||||
$this->userId = 0;
|
||||
}
|
||||
}
|
||||
$this->utils = UtilsService::getInstance();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user