From 24842b40de5cd60700bf69dfd38a0332f5431e36 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 23 五月 2025 10:55:07 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/setupProxy.js |   36 +++++++++++++++++-------------------
 1 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/src/setupProxy.js b/src/setupProxy.js
index c5707d5..4d69c53 100644
--- a/src/setupProxy.js
+++ b/src/setupProxy.js
@@ -1,9 +1,7 @@
-// const proxy = require('http-proxy-middleware')
-// const host = 'http://qingqiumarket.cn'
-// const service = 'mkwms/'
+const proxy = require('http-proxy-middleware')
+const options = require('../public/options.json')
 
-module.exports = function() {}
-// module.exports = function(app) {
+module.exports = function(app) {
 //   app.use(proxy('/webapi', { 
 //     target: `${host}/${service}webapi`,
 //     secure: false,
@@ -32,21 +30,21 @@
 //     }
 //   }))
 
-//   app.use(proxy('/wxpay', {
-//     target: `${host}/${service}wxpay`,
-//     secure: false,
-//     changeOrigin: true,
-//     pathRewrite: {
-//     '^/wxpay': '/'
-//     }
-//   }))
+  app.use(proxy('/wxpay', {
+    target: `${options.host}/${options.service}`,
+    secure: false,
+    changeOrigin: true
+  }))
 
 //   app.use(proxy('/trans', {
-//     target: `${host}/${service}trans`,
+//     target: `${host}/${service}`,
 //     secure: false,
-//     changeOrigin: true,
-//     pathRewrite: {
-//     '^/trans': '/'
-//     }
+//     changeOrigin: true
 //   }))
-// }
\ No newline at end of file
+
+//   app.use(proxy('/api', { // 鏃疯闈㈡澘鏈烘帴鍙f祴璇�
+//     target: `http://192.168.1.66:80`,
+//     secure: false,
+//     changeOrigin: true
+//   }))
+}
\ No newline at end of file

--
Gitblit v1.8.0