Browse Source

[FE] 修改代理配置

chenxr3 4 years ago
parent
commit
9c8ac5ff51

+ 14 - 13
security-protection-platform/.aid/aid.js

@ -55,17 +55,18 @@ module.exports = {
55 55
  //hmrPath: subappURL, // 作为子应用必须启用
56 56
  //imagePrefix: url => `${subappURL}/asset/image/${url}`, // 作为子应用必须启用
57 57
  //fontPrefix: url => `${subappURL}/asset/font/${url}`, // 作为子应用必须启用
58
  outputPrefix: '/',// 构建后index.html中资源路径的前缀
59
  proxy: [
60
    {
61
      url: '/sp',
62
      options: {
63
        target: 'http://10.19.90.34:8018',
64
        changeOrigin: true,
65
        pathRewrite: {
66
          '^/sp': '/'
67
        }
68
      }
69
    },
70
  ]
58
  outputPrefix: '/'// 构建后index.html中资源路径的前缀
59
  // ,
60
  // proxy: [
61
  //   {
62
  //     url: '/sp',
63
  //     options: {
64
  //       target: 'http://10.19.90.34:8018',
65
  //       changeOrigin: true,
66
  //       pathRewrite: {
67
  //         '^/sp': '/'
68
  //       }
69
  //     }
70
  //   },
71
  // ]
71 72
}

+ 2 - 2
security-protection-platform/src/conf/axios.config.js

@ -39,9 +39,9 @@ const conf = {
39 39
  },
40 40
  root: {
41 41
    default: {
42
      // baseURL: 'http://10.19.90.34:8018'
42
      baseURL: 'http://10.19.90.34:8018'
43 43
      // baseURL: 'http://localhost:8018'
44
      baseURL: '/sp'
44
      // baseURL: '/sp'
45 45
    },
46 46
    picurl: {
47 47
      baseURL: 'http://10.19.90.34:19000/tool-image/'