From cb5cbb5128adc1814e43780b92faab447bc70a8d Mon Sep 17 00:00:00 2001
From: yanghb <yanghb>
Date: 星期五, 21 四月 2023 11:29:03 +0800
Subject: [PATCH] 代码调整
---
ManagementTravel/guns-admin/src/main/webapp/static/modular/system/tProblem/tProblem.js | 39 ++++++++++++++++++++++++++++++++++++++-
1 files changed, 38 insertions(+), 1 deletions(-)
diff --git a/ManagementTravel/guns-admin/src/main/webapp/static/modular/system/tProblem/tProblem.js b/ManagementTravel/guns-admin/src/main/webapp/static/modular/system/tProblem/tProblem.js
index 6e38610..e02ae55 100644
--- a/ManagementTravel/guns-admin/src/main/webapp/static/modular/system/tProblem/tProblem.js
+++ b/ManagementTravel/guns-admin/src/main/webapp/static/modular/system/tProblem/tProblem.js
@@ -39,7 +39,7 @@
formatter: function (value, row) {
var btn = "";
if(row.userPhone != '' && row.userPhone != null) {
- btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + row.userPhone + '" onfocus="TUser.tooltip()">' + row.userPhone + '</p>']
+ btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + decryptAES(row.userPhone) + '" onfocus="TUser.tooltip()">' + decryptAES(row.userPhone) + '</p>']
}
return btn;
}
@@ -158,6 +158,43 @@
}
};
+var key = CryptoJS.enc.Utf8.parse("xqT86jictTPpHMem");
+var iv = CryptoJS.enc.Utf8.parse("xqT86jicxqT86jic");
+
+//aes加密
+function encryptAES(context) {
+ if(null == context || '' == context){
+ return context;
+ }
+ var encrypted = '';
+ if (typeof(context) == 'string') {
+
+ }else if(typeof(context) == 'object'){
+ context = JSON.stringify(context);
+ }
+ var srcs = CryptoJS.enc.Utf8.parse(context);
+ encrypted = CryptoJS.AES.encrypt(srcs, key, {
+ iv: iv,
+ mode: CryptoJS.mode.CBC,
+ padding: CryptoJS.pad.Pkcs7
+ });
+ return encrypted.toString();
+}
+// aes解密
+function decryptAES(context) {
+ if(null == context || '' == context){
+ return context;
+ }
+ var decrypt = CryptoJS.AES.decrypt(context, key, {
+ iv: iv,
+ mode: CryptoJS.mode.CBC,
+ padding: CryptoJS.pad.Pkcs7
+ });
+ var decryptedStr = decrypt.toString(CryptoJS.enc.Utf8);
+ return decryptedStr.toString();
+}
+
+
/**
* 查询用户留言管理列表
*/
--
Gitblit v1.7.1