From 7ce142ffd1b97751441dce274892dde72c02eda0 Mon Sep 17 00:00:00 2001 From: weichengwu Date: Sun, 16 Nov 2025 19:42:02 +0800 Subject: [PATCH] update url --- .env.development | 2 +- .env.production | 2 +- vite.config.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.env.development b/.env.development index 85e6424..715eb2b 100644 --- a/.env.development +++ b/.env.development @@ -2,4 +2,4 @@ ENV = development # 本地环境接口地址 -VITE_API_URL = http://101.35.149.39:8000 \ No newline at end of file +VITE_API_URL = /api \ No newline at end of file diff --git a/.env.production b/.env.production index 6440f08..3220e64 100644 --- a/.env.production +++ b/.env.production @@ -2,4 +2,4 @@ ENV = production # 线上环境接口地址 -VITE_API_URL = https://nx.smartjinrui.cn/api \ No newline at end of file +VITE_API_URL = /api \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index dd76cb6..0ca87dd 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -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/, '/'), }, }, },