From 61baae1cfc81c1f5cdb155cdc4230b8ddb038155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kaizheng=28=E9=83=91=E5=87=AF=29?= Date: Thu, 20 Feb 2025 14:49:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/js/config.js | 5 ++--- src/utils/crypto.js | 33 ++++++++++++--------------------- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/public/static/js/config.js b/public/static/js/config.js index 3076848..a8ea145 100644 --- a/public/static/js/config.js +++ b/public/static/js/config.js @@ -1,6 +1,5 @@ window.config = { - qwUserPhotoUrl: "https://workwxbench.test.upchina.com/#/userinfo?corpId=ww7b2c628cf4c199eb&userId=", - // 生产https://workwxbench-open.uptougu.com/#/userinfo?corpId=wwc6af46b4e2aa04b0&userId=${uid} - webAuthUrl: "http://passport.test.upchina.com", // 登录跳转地址 + qwUserPhotoUrl: "", + webAuthUrl: "", // 登录跳转地址 openPortraitScreen: true // 创建直播的时候是否允许创建竖屏 }; diff --git a/src/utils/crypto.js b/src/utils/crypto.js index 74e6656..750a0eb 100644 --- a/src/utils/crypto.js +++ b/src/utils/crypto.js @@ -1,13 +1,4 @@ -/* - * @Descripttion: - * @version: - * @Author: lingzhili - * @email: lingzhili@upchina.com - * @Date: 2023-08-21 10:53:06 - * @LastEditors: lingzhili - * @LastEditTime: 2023-08-21 15:37:47 - */ -import CryptoJS from 'crypto-js'; +import CryptoJS from "crypto-js"; // const key = 'ew0ov3n1xurvhlhl' // const iv = 'gbb9qknndntteqc1' @@ -26,25 +17,25 @@ import CryptoJS from 'crypto-js'; const data = { key: "ew0ov3n1xurvhlhl", - iv: "gbb9qknndntteqc1", + iv: "gbb9qknndntteqc1" }; -export function utf8Parse (str) { +export function utf8Parse(str) { return CryptoJS.enc.Utf8.parse(str); -}; -export function base64 (str){ +} +export function base64(str) { return CryptoJS.enc.Base64.stringify(utf8Parse(str)).toString(); -}; +} -export function aesEncode(str, key, iv){ +export function aesEncode(str, key, iv) { const result = CryptoJS.AES.encrypt(utf8Parse(str), utf8Parse(key), { mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7, - iv: utf8Parse(iv), + iv: utf8Parse(iv) }).toString(); return result; -}; -export function cryptoDecode (str){ - return base64(aesEncode(str, data.key, data.iv)); -}; \ No newline at end of file +} +export function cryptoDecode(str) { + return base64(aesEncode(str, data.key, data.iv)); +}