diff --git a/src/router/index.js b/src/router/index.js index ddcdb70..2728bca 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -18,8 +18,11 @@ const router = createRouter({ }) router.beforeEach((to, from, next) => { if (!getCookie('token')) { - to.path.includes('/login') ? next() : next({path: '/login', query: {returnUrl: to.fullPath}}) - return + if (import.meta.env.MODE === "development" || import.meta.env.MODE === "test") { + to.path.includes('/login') ? next() : next({path: '/login', query: {returnUrl: to.fullPath}}) + }else { + window.location.href = import.meta.env.VITE_BASE_LOGIN_URL + import.meta.env.VITE_BASE+to.fullPath + } } next() }) diff --git a/src/views/login/login.vue b/src/views/login/login.vue index ab1b8ea..68b9bf6 100644 --- a/src/views/login/login.vue +++ b/src/views/login/login.vue @@ -61,7 +61,7 @@ const returnclick = () => { }; const form = ref({ - account: "00004409", + account: "10181457", password: "1234567890Aa", });