Merge remote-tracking branch 'origin/master'

This commit is contained in:
张松 2025-08-15 18:00:23 +08:00
commit 9052bb8d2a
1 changed files with 5 additions and 3 deletions

View File

@ -49,10 +49,12 @@ class Frontend
// 初始化会员鉴权实例
$this->auth = Auth::instance();
$token = request()->header('token');
if ($token && $needLogin) {
if ($token) {
if(request()->controller != 'app\czg\app\controller\LoginController' && request()->action != 'index'){} {
if(!$this->auth->init($token)) {
$this->error('Token expiration', [], 401);
}
}
}else {
if ($needLogin) {
$this->error('请登录', [