Commit 67bd3dc7 authored by 郭志伟's avatar 郭志伟

fix: 未登录下单出现本人信息不能修改问题;健康告知高度问题修复

parent 583a37a6
...@@ -231,14 +231,18 @@ export default { ...@@ -231,14 +231,18 @@ export default {
return; return;
} }
if (localStorage.get("mongoToken")) { if (localStorage.get("mongoToken")) {
this.$refs.insureForm.getFamilyList_I().then(() => { this.$refs.insureForm.getFamilyList(true).then(() => {
setTimeout(() => {
this.getIsRead(); this.getIsRead();
}, 500);
}); });
} else { } else {
const { selfPhone, selfCode } = this.formData; const { selfPhone, selfCode } = this.formData;
this.login(selfPhone, selfCode).then(() => { this.login(selfPhone, selfCode).then(() => {
this.$refs.insureForm.getFamilyList_I().then(() => { this.$refs.insureForm.getFamilyList(true).then(() => {
setTimeout(() => {
this.getIsRead(); this.getIsRead();
}, 500);
}); });
}); });
} }
......
...@@ -291,14 +291,18 @@ export default { ...@@ -291,14 +291,18 @@ export default {
return; return;
} }
if (localStorage.get("mongoToken")) { if (localStorage.get("mongoToken")) {
this.$refs.insureForm.getFamilyList_I().then(() => { this.$refs.insureForm.getFamilyList(true).then(() => {
setTimeout(() => {
this.getIsRead(); this.getIsRead();
}, 500);
}); });
} else { } else {
const { selfPhone, selfCode } = this.formData; const { selfPhone, selfCode } = this.formData;
this.login(selfPhone, selfCode).then(() => { this.login(selfPhone, selfCode).then(() => {
this.$refs.insureForm.getFamilyList_I().then(() => { this.$refs.insureForm.getFamilyList(true).then(() => {
setTimeout(() => {
this.getIsRead(); this.getIsRead();
}, 500);
}); });
}); });
} }
......
...@@ -225,15 +225,19 @@ export default { ...@@ -225,15 +225,19 @@ export default {
} }
if (localStorage.get("mongoToken")) { if (localStorage.get("mongoToken")) {
socialSecurityCache = this.formData.socialSecurity; socialSecurityCache = this.formData.socialSecurity;
this.$refs.insureForm.getFamilyList_I().then(() => { this.$refs.insureForm.getFamilyList(true).then(() => {
setTimeout(() => {
this.getIsRead(); this.getIsRead();
}, 500);
}); });
} else { } else {
socialSecurityCache = this.formData.socialSecurity; socialSecurityCache = this.formData.socialSecurity;
const { selfPhone, selfCode } = this.formData; const { selfPhone, selfCode } = this.formData;
this.login(selfPhone, selfCode).then(() => { this.login(selfPhone, selfCode).then(() => {
this.$refs.insureForm.getFamilyList_I().then(() => { this.$refs.insureForm.getFamilyList(true).then(() => {
setTimeout(() => {
this.getIsRead(); this.getIsRead();
}, 500);
}); });
}); });
} }
......
...@@ -335,7 +335,7 @@ export default { ...@@ -335,7 +335,7 @@ export default {
}; };
this.onRelationCancel(); this.onRelationCancel();
}, },
relationChange(relation = this.formData.relation) { relationChange(relation = this.formData.relation, validSelf = false) {
this.familyList.forEach(item => { this.familyList.forEach(item => {
const { const {
relation, relation,
...@@ -357,6 +357,7 @@ export default { ...@@ -357,6 +357,7 @@ export default {
this.selfInfoReadonly = true; this.selfInfoReadonly = true;
} }
}); });
if (validSelf) return;
let userArray = this.familyList.filter(item => item.relation === +relation); let userArray = this.familyList.filter(item => item.relation === +relation);
let [name, idNo, userInfoSecId, socialSecurity] = ["", "", "", ""]; let [name, idNo, userInfoSecId, socialSecurity] = ["", "", "", ""];
if ( if (
...@@ -414,14 +415,15 @@ export default { ...@@ -414,14 +415,15 @@ export default {
} }
} }
}, },
async getFamilyList() { getFamilyList(reset = false) {
return new Promise(resolve => {
this.mongoToken = localStorage.get("mongoToken"); this.mongoToken = localStorage.get("mongoToken");
if (!this.mongoToken) return; if (!this.mongoToken) return;
this.setUserInfo(); this.setUserInfo();
const res = await getFamilyList(); getFamilyList().then(res => {
if (res) { if (res) {
this.familyList = res; this.familyList = res;
if (this.hasAutoSaveData(this.autoSaveKey)) { if (this.hasAutoSaveData(this.autoSaveKey) && !reset) {
this.getSaveInfoHandler(this.autoSaveKey, AUTO_SAVE_TARGET); this.getSaveInfoHandler(this.autoSaveKey, AUTO_SAVE_TARGET);
if (this.formData.relation) { if (this.formData.relation) {
const userArray = this.familyList.filter( const userArray = this.familyList.filter(
...@@ -456,15 +458,12 @@ export default { ...@@ -456,15 +458,12 @@ export default {
} }
} else { } else {
let relation = this.formData.relation || "1"; let relation = this.formData.relation || "1";
(this.showAuthXyqb || this.mongoToken) && this.relationChange(relation); (this.showAuthXyqb || this.mongoToken) && this.relationChange(relation, reset);
} }
} }
},
getFamilyList_I() {
return new Promise(resolve => {
this.getFamilyList();
resolve(); resolve();
}); });
});
}, },
// TODO 倒计时未回显 // TODO 倒计时未回显
async getCode() { async getCode() {
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
overflow: scroll; overflow: scroll;
margin: 0 -15px; margin: 0 -15px;
height: 72vh; height: calc(100vh - 182px);
} }
} }
&-btns { &-btns {
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
} }
} }
&-frame { &-frame {
height: 72vh; height: calc(100vh - 182px);
width: 100%; width: 100%;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment