| | |
| | | const proxy = require('http-proxy-middleware') |
| | | const host = 'http://qingqiumarket.cn' |
| | | const service = 'mkwms/' |
| | | // const host = 'http://cloud.mk9h.cn' |
| | | // const service = '' |
| | | |
| | | module.exports = function(app) { |
| | | app.use(proxy('/webapi', { |
| | | target: 'http://qingqiumarket.cn/MKWMS/webapi', |
| | | target: `${host}/${service}webapi`, |
| | | secure: false, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | |
| | | })) |
| | | |
| | | app.use(proxy('/zh-CN', { // 登录接口 |
| | | target: 'http://qingqiumarket.cn/MKWMS/zh-CN', |
| | | target: `${host}/${service}zh-CN`, |
| | | secure: false, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | |
| | | } |
| | | })) |
| | | |
| | | app.use(proxy('/mksepc', { |
| | | target: 'http://minkesoft.com/mksepc', |
| | | app.use(proxy('/Upload', { |
| | | target: `${host}/${service}zh-CN/Home/Upload`, |
| | | secure: false, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/mksepc': '/' |
| | | '^/Upload': '/' |
| | | } |
| | | })) |
| | | |
| | | 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': '/' |
| | | } |
| | | })) |
| | | } |