From 130afe2d26891f9d4c2edbe980603c93f6fd0d5c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 05 二月 2024 11:12:48 +0800
Subject: [PATCH] 2024-02-05

---
 src/utils/timer-task.js |   11 +++++++----
 src/utils/utils.js      |    4 ++++
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/utils/timer-task.js b/src/utils/timer-task.js
index c556e72..8faff16 100644
--- a/src/utils/timer-task.js
+++ b/src/utils/timer-task.js
@@ -28,13 +28,16 @@
         func: 's_get_timers_role',
         LText: `select '${window.GLOB.appkey || ''}','${uuid}'`, // 鍙敤鍋氬瘑閽ラ獙璇侊紝宸叉棤鏁�
         timer_type: interval,
-        component_id: uuid,
-        exec_type: 'x'
+        component_id: uuid
+      }
+
+      if (window.GLOB.execType === 'x') {
+        _param.exec_type = 'x'
       }
       
       _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-      _param.LText = Utils.formatOptions(_param.LText, 'x')
-      _param.secretkey = Utils.encrypt('', _param.timestamp)
+      _param.LText = Utils.formatOptions(_param.LText, _param.exec_type)
+      _param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : _param.LText, _param.timestamp)
   
       Api.getSystemConfig(_param).then(result => {
         if (!result.status) {
diff --git a/src/utils/utils.js b/src/utils/utils.js
index a0b492c..54eec04 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -140,6 +140,10 @@
 
       let encrypted = CryptoJS.AES.encrypt(srcs, key, { iv: iv, mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 })
       value = encrypted.toString()
+
+      // let wordArray = CryptoJS.enc.Base64.parse(value)
+      // let decryptedWordArray = CryptoJS.AES.decrypt({ ciphertext: wordArray }, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 })
+      // let decryptedText = CryptoJS.enc.Utf8.stringify(decryptedWordArray)
     } else {
       // 鏇挎崲鍏抽敭瀛�
       formatKeys.forEach(item => {

--
Gitblit v1.8.0