From e5e4359b5d3bb15da413ac1345de50b9037e747a Mon Sep 17 00:00:00 2001 From: lyc Date: Fri, 19 Jul 2024 11:09:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E5=87=BA=20=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 4 ++-- src/main/index.js | 4 ++-- src/renderer/src/layout/components/Header.vue | 6 +++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.env.production b/.env.production index 0b1b398..380f9d6 100644 --- a/.env.production +++ b/.env.production @@ -5,9 +5,9 @@ VITE_APP_TITLE = AIx数字平台 VITE_APP_ENV = 'production' # AIx融合数字管理系统/生产环境 -VITE_APP_BASE_API = 'https://file.ysaix.com:7868' +VITE_APP_BASE_API = 'https://file.ysaix.com:7868/prod-api' -VITE_APP_UPLOAD_API = 'https://file.ysaix.com:7868/' +VITE_APP_UPLOAD_API = 'https://file.ysaix.com:7868/prod-api' # 是否在打包时开启压缩,支持 gzip 和 brotli VITE_BUILD_COMPRESS = gzip diff --git a/src/main/index.js b/src/main/index.js index 675354c..775c151 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -31,12 +31,12 @@ function createWindow() { shell.openExternal(details.url) return { action: 'deny' } }) - + mainWindow.webContents.openDevTools() // HMR for renderer base on electron-vite cli. // Load the remote URL for development or the local html file for production. if (is.dev && process.env['ELECTRON_RENDERER_URL']) { mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL']) - mainWindow.webContents.openDevTools() + // mainWindow.loadURL('https://file.ysaix.com:7868/') } else { diff --git a/src/renderer/src/layout/components/Header.vue b/src/renderer/src/layout/components/Header.vue index a835d41..4e4b31b 100644 --- a/src/renderer/src/layout/components/Header.vue +++ b/src/renderer/src/layout/components/Header.vue @@ -118,7 +118,11 @@ function logout() { type: 'warning' }).then(() => { userStore.logOut().then(() => { - location.href = '/index#/login'; + // location.href = '/index#/login'; + router.replace('/login') + }).catch(()=>{ + router.replace('/login') + // location.href = '/index#/login'; }) }).catch(() => { }); }