|
@@ -180,21 +180,7 @@ export default {
|
|
|
this.getPhoneCode();//获取手机号区号
|
|
|
},
|
|
|
mounted(){
|
|
|
- const timeKey = localStorage.getItem("timeKey")
|
|
|
- if(timeKey&&this.checkTimeKey(Number(timeKey))){
|
|
|
- let userAccount = localStorage.getItem("account") || null;
|
|
|
- let userCheckPass = localStorage.getItem("checkPass") || null;
|
|
|
- if (userAccount) {
|
|
|
- /* this.ruleForm.account = this.b.decode(userAccount);
|
|
|
- this.ruleForm.checkPass = this.b.decode(userCheckPass);
|
|
|
- this.checked = true; */
|
|
|
- this.$refs.ordinaryModel.form = {
|
|
|
- account:this.b.decode(userAccount),
|
|
|
- checkPass:this.b.decode(userCheckPass),
|
|
|
- checked:true
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ this.getRememberedInfo()
|
|
|
},
|
|
|
methods: {
|
|
|
keyupSubmit() {
|
|
@@ -299,9 +285,11 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
handleClick(tab) {
|
|
|
- console.log('a',tab)
|
|
|
//调用对应model的init方法
|
|
|
this.$refs[tab.name]&&this.$refs[tab.name].modelInit()
|
|
|
+ if(tab.name==='ordinaryModel'){
|
|
|
+ this.getRememberedInfo()
|
|
|
+ }
|
|
|
},
|
|
|
changeModel(model){
|
|
|
this.activeModel = model
|
|
@@ -454,8 +442,22 @@ export default {
|
|
|
path = await this.getOtherRolePath("myCalendar");
|
|
|
}
|
|
|
this.$router.push({ path });
|
|
|
+ },
|
|
|
+ //获取用户记住的账号密码 如果有
|
|
|
+ getRememberedInfo(){
|
|
|
+ const timeKey = localStorage.getItem("timeKey")
|
|
|
+ if(timeKey&&this.checkTimeKey(Number(timeKey))){
|
|
|
+ let userAccount = localStorage.getItem("account") || null;
|
|
|
+ let userCheckPass = localStorage.getItem("checkPass") || null;
|
|
|
+ if (userAccount) {
|
|
|
+ this.$refs.ordinaryModel.form = {
|
|
|
+ account:this.b.decode(userAccount),
|
|
|
+ checkPass:this.b.decode(userCheckPass),
|
|
|
+ checked:true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
destroyed() {
|
|
|
document.onkeydown = null;
|