zhitan-vue/vite.config.js
@@ -4,9 +4,9 @@
// https://vitejs.dev/config/
export default defineConfig(({ mode, command }) => {
  mode='production'
  mode = "development"
  const env = loadEnv(mode, process.cwd())
  console.log(mode,'==========env')
  console.log(mode, "==========env")
  const { VITE_APP_ENV } = env
  return {
    // 部署生产环境和开发环境下的URL。
@@ -33,9 +33,14 @@
      proxy: {
        // https://cn.vitejs.dev/config/#server-proxy
        "/dev-api": {
          target: "http://139.159.201.118:8201",
          target: "http://localhost:8088",
          changeOrigin: true,
          rewrite: (p) => p.replace(/^\/dev-api/, ""),
          rewrite: (p) => p.replace(/^\/dev-api/, "/"),
        },
        "/prod-api": {
          target: "http://localhost:8088",
          changeOrigin: true,
          secure: true,
        },
      },
    },