From c3ff6c3821aa2759222011e69cca8944aa599edf Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 18 四月 2025 16:32:05 +0800
Subject: [PATCH] 代码初始化

---
 h5/utils/http.api.js                                                |    3 ++-
 h5/utils/http.interceptor.js                                        |   11 +++++++++++
 server/src/main/java/com/doumee/core/utils/qiyeweixin/QywxUtil.java |   10 ++++------
 3 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/h5/utils/http.api.js b/h5/utils/http.api.js
index 12132e5..eb34f82 100644
--- a/h5/utils/http.api.js
+++ b/h5/utils/http.api.js
@@ -1,3 +1,4 @@
+import { encryptData } from '@/utils/decryption.js'
 const install = (Vue, vm) => {
 	
 	uni.$u.http.setConfig((config) => {
@@ -6,7 +7,7 @@
 	    return config;
 	})
 	
-	let login = (data = {}) => vm.$u.http.post('web/member/loginH5', data);	// 鐧诲綍
+	let login = (data = {}) => vm.$u.http.post('web/member/loginH5', encryptData(data));	// 鐧诲綍
 	let categoryTree = (params = {}) => vm.$u.http.get('web/category/categoryTree', { params });	// 鏌ヨ鏍�
 	let workOrderCreate = (data = {}) => vm.$u.http.post('web/workOrder/create', data);	// 鍒涘缓宸ュ崟
 	let upload = (data = {}) => vm.$u.http.post('web/public/upload', data);	// 涓婁紶
diff --git a/h5/utils/http.interceptor.js b/h5/utils/http.interceptor.js
index ee462f4..9663813 100644
--- a/h5/utils/http.interceptor.js
+++ b/h5/utils/http.interceptor.js
@@ -1,3 +1,4 @@
+import { decryptedData } from '@/utils/decryption.js'
 const install = (Vue, vm) => {
 	// 鏄惁姝e湪鍒锋柊鐨勬爣璁�
 	let isRefreshing = false
@@ -49,6 +50,16 @@
 				duration: 2000
 			});
 		}
+		if (response.data.message) {
+			const tm = response.data.message
+			const list = tm.split(' ')
+			let msg = list[0]
+			if (list.length > 1 && response.data.data) {
+			  msg = decryptedData(list[1], list[0])
+			  response.data.data = decryptedData(list[1], response.data.data)
+			  response.data.message = msg
+			}
+		}
 		return response.data;
 	}, (response) => {
 		return Promise.reject(response)
diff --git a/server/src/main/java/com/doumee/core/utils/qiyeweixin/QywxUtil.java b/server/src/main/java/com/doumee/core/utils/qiyeweixin/QywxUtil.java
index 35b38e9..487fbf5 100644
--- a/server/src/main/java/com/doumee/core/utils/qiyeweixin/QywxUtil.java
+++ b/server/src/main/java/com/doumee/core/utils/qiyeweixin/QywxUtil.java
@@ -25,17 +25,15 @@
     private static JSONObject json = new JSONObject();
 
 
-    @Autowired
-    private SystemDictDataBiz systemDictDataBiz;
 
     private static QywxUtil qyUtil;
     @Value("${qiwei.serviceurl}")
-    private static String qiweiUrl;
+    private    String qiweiUrl;
 
     @PostConstruct
     private void init() {
         qyUtil = this;
-        systemDictDataBiz = qyUtil.systemDictDataBiz;
+//        QywxUtil.qiweiUrl =  serviceurl;
     }
 
 
@@ -161,7 +159,7 @@
             String res = null;
             try {
                 Map<String,String> headers = new HashMap<>();
-                res = HttpsUtil.postJson(qiweiUrl+url,param);
+                res = HttpsUtil.postJson(qyUtil.qiweiUrl+url,param);
                 QywxBaseResponse result = JSONObject.parseObject(res, typeReference.getType());
                 logResult(result,name);
                 return  result;
@@ -178,7 +176,7 @@
             String res = null;
             try {
                 Map<String,String> headers = new HashMap<>();
-                res = HttpsUtil.postJson(qiweiUrl+url,param);
+                res = HttpsUtil.postJson(qyUtil.qiweiUrl+url,param);
                 T result = JSONObject.parseObject(res, typeReference.getType());
 //                logResult(result,name);
                 return  result;

--
Gitblit v1.9.3