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