1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-04-30 22:29:01 +08:00

feat: 补充production环境变量

This commit is contained in:
zclzone 2024-05-29 21:54:41 +08:00
parent 905476abf7
commit 5766510ad9
2 changed files with 3 additions and 1 deletions

View File

@ -4,5 +4,7 @@ VITE_USE_HASH = 'false'
# 资源公共路径,需要以 /开头和结尾
VITE_PUBLIC_PATH = '/'
VITE_AXIOS_BASE_URL = '/api' # 用于代理
# 代理配置-target
VITE_PROXY_TARGET = 'http://localhost:8085'

View File

@ -118,7 +118,7 @@ const loginInfo = ref({
const captchaUrl = ref('')
const initCaptcha = throttle(() => {
captchaUrl.value = '/api/auth/captcha?' + Date.now()
captchaUrl.value = import.meta.env.VITE_AXIOS_BASE_URL + '/auth/captcha?' + Date.now()
}, 500)
const localLoginInfo = lStorage.get('loginInfo')