mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-01-03 03:45:28 +08:00
登录密码加密解码报错处理
This commit is contained in:
@ -1,4 +1,19 @@
|
||||
import { getAction } from '@/api/manage'
|
||||
import { ENCRYPTED_STRING } from "@/store/mutation-types"
|
||||
import Vue from 'vue'
|
||||
|
||||
/**
|
||||
* 获取加密字符串,并对结果进行缓存
|
||||
*/
|
||||
export function getEncryptedString() {
|
||||
return getAction("/sys/getEncryptedString",{}).then((res)=>{
|
||||
let encryptedString = {};
|
||||
encryptedString.key = res.result.key;
|
||||
encryptedString.iv = res.result.iv;
|
||||
Vue.ls.set(ENCRYPTED_STRING, encryptedString, 7 * 24 * 60 * 60 * 1000);
|
||||
return encryptedString;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* AES加密 :字符串 key iv 返回base64
|
||||
|
||||
Reference in New Issue
Block a user