feat(projects): 新增静态路由

This commit is contained in:
Soybean
2022-03-30 01:19:37 +08:00
parent bbfdcc8276
commit ca2dfa6185
34 changed files with 1591 additions and 1875 deletions

View File

@@ -5,7 +5,6 @@ const CryptoSecret = '__CryptoJS_Secret__';
/**
* 加密数据
* @param data - 数据
* @param secret - 密钥
*/
export function encrypto(data: any) {
const newData = JSON.stringify(data);
@@ -14,11 +13,10 @@ export function encrypto(data: any) {
/**
* 解密数据
* @param ciphertext - 密文
* @param secret - 密钥
* @param cipherText - 密文
*/
export function decrypto(ciphertext: string) {
const bytes = CryptoJS.AES.decrypt(ciphertext, CryptoSecret);
export function decrypto(cipherText: string) {
const bytes = CryptoJS.AES.decrypt(cipherText, CryptoSecret);
const originalText = bytes.toString(CryptoJS.enc.Utf8);
if (originalText) {
return JSON.parse(originalText);