1. 登录模块新增软key登录模块代码
parent
33c491befa
commit
06c3761d05
|
@ -120,7 +120,10 @@ const activeName = ref('UKEY')
|
|||
const loginForm = reactive({
|
||||
account: '',
|
||||
password: '',
|
||||
ukeyPassword: ''
|
||||
ukeyPassword: '',
|
||||
saccount: '',
|
||||
spassword: ''
|
||||
|
||||
})
|
||||
const remember = ref(false)
|
||||
const loading = ref(false)
|
||||
|
@ -136,6 +139,8 @@ const init = () => {
|
|||
const obj = JSON.parse(local)
|
||||
loginForm.account = obj.account
|
||||
loginForm.password = decrypt(obj.password)
|
||||
loginForm.saccount = obj.saccount
|
||||
loginForm.spassword = decrypt(obj.spassword)
|
||||
remember.value = true
|
||||
}
|
||||
}
|
||||
|
@ -147,7 +152,9 @@ function goLogin(data: any) {
|
|||
if (unref(remember)) {
|
||||
const obj = {
|
||||
account: loginForm.account,
|
||||
password: encrypt(loginForm.password)
|
||||
password: encrypt(loginForm.password),
|
||||
saccount: loginForm.saccount,
|
||||
spassword: encrypt(loginForm.spassword)
|
||||
}
|
||||
localStorage.setItem('cmcLoginData', JSON.stringify(obj))
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue