king
2020-01-19 b35e3f0bacdbadf5823e06fe8dc6e047089aae38
src/setupProxy.js
@@ -1,8 +1,9 @@
const proxy = require('http-proxy-middleware')
const service = 'mkwms'
module.exports = function(app) {
  app.use(proxy('/webapi', { 
    target: 'http://qingqiumarket.cn/MKWMS/webapi',
    target: `http://qingqiumarket.cn/${service}/webapi`,
    secure: false,
    changeOrigin: true,
    pathRewrite: {
@@ -12,7 +13,7 @@
  }))
  
  app.use(proxy('/zh-CN', { // 登录接口
    target: 'http://qingqiumarket.cn/MKWMS/zh-CN',
    target: `http://qingqiumarket.cn/${service}/zh-CN`,
    secure: false,
    changeOrigin: true,
    pathRewrite: {
@@ -20,12 +21,12 @@
    }
  }))
  app.use(proxy('/mksepc', {
    target: 'http://minkesoft.com/mksepc',
  app.use(proxy('/Upload', { // 登录接口
    target: `http://qingqiumarket.cn/${service}/zh-CN/Home/Upload`,
    secure: false,
    changeOrigin: true,
    pathRewrite: {
    '^/mksepc': '/'
    '^/Upload': '/'
    }
  }))