Merge pull request '退出 跳转' (#48) from lyc-dev into main

This commit is contained in:
lyc 2024-07-19 11:10:12 +08:00
commit 8ed27fc925
3 changed files with 9 additions and 5 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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(() => { });
}