fix: 删除多余代码
This commit is contained in:
parent
6ee73d323e
commit
61baae1cfc
@ -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 // 创建直播的时候是否允许创建竖屏
|
||||
};
|
||||
|
||||
@ -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));
|
||||
};
|
||||
}
|
||||
export function cryptoDecode(str) {
|
||||
return base64(aesEncode(str, data.key, data.iv));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user