update url

This commit is contained in:
weichengwu 2025-11-16 19:42:02 +08:00
parent 41fbb0373f
commit 7ce142ffd1
3 changed files with 4 additions and 4 deletions

View File

@ -2,4 +2,4 @@
ENV = development
# 本地环境接口地址
VITE_API_URL = http://101.35.149.39:8000
VITE_API_URL = /api

View File

@ -2,4 +2,4 @@
ENV = production
# 线上环境接口地址
VITE_API_URL = https://nx.smartjinrui.cn/api
VITE_API_URL = /api

View File

@ -29,10 +29,10 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
hmr: true,
proxy: {
'/api': {
target: 'http://200.1.1.32:8000',
target: 'https://fucai-admin.smartjinrui.cn/api/',
ws: true,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
rewrite: (path) => path.replace(/^\/api/, '/'),
},
},
},