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(() => {
this.getIsRead(); setTimeout(() => {
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(() => {
this.getIsRead(); setTimeout(() => {
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(() => {
this.getIsRead(); setTimeout(() => {
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(() => {
this.getIsRead(); setTimeout(() => {
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(() => {
this.getIsRead(); setTimeout(() => {
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(() => {
this.getIsRead(); setTimeout(() => {
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,56 +415,54 @@ export default { ...@@ -414,56 +415,54 @@ export default {
} }
} }
}, },
async getFamilyList() { getFamilyList(reset = false) {
this.mongoToken = localStorage.get("mongoToken"); return new Promise(resolve => {
if (!this.mongoToken) return; this.mongoToken = localStorage.get("mongoToken");
this.setUserInfo(); if (!this.mongoToken) return;
const res = await getFamilyList(); this.setUserInfo();
if (res) { getFamilyList().then(res => {
this.familyList = res; if (res) {
if (this.hasAutoSaveData(this.autoSaveKey)) { this.familyList = res;
this.getSaveInfoHandler(this.autoSaveKey, AUTO_SAVE_TARGET); if (this.hasAutoSaveData(this.autoSaveKey) && !reset) {
if (this.formData.relation) { this.getSaveInfoHandler(this.autoSaveKey, AUTO_SAVE_TARGET);
const userArray = this.familyList.filter( if (this.formData.relation) {
item => item.relation === +this.formData.relation const userArray = this.familyList.filter(
); item => item.relation === +this.formData.relation
this.relationList = userArray.length > 1 ? userArray : []; );
} else { this.relationList = userArray.length > 1 ? userArray : [];
this.formData.relation = "1"; } else {
} this.formData.relation = "1";
if (!this.formData.selfName) { }
const selfInfo = this.familyList.find(item => item.relation === 1); if (!this.formData.selfName) {
this.selfInfoReadonly = !!selfInfo; const selfInfo = this.familyList.find(item => item.relation === 1);
if (selfInfo) { this.selfInfoReadonly = !!selfInfo;
const { if (selfInfo) {
idNoMask: selfIdNo, const {
nameMask: selfName, idNoMask: selfIdNo,
socialSecurity, nameMask: selfName,
userInfoSecId: selfSecId socialSecurity,
} = selfInfo; userInfoSecId: selfSecId
this.formData = { } = selfInfo;
...this.formData, this.formData = {
...{ ...this.formData,
selfName, ...{
selfIdNo, selfName,
selfSecId, selfIdNo,
selfSocialSecurity: socialSecurity ? "1" : "0" selfSecId,
selfSocialSecurity: socialSecurity ? "1" : "0"
}
};
} }
}; } else {
this.selfInfoReadonly = true;
}
} else {
let relation = this.formData.relation || "1";
(this.showAuthXyqb || this.mongoToken) && this.relationChange(relation, reset);
} }
} else {
this.selfInfoReadonly = true;
} }
} else { resolve();
let relation = this.formData.relation || "1"; });
(this.showAuthXyqb || this.mongoToken) && this.relationChange(relation);
}
}
},
getFamilyList_I() {
return new Promise(resolve => {
this.getFamilyList();
resolve();
}); });
}, },
// TODO 倒计时未回显 // TODO 倒计时未回显
......
...@@ -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