king
2020-12-25 e843aabbda5e8761b6a8af0fe85119bdcf5b3fe8
src/setupProxy.js
@@ -1,8 +1,6 @@
const proxy = require('http-proxy-middleware')
const host = 'http://qingqiumarket.cn'
const service = 'mkwms/'
// const host = 'http://cloud.mk9h.cn'
// const service = ''
const host = 'http://bms-test.kresstools.cn'
const service = 'oc/'
module.exports = function(app) {
  app.use(proxy('/webapi', { 
@@ -24,7 +22,7 @@
    }
  }))
  app.use(proxy('/Upload', { // 登录接口
  app.use(proxy('/Upload', {
    target: `${host}/${service}zh-CN/Home/Upload`,
    secure: false,
    changeOrigin: true,
@@ -33,12 +31,22 @@
    }
  }))
  app.use(proxy('/local', {
    target: 'http://127.0.0.1:8888',
  app.use(proxy('/wxpay', {
    target: `${host}/${service}wxpay`,
    secure: false,
    changeOrigin: true,
    pathRewrite: {
    '^/local': '/'
    '^/wxpay': '/'
    }
  }))
  app.use(proxy('/Home', {
    target: `${host}/Home`,
    secure: false,
    changeOrigin: true,
    pathRewrite: {
    '^/Home': '/'
    }
    // cookieDomainRewrite: "http://localhost:3000"
  }))
}