后台登录

This commit is contained in:
2026-01-15 05:26:34 +08:00
parent b367d1a97d
commit f24de31a92
2 changed files with 13 additions and 7 deletions

View File

@@ -142,7 +142,9 @@ class adminApi extends Controller
//通过头部信息获取authorization0
$token = $this->request->server('HTTP_AUTHORIZATION', $this->request->request('token', \think\Cookie::get('token')));
//检测是否登录
if (!$this->auth->isLogin($token)) {
// if (!$this->auth->isLogin($token)) {
$auth = new Auth ;
if (!$auth->isLogin($token)) {
Hook::listen('admin_nologin', $this);
$url = Session::get('referer');
$url = $url ? $url : $this->request->url();