From 1a176e4bdba485301385caac1a29102e598d25cc Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 13 五月 2025 11:32:02 +0800
Subject: [PATCH] 2025-05-13

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

diff --git a/src/setupProxy.js b/src/setupProxy.js
index c5707d5..0419b88 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,27 @@
 //     }
 //   }))
 
-//   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
+//   }))
+
+  app.use(proxy('/star', {
+    target: `http://dms.worx.cn/webapi`,
+    secure: false,
+    changeOrigin: true
+  }))
+}

--
Gitblit v1.8.0