代码更新 #93

Merged
charles merged 1 commits from main into prod 2026-03-30 14:55:10 +08:00
Showing only changes of commit 1bfd5450d0 - Show all commits

View File

@ -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();