Bang Hu
2 天以前 b3fedd4221b807a07058be9d5d5d8ba8998adbcb
vite.config.ts
@@ -33,8 +33,8 @@
      // target:'http://10.209.233.16/admin',//信创正式
      // target: 'http://36.133.126.111:7099/api', //测试
      // target: 'https://zynlpt.ccccltd.cn/admin', // 正式  (要打开changeOrigin和rewrite)
         target: 'http://localhost:8089',
      // target: 'http://36.133.126.111:7099/trade-api',
      //  target: 'http://localhost:8089',
       target: 'http://36.133.126.111:7099/trade-api',
      changeOrigin: true, // 允许跨域
      rewrite: (path) => path.replace(/^\/api/, '/'), //连测试环境要注释这行,连后端个人则打开
    },