From 830d20b082a695e6b332d95bfbc161b3b2b7e3f6 Mon Sep 17 00:00:00 2001 From: yuping <82253452@qq.com> Date: Fri, 1 Sep 2023 17:49:38 +0800 Subject: [PATCH 1/4] fix bug --- src/components/student/OnlineClassModelStudent.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/student/OnlineClassModelStudent.vue b/src/components/student/OnlineClassModelStudent.vue index 0672b115..88f0aab6 100644 --- a/src/components/student/OnlineClassModelStudent.vue +++ b/src/components/student/OnlineClassModelStudent.vue @@ -288,6 +288,7 @@ const openDrawer = (raw) => { const changePagination = (page) => { searchParams.value.pageNo = page; + searchStu(); }; function del(id) { From 0112a88185aabf6ac5e0b601f4aa23486c53610a Mon Sep 17 00:00:00 2001 From: yuping <82253452@qq.com> Date: Thu, 14 Sep 2023 15:00:39 +0800 Subject: [PATCH 2/4] ---fix bug --- src/api/config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/api/config.js b/src/api/config.js index dc624903..b8ab0563 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -9,6 +9,8 @@ import {message} from "ant-design-vue"; import axios from "axios"; import router from "@/router"; +import {REFRESH_TOKEN_API} from "@/api/ThirdApi"; +import {boeRequest} from "@/api/request"; // import { getCookie } from '../api/method' // const Qs = require("qs"); @@ -64,6 +66,10 @@ http.interceptors.response.use( localStorage.removeItem('refreshPage') return Promise.reject(response); } + if (code === 1001) { + window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath) + return Promise.reject(response); + } show ? message.error(msg):message.error('系统接口数据异常,请联系管理员'); console.log("api %o", msg); return Promise.reject(response); From 9ab862397b17c5af077d8ea96befb08b1e260ee1 Mon Sep 17 00:00:00 2001 From: yuping <82253452@qq.com> Date: Tue, 19 Sep 2023 17:05:40 +0800 Subject: [PATCH 3/4] fix bug --- src/api/config.js | 4 +--- src/api/confign.js | 2 +- src/api/configz.js | 2 +- src/api/request.js | 4 +--- src/components/NavTop.vue | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/api/config.js b/src/api/config.js index dc624903..45ebafcd 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -57,9 +57,7 @@ http.interceptors.response.use( return response; } if (code === 1000) { - (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? - router.push({path: 'login', query: { returnUrl: router.currentRoute.value.fullPath }}) : - (window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)) + window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath) // TODO token过期后退出登录 清空当前用户标记 - 为了刷新页面使用 localStorage.removeItem('refreshPage') return Promise.reject(response); diff --git a/src/api/confign.js b/src/api/confign.js index dcb886c6..58172cd6 100644 --- a/src/api/confign.js +++ b/src/api/confign.js @@ -49,7 +49,7 @@ http.interceptors.response.use( message.error('token过期请重新登陆'); } if (code === 1000) { - (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: 'login'}) : (window.location.href = process.env.VUE_APP_LOGIN_URL) + window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath) return Promise.reject(response); } // show && message.error(msg); diff --git a/src/api/configz.js b/src/api/configz.js index 165fb064..89cdcd8d 100644 --- a/src/api/configz.js +++ b/src/api/configz.js @@ -51,7 +51,7 @@ http.interceptors.response.use( message.error('token过期请重新登陆'); } if (code === 1000) { - (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: 'login'}) : (window.location.href = process.env.VUE_APP_LOGIN_URL) + window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath) return Promise.reject(response); } // show && message.error(msg); diff --git a/src/api/request.js b/src/api/request.js index 227cfc6d..497f9fe8 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -495,9 +495,7 @@ export async function request(_url, params) { return res; } if (res.code === 1000 || res.code === 1002) { - (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? - router.push({path: 'login', query: { returnUrl: router.currentRoute.value.fullPath }}) : - (window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)) + window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath) localStorage.removeItem('refreshPage') return Promise.reject(res); }else if(res.code=== 1001){ diff --git a/src/components/NavTop.vue b/src/components/NavTop.vue index c6f27b51..345f6d7f 100644 --- a/src/components/NavTop.vue +++ b/src/components/NavTop.vue @@ -90,7 +90,7 @@ const logOut = async () => { store.replaceState(createStore({state: {openpages: []}}).state); localStorage.clear(); sessionStorage.clear(); - (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: '/login'}) : (window.location.href = window.location.protocol + process.env.VUE_APP_LOGIN_URL) + window.location.href = window.location.protocol + process.env.VUE_APP_LOGIN_URL };