From b0530ed9211230227a8f94e394eda779d5ae5fc1 Mon Sep 17 00:00:00 2001
From: birt <2499248221@qq.com>
Date: 星期日, 13 四月 2025 01:51:52 +0800
Subject: [PATCH] birtzhang

---
 zhitan-vue/vite.config.js |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/zhitan-vue/vite.config.js b/zhitan-vue/vite.config.js
index 1357748..a1ac844 100644
--- a/zhitan-vue/vite.config.js
+++ b/zhitan-vue/vite.config.js
@@ -4,9 +4,9 @@
 
 // https://vitejs.dev/config/
 export default defineConfig(({ mode, command }) => {
-  mode='production'
+  mode = "production"
   const env = loadEnv(mode, process.cwd())
-  console.log(mode,'==========env')
+  console.log(mode, "==========env")
   const { VITE_APP_ENV } = env
   return {
     // 閮ㄧ讲鐢熶骇鐜鍜屽紑鍙戠幆澧冧笅鐨刄RL銆�
@@ -33,10 +33,15 @@
       proxy: {
         // https://cn.vitejs.dev/config/#server-proxy
         "/dev-api": {
-          target: "http://139.159.201.118:8201",
+          target: "https://demo-ems.zhitancloud.com",
           changeOrigin: true,
-          rewrite: (p) => p.replace(/^\/dev-api/, ""),
+          rewrite: (p) => p.replace(/^\/dev-api/, "/prod-api"),
         },
+        "/prod-api": {
+          target: "https://demo-ems.zhitancloud.com",
+          changeOrigin: true,
+          secure: true,
+        }
       },
     },
     //fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file

--
Gitblit v1.9.3