From fc2ea3324b398398b1c1e468ad7d55a9df8a88f8 Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Thu, 20 Feb 2025 16:36:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=B7=E5=81=87=EF=BC=8C=E5=87=BA=E5=B7=AE?= =?UTF-8?q?=EF=BC=8C=E8=BD=AE=E4=BC=91=EF=BC=8C=E4=B8=B4=E6=97=B6=E5=A4=96?= =?UTF-8?q?=E5=87=BA=20=E6=97=B6=E9=97=B4=E4=B8=8D=E8=83=BD=E4=BA=A4?= =?UTF-8?q?=E5=8F=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/aescbc.js | 18 +++++++++++++++++ src/views/bns-kkFile-preview.vue | 5 +++-- src/views/process/evection/index.vue | 23 +++++++++++----------- src/views/process/leaveReporting/index.vue | 18 ++++++++--------- src/views/process/outApply/index.vue | 9 +++++---- src/views/process/restApply/index.vue | 9 +++++---- 6 files changed, 52 insertions(+), 30 deletions(-) diff --git a/src/utils/aescbc.js b/src/utils/aescbc.js index 88096a4..ece1c7d 100644 --- a/src/utils/aescbc.js +++ b/src/utils/aescbc.js @@ -29,6 +29,24 @@ export const encryptCBC = function(word) { }) return encrypted.toString() } + + +/** + * 加密 + * @param word + * @returns {string} + */ +export const encryptCBCToken = function(word) { + const srcs = CryptoJS.enc.Utf8.parse(word) + const encrypted = CryptoJS.AES.encrypt(srcs, cbc_key, { + iv: cbc_iv, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.Pkcs7 + }) + return encrypted.toString() +} + + /** * 解密 * @param word diff --git a/src/views/bns-kkFile-preview.vue b/src/views/bns-kkFile-preview.vue index 048510b..caccfd6 100644 --- a/src/views/bns-kkFile-preview.vue +++ b/src/views/bns-kkFile-preview.vue @@ -12,7 +12,7 @@