feat: 新增图表独立配置混合

This commit is contained in:
mtruning
2022-02-26 17:38:24 +08:00
parent f8095ca52a
commit 4e9e492c29
43 changed files with 271 additions and 170 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import * as CryptoJS from 'crypto-ts'
export default {
AES_KEY: 'mt',
encode(data: string): string {
cryptoEncode(data: string): string {
if (typeof data !== 'string') return ''
// 加密
const key = CryptoJS.enc.Utf8.parse(this.AES_KEY)
@@ -15,7 +15,7 @@ export default {
return encryptedData.toString()
},
// 解密
decode(data: string): string {
cryptoDecode(data: string): string {
if (typeof data !== 'string') return ''
const encryptedHexStr = CryptoJS.enc.Utf8.parse(data)
const encryptedBase64Str = CryptoJS.enc.Utf8.stringify(encryptedHexStr)