From 1bfd5450d059be2a5a385f400a27b1af60e8dd6b Mon Sep 17 00:00:00 2001 From: hrx <18603305412@163.com> Date: Mon, 30 Mar 2026 14:53:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- f/web-kboss/src/permission.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/f/web-kboss/src/permission.js b/f/web-kboss/src/permission.js index 9a117be..891d831 100644 --- a/f/web-kboss/src/permission.js +++ b/f/web-kboss/src/permission.js @@ -76,6 +76,18 @@ router.beforeEach(async (to, from, next) => { const user = sessionStorage.getItem("user"); const auths = sessionStorage.getItem("auths"); const homePath =getHomePath() + + // 获取当前域名 + const hostname = window.location.hostname || ''; + + // 特殊处理:在 ncmatch.cn 域名下访问 /homePage/index 时重定向 + if (hostname.includes('ncmatch.cn') && to.path === '/homePage/index') { + console.log("在 ncmatch.cn 域名下访问 /homePage/index,重定向到 /ncmatchHome/index"); + next('/ncmatchHome/index'); + NProgress.done(); + return; + } + if (to.path === homePath) { next(); // 如果已经是目标路径,直接放行 NProgress.done();