From f5d94a710c4dd5c1e6fb9109381ec92a290f6db2 Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Tue, 9 Jul 2024 16:45:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E7=BC=A9=E5=B0=8F=E9=97=AE=E9=A2=98=EF=BC=8C=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E7=99=BB=E5=BD=95=E5=A4=B1=E8=B4=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/layout/components/Header.vue | 8 ++++---- src/renderer/src/utils/request.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/layout/components/Header.vue b/src/renderer/src/layout/components/Header.vue index 8ab712f..85b3e2a 100644 --- a/src/renderer/src/layout/components/Header.vue +++ b/src/renderer/src/layout/components/Header.vue @@ -52,7 +52,7 @@ import useUserStore from '@/store/modules/user' const userStore = useUserStore() const userInfo = userStore.user -// const { ipcRenderer } = window.electron +const { ipcRenderer } = window.electron||{} const radio1 = ref('resource') @@ -65,7 +65,7 @@ const minimizeWindow = () => { } //最大化 const maximizeWindow = () => { - ipcRenderer.send('maximize-window') + ipcRenderer?.send('maximize-window') isMaxSize.value = !isMaxSize.value } //关闭 @@ -95,7 +95,7 @@ const changePage = (url)=>{ .change-tab{ -webkit-app-region: no-drag; margin-left: 20px; - + ul{ li{ padding: 3px 13px; @@ -155,7 +155,7 @@ const changePage = (url)=>{ } } .user { - + .user-info { padding-right: 5px; align-items: center; diff --git a/src/renderer/src/utils/request.js b/src/renderer/src/utils/request.js index f48a47f..6cfd1fc 100644 --- a/src/renderer/src/utils/request.js +++ b/src/renderer/src/utils/request.js @@ -87,7 +87,7 @@ service.interceptors.response.use(res => { ElMessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => { isRelogin.show = false; useUserStore().logOut().then(() => { - location.href = '/index'; + location.href = '/index#/login'; }) }).catch(() => { isRelogin.show = false; -- 2.44.0.windows.1 From 300e9130aa26d83554f247c3b1422c46a8ee1d8d Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Tue, 9 Jul 2024 17:47:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=A1=86=E6=9E=B6?= =?UTF-8?q?=E6=A0=87=E9=BB=84=EF=BC=8C=E5=A4=B4=E9=83=A8=E9=80=80=E5=87=BA?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=8C=E5=A4=B4=E5=83=8F=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron.vite.config.mjs | 5 + .../src/layout/components/AppMain.vue | 5 +- src/renderer/src/layout/components/Header.vue | 108 ++++++++++++++---- 3 files changed, 93 insertions(+), 25 deletions(-) diff --git a/electron.vite.config.mjs b/electron.vite.config.mjs index 8547744..83ad28a 100644 --- a/electron.vite.config.mjs +++ b/electron.vite.config.mjs @@ -25,6 +25,11 @@ export default defineConfig({ target: 'http://192.168.2.52:7863', changeOrigin: true, rewrite: (p) => p.replace(/^\/dev-api/, '') + }, + '/profile': { + // target: 'http://27.128.240.72:7865', + target: 'https://cqyy.ysaix.com:7868', + changeOrigin: true } }, }, diff --git a/src/renderer/src/layout/components/AppMain.vue b/src/renderer/src/layout/components/AppMain.vue index 8933896..b93e085 100644 --- a/src/renderer/src/layout/components/AppMain.vue +++ b/src/renderer/src/layout/components/AppMain.vue @@ -2,13 +2,14 @@
- +
- + -- 2.44.0.windows.1