Browse Source

[完善]修改初始密码

dev
邵佳豪 3 years ago
parent
commit
d2a447f4e5
  1. 3542
      package-lock.json
  2. 9
      src/app/pages/home/home.component.ts
  3. 1
      src/app/pages/login/login.component.ts

3542
package-lock.json generated

File diff suppressed because it is too large Load Diff

9
src/app/pages/home/home.component.ts

@ -93,7 +93,11 @@ export class HomeComponent implements OnInit {
this.userName = JSON.parse(sessionStorage.getItem('userdata')).userName this.userName = JSON.parse(sessionStorage.getItem('userdata')).userName
} }
this.changePasswordPopup()
if(sessionStorage.getItem('isDefaultPassword') == 'true'){
this.changePasswordPopup()
}
} }
//初次登陆修改密码弹窗 //初次登陆修改密码弹窗
@ -120,8 +124,7 @@ export class HomeComponent implements OnInit {
this.isConfirmLoading = false; this.isConfirmLoading = false;
this.isVisible = false; this.isVisible = false;
//清除sessionStorage //清除sessionStorage
sessionStorage.removeItem('isDefaultPassword')
}, err => { }, err => {
this.message.create('warning', err.error.error.message); this.message.create('warning', err.error.error.message);
this.isConfirmLoading = false; this.isConfirmLoading = false;

1
src/app/pages/login/login.component.ts

@ -113,6 +113,7 @@ export class LoginComponent implements OnInit {
console.log('GetCurrentLoginInformations', data.result) console.log('GetCurrentLoginInformations', data.result)
sessionStorage.setItem('userdata', JSON.stringify(data.result.user)) sessionStorage.setItem('userdata', JSON.stringify(data.result.user))
sessionStorage.setItem('userdataOfgasstation', JSON.stringify(data.result.user)) sessionStorage.setItem('userdataOfgasstation', JSON.stringify(data.result.user))
sessionStorage.setItem('isDefaultPassword', JSON.stringify(data.result.user.isDefaultPassword))
this.isLoading = false; this.isLoading = false;
//记住密码 //记住密码
this.rememberInfo() this.rememberInfo()

Loading…
Cancel
Save