| | |
| | | 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: { |
| | |
| | | })) |
| | | |
| | | app.use(proxy('/zh-CN', { // 登录接口 |
| | | target: 'http://qingqiumarket.cn/MKWMS/zh-CN', |
| | | target: `http://qingqiumarket.cn/${service}/zh-CN`, |
| | | secure: false, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/zh-CN': '/' |
| | | } |
| | | })) |
| | | |
| | | app.use(proxy('/mksepc', { |
| | | target: 'http://minkesoft.com/mksepc', |
| | | secure: false, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | '^/mksepc': '/' |
| | | } |
| | | })) |
| | | |