Merge branch 'ma-mall-ui' of http://192.168.0.56:3000/bonus/bonus-ui into ma-mall-ui
This commit is contained in:
commit
abc4e5db4c
|
|
@ -50,7 +50,9 @@ router.beforeEach((to, from, next) => {
|
||||||
// 在免登录白名单,直接进入
|
// 在免登录白名单,直接进入
|
||||||
next();
|
next();
|
||||||
} else {
|
} else {
|
||||||
next(`/login?redirect=${encodeURIComponent(to.fullPath)}`); // 否则全部重定向到登录页
|
const redirectUrl =
|
||||||
|
process.env.NODE_ENV === "production" ? "/glweb/login" : "/login";
|
||||||
|
next(`${redirectUrl}?redirect=${encodeURIComponent(to.fullPath)}`); // 否则全部重定向到登录页
|
||||||
NProgress.done(true);
|
NProgress.done(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -185,5 +185,5 @@ export default new Router({
|
||||||
mode: "history", // 去掉url中的#
|
mode: "history", // 去掉url中的#
|
||||||
scrollBehavior: () => ({ y: 0 }),
|
scrollBehavior: () => ({ y: 0 }),
|
||||||
routes: constantRoutes,
|
routes: constantRoutes,
|
||||||
/* base: "/glweb", */
|
base: process.env.NODE_ENV === "production" ? "/glweb" : "",
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue