mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-26 17:21:53 +08:00
fix: rememberMe bug
This commit is contained in:
parent
efcbd1ab68
commit
15ef2dbf78
@ -47,7 +47,9 @@ export type LoginFormType = {
|
|||||||
|
|
||||||
export const getLoginForm = () => {
|
export const getLoginForm = () => {
|
||||||
const loginForm: LoginFormType = wsCache.get(LoginFormKey)
|
const loginForm: LoginFormType = wsCache.get(LoginFormKey)
|
||||||
loginForm.password = decrypt(loginForm.password) as string
|
if (loginForm) {
|
||||||
|
loginForm.password = decrypt(loginForm.password) as string
|
||||||
|
}
|
||||||
return loginForm
|
return loginForm
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,13 +215,15 @@ const getTenantId = async () => {
|
|||||||
}
|
}
|
||||||
// 记住我
|
// 记住我
|
||||||
const getCookie = () => {
|
const getCookie = () => {
|
||||||
const { username, password, rememberMe, tenantName } = authUtil.getLoginForm()
|
const loginForm = authUtil.getLoginForm()
|
||||||
loginData.loginForm = {
|
if (loginForm) {
|
||||||
...loginData.loginForm,
|
loginData.loginForm = {
|
||||||
username: username ? username : loginData.loginForm.username,
|
...loginData.loginForm,
|
||||||
password: password ? password : loginData.loginForm.password,
|
username: loginForm.username ? loginForm.username : loginData.loginForm.username,
|
||||||
rememberMe: rememberMe ? true : false,
|
password: loginForm.password ? loginForm.password : loginData.loginForm.password,
|
||||||
tenantName: tenantName ? tenantName : loginData.loginForm.tenantName
|
rememberMe: loginForm.rememberMe ? true : false,
|
||||||
|
tenantName: loginForm.tenantName ? loginForm.tenantName : loginData.loginForm.tenantName
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 登录
|
// 登录
|
||||||
|
Loading…
Reference in New Issue
Block a user