CD配唱片
2025-04-23 f92475cd259c5f367a2fd40f1131edb060c3ebbf
vite.config.js
@@ -16,26 +16,26 @@
  // 根据环境变量动态设置代理
  const proxyConfig = () => {
    const devProxy = {
      "/dev-api": {
        target: "http://192.168.50.86:8080", // 开发环境的后端地址
      "/prod-api": {
        target: "http://192.168.50.160:8080", // 开发环境的后端地址
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/dev-api/, ""),
        rewrite: (path) => path.replace(/^\/prod-api/, ""),
      },
    };
    const testProxy = {
      "/stage-api": {
      "/prod-api": {
        target: "http://192.168.50.160:8080", // 测试环境的后端地址
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/stage-api/, ""),
        rewrite: (path) => path.replace(/^\/prod-api/, ""),
      },
    };
    const prodProxy = {
      "/stage-api": {
      "/prod-api": {
        target: "http://192.168.50.160:8080", // 测试环境的后端地址
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/stage-api/, ""),
        rewrite: (path) => path.replace(/^\/prod-api/, ""),
      },
    };