From 416b7c8bc2d9095b17e7a3c5fc239e1a5f107a30 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 01 二月 2024 11:51:15 +0800
Subject: [PATCH] 大接口加密

---
 src/utils/utils-datamanage.js |   17 ++++----
 src/utils/utils.js            |   53 --------------------------
 2 files changed, 8 insertions(+), 62 deletions(-)

diff --git a/src/utils/utils-datamanage.js b/src/utils/utils-datamanage.js
index b2daf02..ce94801 100644
--- a/src/utils/utils-datamanage.js
+++ b/src/utils/utils-datamanage.js
@@ -568,8 +568,6 @@
 
   let param = {
     func: 'sPC_Get_structured_data',
-    LText: _LText.join(' union all '),
-    LText_field: LText_field.join(' union all '),
     BID: BID,
     username: sessionStorage.getItem('User_Name') || '',
     fullName: sessionStorage.getItem('Full_Name') || ''
@@ -579,12 +577,13 @@
     param.menuname = config.MenuName
   }
 
-  let { LText, LText1, LText2 } = Utils.sPCInUpDeFormatOptions(param.LText)
-
-  param.LText1 = LText1
-  param.LText = LText
-  param.LText2 = LText2
-  param.LText_field = Utils.formatOptions(param.LText_field)
+  param.exec_type = 'y'
+  param.LText = Utils.formatOptions(_LText.join(' union all '))
+  param.custom_script = Utils.formatOptions(LText_field.join(' union all '))
+  // param.LText1 = LText1
+  // param.LText = LText
+  // param.LText2 = LText2
+  // param.LText_field = Utils.formatOptions(param.LText_field)
 
   if (config.cacheUseful === 'true') {
     param.time_type = config.timeUnit
@@ -596,7 +595,7 @@
   }
 
   param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-  param.secretkey = Utils.encrypt(param.LText, param.timestamp)
+  param.secretkey = Utils.encrypt('', param.timestamp)
 
   return param
 }
\ No newline at end of file
diff --git a/src/utils/utils.js b/src/utils/utils.js
index f2a7e49..61b28c5 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -171,59 +171,6 @@
   // }
 
   /**
-   * @description sPC_TableData_InUpDe sql鍔犲瘑
-   * @return {String}  value
-   */
-  static sPCInUpDeFormatOptions (value) {
-    if (!value) return {LText: '', LText1: '', LText2: ''}
-    let salt = 'minKe' // 鐩愬��
-
-    value = value.replace(/\n/ig, ' \n ')
-    // 鏇挎崲鍏抽敭瀛�
-    formatKeys.forEach(item => {
-      let reg = new RegExp('(^|\\s)' + item.key + '(\\s|$)', 'ig')
-      value = value.replace(reg, item.value)
-    })
-
-    // 1銆佹浛鎹�%绗︼紙鏁版嵁搴撲腑瑙f瀽鍚巗ql鎶ラ敊锛�
-    value = value.replace(/%/ig, ' mpercent ')
-    // 澶栬仈鏁版嵁搴撴浛鎹�
-    if (window.GLOB.externalDatabase !== null) {
-      value = value.replace(/@db@/ig, window.GLOB.externalDatabase)
-    }
-
-    let encodesql = (val) => {
-      if (!val) return ''
-
-      let _value = window.btoa(window.encodeURIComponent(val))
-
-      // 鎻掑叆瀛楃
-      let index = Math.floor(_value.length / 2)
-      _value = _value.slice(0, index) + salt + _value.slice(index)
-
-      // base64鍔犲瘑
-      return window.btoa(_value)
-    }
-
-    let len = value.length
-    // 娉細LText 涓� LText1 椤哄簭棰犲��
-    if (len > 1000) {
-      let limit = Math.floor(len / 3)
-      return {
-        LText1: encodesql(value.substring(0, limit)),
-        LText: encodesql(value.substring(limit, limit * 2)),
-        LText2: encodesql(value.substring(limit * 2))
-      }
-    } else {
-      return {
-        LText1: '',
-        LText: encodesql(value),
-        LText2: ''
-      }
-    }
-  }
-
-  /**
    * @description 鍒濆鍖栨悳绱㈡潯浠跺垵濮嬪��
    * @param {Array}   searches     鎼滅储鏉′欢
    */

--
Gitblit v1.8.0