Commit 8eb5fdcf authored by 郭志伟's avatar 郭志伟

fix: code问题还原

parent 33d9e842
......@@ -57,6 +57,7 @@ async function getAuthInfo(xyqbToken) {
}
async function getWxOpenId(code) {
if (localStorage.get("openId")) return;
const res = await getwxOpenId({ code, appId: cfg.wxAppId });
if (localStorage.get("openId") && res.openId !== localStorage.get("openId")) {
console.log("切换账号");
......
......@@ -223,13 +223,15 @@ export default {
},
onSubmit() {
if (localStorage.get("mongoToken")) {
this.goInsureState = true;
this.$refs.insureForm.getFamilyList();
this.$refs.insureForm.getFamilyList_I().then(() => {
this.getIsRead();
});
} else {
const { selfPhone, selfCode } = this.formData;
this.login(selfPhone, selfCode).then(() => {
this.goInsureState = true;
this.$refs.insureForm.getFamilyList();
this.$refs.insureForm.getFamilyList_I().then(() => {
this.getIsRead();
});
});
}
// sessionStorage.setItem(
......@@ -255,6 +257,13 @@ export default {
}
this.$notify({ type: "warning", message: errors[0].message });
},
getIsRead() {
if (this.formData.read) {
this.nextStep();
} else {
this.goInsureState = true;
}
},
nextStep() {
this.generateFormData();
this.goInsureState = false;
......
......@@ -282,13 +282,15 @@ export default {
},
onSubmit() {
if (localStorage.get("mongoToken")) {
this.goInsureState = true;
this.$refs.insureForm.getFamilyList();
this.$refs.insureForm.getFamilyList_I().then(() => {
this.getIsRead();
});
} else {
const { selfPhone, selfCode } = this.formData;
this.login(selfPhone, selfCode).then(() => {
this.goInsureState = true;
this.$refs.insureForm.getFamilyList();
this.$refs.insureForm.getFamilyList_I().then(() => {
this.getIsRead();
});
});
}
},
......@@ -310,6 +312,13 @@ export default {
}
this.$notify({ type: "warning", message: errors[0].message });
},
getIsRead() {
if (this.formData.read) {
this.nextStep();
} else {
this.goInsureState = true;
}
},
nextStep() {
this.$router.push({ path: "/goods/inform" });
},
......
......@@ -219,18 +219,27 @@ export default {
onSubmit() {
if (localStorage.get("mongoToken")) {
socialSecurityCache = this.formData.socialSecurity;
this.goInsureState = true;
this.$refs.insureForm.getFamilyList();
this.$refs.insureForm.getFamilyList_I().then(() => {
this.getIsRead();
});
} else {
socialSecurityCache = this.formData.socialSecurity;
const { selfPhone, selfCode } = this.formData;
this.login(selfPhone, selfCode).then(() => {
this.goInsureState = true;
this.$refs.insureForm.getFamilyList();
this.$refs.insureForm.getFamilyList_I().then(() => {
this.getIsRead();
});
});
}
// sessionStorage.setItem("policyFormData", JSON.stringify(this.formData));
},
getIsRead() {
if (this.formData.read) {
this.nextStep();
} else {
this.goInsureState = true;
}
},
onFailed(errorInfo) {
const { errors } = errorInfo;
const noMsgArr = [
......
......@@ -458,6 +458,12 @@ export default {
}
}
},
getFamilyList_I() {
return new Promise(resolve => {
this.getFamilyList();
resolve();
});
},
// TODO 倒计时未回显
async getCode() {
const TIME_COUNT = 60;
......
......@@ -4,7 +4,7 @@
<slot></slot>
<template v-slot:footer>
<div class="insure-form-pact" slot="footer">
<cr-field name="pact" :rules="[{ required: true, message: '请阅读协议并确认' }]">
<cr-field name="pact">
<template #input>
<cr-checkbox shape="round" icon-size="13px" v-model="pact" checked-color="#FFC842">
投保前请阅读
......
......@@ -7301,6 +7301,11 @@ rxjs@^6.5.5, rxjs@^6.6.0:
dependencies:
tslib "^1.9.0"
sa-sdk-javascript@^1.15.16:
version "1.15.16"
resolved "http://npmprivate.quantgroups.com/sa-sdk-javascript/-/sa-sdk-javascript-1.15.16.tgz#212313eb0cc8bdbf73f0438c0b9e4314121a6117"
integrity sha512-UIFJBYk8EEcMAg6kSeUdjYAnl3IEXA8DDk/7xqS1aU4bZV3+iUXo2hT1rzGPsSWanVvcDZ/uSGUNZqojsfZaGA==
safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.2"
resolved "http://npmprivate.quantgroups.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
......
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