From 930b3d20dcb8662b1d87d0b3f0b7dfe4dd9f4d12 Mon Sep 17 00:00:00 2001 From: zq <136432190602163.com> Date: Tue, 6 Jan 2026 10:32:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BF=E9=97=AEui=E9=A1=B5=E9=9D=A2=E7=BB=95?= =?UTF-8?q?=E8=BF=87=E7=99=BB=E9=99=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/login.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/utils/login.js b/src/utils/login.js index 198d21e..e233649 100644 --- a/src/utils/login.js +++ b/src/utils/login.js @@ -11,7 +11,15 @@ function axiosWithTimeout(promise, ms) { } export async function autoLoginByToken(timeout = 10000) { - + // 检查当前路径是否为 /ui 页面 + const currentPath = window.location.pathname + const isUIPage = currentPath.startsWith('/ui') + + // 如果是 /ui 页面,跳过登录校验 + if (isUIPage) { + console.log('访问 UI 页面,跳过登录校验') + return true + } const urlParams = new URLSearchParams(window.location.search) const token = urlParams.get('token') @@ -53,7 +61,6 @@ export async function autoLoginByToken(timeout = 10000) { //非代理商 直接跳至加盟页 访问加盟页的话 不再重复跳转 const agent = localStorage.getItem('aid') - const currentPath = window.location.pathname if(agent === null && currentPath !== '/franchise'){ const aid = urlParams.get('aid') if(aid){