p-honggang.li
9 天以前 bd125eecd57d2f4e559c6170d20157591300fe3d
vite.config.ts
@@ -17,10 +17,10 @@
const viteConfig = ({ mode }: ConfigEnv): UserConfig => {
  let proxy: Record<string, string | ProxyOptions> = {}
  proxy = {
    '/api/test': {
    '/api/report': {
      target: 'http://36.133.126.111:7099',
      changeOrigin: true,
      rewrite: (path) => path.replace(/^\/api\/test/, '/api'),
      // rewrite: (path) => path.replace(/^\/api/, '/'),
    },
    '/api': {
      // target: 'http://192.168.0.38:8088', // 李
@@ -28,7 +28,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:8080',
      //    target: 'http://localhost:8080',
         target: 'http://36.133.126.111:7099/trade-api',
      changeOrigin: true, // 允许跨域
      rewrite: (path) => path.replace(/^\/api/, '/'), //连测试环境要注释这行,连后端个人则打开
    },
@@ -76,7 +77,7 @@
        '@': path.resolve(__dirname, './src'),
      },
    },
    base: '/manage/',
    base: '/trade/',
    server: {
      host: '0.0.0.0',
      port: 1000,