二期:添加配置

This commit is contained in:
朱浩 2024-07-31 09:25:44 +08:00
parent 9f5115f4a3
commit b7f45bbd33
4 changed files with 11 additions and 8 deletions

View File

@ -7,6 +7,8 @@ VITE_APP_ENV = 'development'
# AIx融合数字管理系统/开发环境
VITE_APP_BASE_API = '/dev-api'
VITE_APP_DOMAIN = 'file.ysaix.com'
VITE_APP_UPLOAD_API = 'http://192.168.2.52:7863'
VITE_APP_RES_FILE_PATH = 'https://file.ysaix.com:7868/src/assets/textbook/booktxt/'

View File

@ -7,6 +7,8 @@ VITE_APP_ENV = 'production'
# AIx融合数字管理系统/生产环境
VITE_APP_BASE_API = 'https://file.ysaix.com:7868/prod-api'
VITE_APP_DOMAIN = 'file.ysaix.com'
VITE_APP_UPLOAD_API = 'https://file.ysaix.com:7868/prod-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli

View File

@ -24,8 +24,8 @@ export default defineConfig({
server: {
proxy: {
'/dev-api': {
// target: 'http://27.128.240.72:7865',
target: 'http://192.168.2.52:7863',
target: 'http://27.128.240.72:7865',
// target: 'http://192.168.2.52:7863',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
}

View File

@ -4,15 +4,14 @@ import useUserStore from '@/store/modules/user'
const userStore = useUserStore()
const baseConfig = {
// Electron 设置cookie
// url: import.meta.env.VITE_APP_BASE_API,
url: 'https://file.ysaix.com:7868',
//cookie 名称 这里为 token
url: import.meta.env.VITE_APP_BUILD_BASE_PATH,
// url: 'https://file.ysaix.com:7868',
//cookie 名称 这里为 token
name: 'Admin-Token',
//cookie 值
value: userStore.token,
// 域名
domain: 'file.ysaix.com',
domain: import.meta.env.VITE_APP_DOMAIN
}
// 作业布置
@ -53,4 +52,4 @@ export default {
gk,
standard,
aiModel
}
}