From 12c4dd8bb0bb4c523dcf2fbb81191a7f3556a430 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 15 一月 2020 12:50:22 +0800 Subject: [PATCH] 2020-01-15 --- src/setupProxy.js | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/setupProxy.js b/src/setupProxy.js index f358dbc..5c34ad2 100644 --- a/src/setupProxy.js +++ b/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': '/' } })) -- Gitblit v1.8.0