From 48411ddfff18a5efa241b9e98a7a4c2083909092 Mon Sep 17 00:00:00 2001 From: yuping <82253452@qq.com> Date: Mon, 16 Jan 2023 10:22:15 +0800 Subject: [PATCH 1/3] =?UTF-8?q?init=20=E7=AD=BE=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.boe | 2 +- .env.prod | 2 +- .env.release | 2 +- .env.test | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.env.boe b/.env.boe index 70acd1e..4978826 100644 --- a/.env.boe +++ b/.env.boe @@ -1,4 +1,4 @@ -VITE_BASE=/fe-student-h5 +VITE_BASE=/student-h5 VITE_BASE_API=/manageApi VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id= diff --git a/.env.prod b/.env.prod index eb63d69..76667b9 100644 --- a/.env.prod +++ b/.env.prod @@ -1,4 +1,4 @@ -VITE_BASE=/fe-student-h5 +VITE_BASE=/student-h5 VITE_BASE_API=/manageApi VITE_BASE_LOGIN_URL=https://u.boe.com/web?returnUrl= diff --git a/.env.release b/.env.release index 7731174..e9e547a 100644 --- a/.env.release +++ b/.env.release @@ -1,4 +1,4 @@ -VITE_BASE=/fe-student-h5-release +VITE_BASE=/student-h5 VITE_BASE_API=/manageApi-release VITE_BASE_LOGIN_URL=https://u.boe.com/web?returnUrl= diff --git a/.env.test b/.env.test index c3b5a66..84532a5 100644 --- a/.env.test +++ b/.env.test @@ -1,4 +1,4 @@ -VITE_BASE=/fe-student-h5 +VITE_BASE=/student-h5 VITE_BASE_API=/manageApi VITE_OUTPUT_DIR=./docker/dist From 7b26e627879dfcf60fa6467a0d406cef02c2cca8 Mon Sep 17 00:00:00 2001 From: yuping <82253452@qq.com> Date: Mon, 16 Jan 2023 14:40:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?init=20=E7=99=BB=E5=BD=95=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 7 +++++-- src/views/login/login.vue | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) 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", }); From 5b8d42cf0688f2c82a7440b85b6e127500969b7d Mon Sep 17 00:00:00 2001 From: yuping <82253452@qq.com> Date: Tue, 17 Jan 2023 17:13:23 +0800 Subject: [PATCH 3/3] =?UTF-8?q?init=20=E7=99=BB=E5=BD=95=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.release b/.env.release index e9e547a..4efc769 100644 --- a/.env.release +++ b/.env.release @@ -1,4 +1,4 @@ -VITE_BASE=/student-h5 +VITE_BASE=/student-h5-release VITE_BASE_API=/manageApi-release VITE_BASE_LOGIN_URL=https://u.boe.com/web?returnUrl=