Compare commits
No commits in common. "78a3ebee0342806f775a59823a0df408974c25fe" and "fe649ed106ef97c7a4988809bfee05aea925eae6" have entirely different histories.
78a3ebee03
...
fe649ed106
@ -76,18 +76,6 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
const user = sessionStorage.getItem("user");
|
const user = sessionStorage.getItem("user");
|
||||||
const auths = sessionStorage.getItem("auths");
|
const auths = sessionStorage.getItem("auths");
|
||||||
const homePath =getHomePath()
|
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) {
|
if (to.path === homePath) {
|
||||||
next(); // 如果已经是目标路径,直接放行
|
next(); // 如果已经是目标路径,直接放行
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user