Commit adae88d6 authored by 郭志伟's avatar 郭志伟 Committed by 郝聪敏

feat: 保单晚上

parent 90023f66
export default {
basicHost: "http://yapi.quantgroups.com/mock/329/",
// basicHost: "http://192.168.29.211:80/",
// basicHost: "http://192.168.29.100:8964/",
wxAppId: "wx514de17b23d53a20"
};
......@@ -4,19 +4,19 @@
<detail-header :det="headerInfo" />
<div class="det-body">
<card title="保险计划" :option="['查看详情']" @option-click="openIframePupop(4)">
<cr-radio-btn v-model="formData.planValue" :radio-data="planOptions" />
<cr-radio-btn v-model="formData.amountInsured" :radio-data="planOptions" />
<compactCellGroup :cell-data="planCellData" :text-bold="true" />
<plan-tip :tip-list="planTipOptions" />
</card>
<div id="det_insure">
<insure-person-form v-model="formData" :radio-options="personFormOptions" />
<auto-deduct
v-model="formData.auto"
v-model="formData.autoRenewPolicy"
:cell-data="autoCellInfo"
@cell-click="openIframePupop"
/>
<protocol-read
v-model="formData.autoRenewPolicy"
v-model="formData.read"
:cell-data="noticeCellData"
:protocol-data="protocolData"
@cell-click="openIframePupop"
......@@ -130,10 +130,10 @@ export default {
idNo: "",
socialSecurity: "1",
relation: "0",
type: "1",
planValue: "10",
auto: false,
autoRenewPolicy: true
payType: "1",
amountInsured: "1000000",
autoRenewPolicy: false,
read: true
},
goInsureState: false
};
......@@ -154,11 +154,11 @@ export default {
if (this.calTimer) {
clearTimeout(this.calTimer);
}
const { name, idNo } = val;
const { name: oldName, idNo: oldNo } = oldVal;
if (name === oldName && idNo === oldNo) return;
const { idNo } = val;
const { idNo: oldNo } = oldVal;
if (idNo === oldNo) return;
this.calTimer = setTimeout(() => {
this.calFee({ name, idNo });
this.calFee();
}, 600);
}
}
......@@ -170,13 +170,13 @@ export default {
},
planCellData() {
const { planCellInfo } = this;
const { planValue } = this.formData;
return planCellInfo[planValue];
const { amountInsured } = this.formData;
return planCellInfo[amountInsured];
},
noticeCellData() {
const { noticeCellInfo } = this;
const { planValue } = this.formData;
return noticeCellInfo[planValue];
const { amountInsured } = this.formData;
return noticeCellInfo[amountInsured];
},
personFormOptions() {
const { insuredOptions, paywayOptions } = this;
......@@ -203,7 +203,10 @@ export default {
},
onSubmit() {
this.goInsureState = true;
sessionStorage.setItem("policyFormData", JSON.stringify(this.formData));
sessionStorage.setItem(
"policyFormData",
JSON.stringify(Object.assign(this.formData, { productNo: this.goodId }))
);
},
onFailed(errorInfo) {
const { errors } = errorInfo;
......@@ -221,18 +224,31 @@ export default {
const res = await list();
if (res) {
res.forEach(item => {
if (item.id === this.goodId) {
if (item.productNo === this.goodId) {
this.headerInfo.price[0] = item.downPayPrice;
this.headerInfo.insuredNum = item.sellCount;
}
});
}
},
async calFee({ name, idNo }) {
async calFee() {
let { price } = this.headerInfo;
const res = await trail({ name, idNo, productNo: this.goodId });
const { idNo, amountInsured } = this.formData;
if (!idNo || !amountInsured) return;
const _param = {
productNo: this.goodId,
productUserInfo: {
userInfo: {
idNo
},
productItem: {
amountInsured
}
}
};
const res = await trail(_param);
if (res) {
price[0] = res.regularPrice;
price[0] = res.downPayPrice;
this.goodActionInfo = {
title: price
};
......
......@@ -11,12 +11,12 @@
<div id="det_insure">
<insure-person-form v-model="formData" :radio-options="personFormOptions" />
<auto-deduct
v-model="formData.auto"
v-model="formData.autoRenewPolicy"
:cell-data="autoCellInfo"
@cell-click="openIframePupop"
/>
<protocol-read
v-model="formData.autoRenewPolicy"
v-model="formData.read"
:cell-data="noticeCellData"
@cell-click="openIframePupop"
/>
......@@ -128,8 +128,8 @@ export default {
relation: "0",
payType: "1",
amountInsured: "300000",
auto: false,
autoRenewPolicy: true
autoRenewPolicy: false,
read: true
},
goInsureState: false
};
......@@ -205,7 +205,10 @@ export default {
},
onSubmit() {
this.goInsureState = true;
sessionStorage.setItem("policyFormData", JSON.stringify(this.formData));
sessionStorage.setItem(
"policyFormData",
JSON.stringify(Object.assign(this.formData, { productNo: this.goodId }))
);
},
onFailed(errorInfo) {
const { errors } = errorInfo;
......@@ -219,9 +222,9 @@ export default {
const res = await list();
if (res) {
res.forEach(item => {
if (item.id === this.goodId) {
this.headerInfo.price[0] = res.downPayPrice;
this.headerInfo.subPrice[0] = res.regularPrice;
if (item.productNo === this.goodId) {
this.headerInfo.price[0] = item.downPayPrice;
this.headerInfo.subPrice[0] = item.regularPrice;
this.headerInfo.insuredNum = item.sellCount;
}
});
......@@ -229,18 +232,23 @@ export default {
},
async calFee() {
let { price, subPrice } = this.headerInfo;
const { idNo, socialSecurity, payType, amountInsured } = this.formData;
const { idNo, socialSecurity, payType, amountInsured, userInfoSecId } = this.formData;
if (!idNo || !socialSecurity || !payType) return;
const _param = {
productNo: this.goodId,
productUserInfo: {
idNo,
socialSecurity,
payType
},
productItem: {
amountInsured
userInfo: {
idNo,
socialSecurity: !!Number(socialSecurity),
userInfoSecId: userInfoSecId ?? null
},
productItem: {
payType,
amountInsured
}
}
};
const res = await trail(_param);
if (res) {
price[0] = res.downPayPrice;
......
......@@ -46,7 +46,7 @@
title="理赔须知"
:options="[]"
:text-bold="true"
v-model="formData.autoRenewPolicy"
v-model="formData.read"
:cell-data="noticeCellInfo"
@cell-click="openIframePupop"
>
......@@ -139,7 +139,7 @@ export default {
popupShow: false,
currentPupopIndex: null,
formData: {
autoRenewPolicy: false
read: false
},
showLayer: false
};
......@@ -162,9 +162,9 @@ export default {
if (this.calTimer) {
clearTimeout(this.calTimer);
}
const { autoRenewPolicy } = val;
const { autoRenewPolicy: oldAutoRenewPolicy } = oldVal;
if (autoRenewPolicy !== oldAutoRenewPolicy) return;
const { read } = val;
const { read: oldread } = oldVal;
if (read !== oldread) return;
this.calTimer = setTimeout(() => {
this.calFee();
}, 600);
......@@ -181,7 +181,7 @@ export default {
}
},
mounted() {
// this.getDetail();
this.getDetail();
},
methods: {
openIframePupop(index) {
......@@ -193,7 +193,10 @@ export default {
this.popupShow = true;
},
onSubmit() {
sessionStorage.setItem("policyFormData", JSON.stringify(this.formData));
sessionStorage.setItem(
"policyFormData",
JSON.stringify(Object.assign(this.formData, { productNo: this.goodId }))
);
this.nextStep();
},
onFailed(errorInfo) {
......@@ -208,8 +211,8 @@ export default {
const res = await list();
if (res) {
res.forEach(item => {
if (item.id === this.goodId) {
this.headerInfo.price[0] = res.downPayPrice;
if (item.productNo === this.goodId) {
this.headerInfo.price[0] = item.downPayPrice;
this.headerInfo.insuredNum = item.sellCount;
}
});
......@@ -217,7 +220,23 @@ export default {
},
async calFee() {
let { price } = this.headerInfo;
const res = await trail(Object.assign(this.formData, { productNo: this.goodId }));
const { birth, gender, amountInsured, policyPeriod, payPeriod, payType } = this.formData;
const _param = {
productNo: this.goodId,
productUserInfo: {
userInfo: {
birth,
gender
},
productItem: {
amountInsured,
policyPeriod,
payPeriod,
payType
}
}
};
const res = await trail(_param);
if (res) {
price[0] = res.regularPrice;
this.goodActionInfo = { title: price };
......
......@@ -10,12 +10,12 @@
<div id="det_insure">
<insure-person-form v-model="formData" :radio-options="personFormOptions" />
<auto-deduct
v-model="formData.auto"
v-model="formData.autoRenewPolicy"
:cell-data="autoCellInfo"
@cell-click="openIframePupop"
/>
<protocol-read
v-model="formData.autoRenewPolicy"
v-model="formData.read"
:cell-data="noticeCellInfo"
@cell-click="openIframePupop"
/>
......@@ -128,10 +128,10 @@ export default {
idNo: "",
socialSecurity: "1",
relation: "0",
type: "1",
payType: "1",
planValue: "3",
auto: false,
autoRenewPolicy: true
autoRenewPolicy: false,
read: true
},
goInsureState: false
};
......@@ -158,22 +158,11 @@ export default {
if (this.calTimer) {
clearTimeout(this.calTimer);
}
const { name, idNo, socialSecurity, type } = val;
const {
name: oldName,
idNo: oldNo,
socialSecurity: oldSocialSecurity,
type: oldType
} = oldVal;
if (
name === oldName &&
idNo === oldNo &&
socialSecurity === oldSocialSecurity &&
type === oldType
)
return;
const { idNo, socialSecurity, payType } = val;
const { idNo: oldNo, socialSecurity: oldSocialSecurity, payType: oldType } = oldVal;
if (idNo === oldNo && socialSecurity === oldSocialSecurity && payType === oldType) return;
this.calTimer = setTimeout(() => {
this.calFee({ name, idNo, socialSecurity, type });
this.calFee();
}, 600);
}
}
......@@ -196,7 +185,7 @@ export default {
}
},
mounted() {
// this.getDetail();
this.getDetail();
},
methods: {
openIframePupop(index) {
......@@ -220,26 +209,75 @@ export default {
this.generateOrder();
},
generateFormData() {
this.subFromData = {};
const {
userInfoSecId,
name,
idNo,
relation,
socialSecurity,
// selfSocialSecurity,
selfName,
selfIdNo,
selfPhone,
selfSecId,
payType,
autoRenewPolicy
} = this.formData;
this.subFromData = {
insuredUserInfo: {
userInfoSecId: userInfoSecId ?? null,
name,
idNo,
relation,
socialSecurity: !!Number(socialSecurity)
},
productNo: this.goodId,
holderUserInfo: {
phoneNo: selfPhone,
userInfoSecId: selfSecId ?? null,
name: selfName,
idNo: selfIdNo
// socialSecurity: selfSocialSecurity ? !!Number(selfSocialSecurity) : null
},
productItem: {
payType
},
autoRenewPolicy: autoRenewPolicy
};
},
async getDetail() {
this.goodId = this.$route.query.id;
const res = await list();
if (res) {
res.forEach(item => {
if (item.id === this.goodId) {
this.headerInfo.price[0] = res.downPayPrice;
this.headerInfo.subPrice[0] = res.regularPrice;
if (item.productNo === this.goodId) {
this.headerInfo.price[0] = item.downPayPrice;
this.headerInfo.subPrice[0] = item.regularPrice;
this.headerInfo.insuredNum = item.sellCount;
}
});
}
},
async calFee({ name, idNo, socialSecurity, type }) {
async calFee() {
let { price, subPrice } = this.headerInfo;
const res = await trail({ name, idNo, socialSecurity, type });
const { idNo, socialSecurity, payType, userInfoSecId } = this.formData;
if (!idNo || !socialSecurity || !payType) return;
const _param = {
productNo: this.goodId,
productUserInfo: {
userInfo: {
idNo,
socialSecurity: !!Number(socialSecurity),
userInfoSecId: userInfoSecId ?? null
},
productItem: {
payType
}
}
};
const res = await trail(_param);
if (res) {
price[0] = res.firstPrice;
price[0] = res.downPayPrice;
subPrice[0] = res.regularPrice;
this.goodActionInfo = {
title: price,
......
......@@ -2,38 +2,50 @@
<cr-form ref="calFeeForm" class="policy-form" @submit="onFormSubmit">
<cr-cell-group title="被保人年龄需满足18周岁~60周岁">
<cr-field
v-model="formData.birthday"
name="birthday"
v-model="formData.birth"
name="birth"
label="出生日期"
:rules="[{ required: true, message: 'required' }]"
>
<template #input>
<popup-date-picker v-model="formData.birthday" placeholder="请选择被保人出生日期" />
<popup-date-picker v-model="formData.birth" placeholder="请选择被保人出生日期" />
</template>
</cr-field>
<cr-field name="price" label="保障额度" :rules="[{ required: true, message: 'required' }]">
<cr-field
name="amountInsured"
label="保障额度"
:rules="[{ required: true, message: 'required' }]"
>
<template #input>
<cr-radio-btn v-model="formData.price" :radio-data="countOptions" />
<cr-radio-btn v-model="formData.amountInsured" :radio-data="countOptions" />
</template>
</cr-field>
<cr-field name="term" label="保险期限" :rules="[{ required: true, message: 'required' }]">
<cr-field
name="policyPeriod"
label="保险期限"
:rules="[{ required: true, message: 'required' }]"
>
<template #input>
<cr-radio-btn v-model="formData.term" :radio-data="termOptions" />
<cr-radio-btn v-model="formData.policyPeriod" :radio-data="termOptions" />
</template>
</cr-field>
<cr-field name="range" label="交费年限" :rules="[{ required: true, message: 'required' }]">
<cr-field
name="payPeriod"
label="交费年限"
:rules="[{ required: true, message: 'required' }]"
>
<template #input>
<cr-radio-btn v-model="formData.range" :radio-data="benefitOptions" />
<cr-radio-btn v-model="formData.payPeriod" :radio-data="benefitOptions" />
</template>
</cr-field>
<cr-field name="sex" label="性别" :rules="[{ required: true, message: 'required' }]">
<cr-field name="gender" label="性别" :rules="[{ required: true, message: 'required' }]">
<template #input>
<cr-radio-btn v-model="formData.sex" :radio-data="sexOptions" />
<cr-radio-btn v-model="formData.gender" :radio-data="sexOptions" />
</template>
</cr-field>
<cr-field name="type" label="交费方式" :rules="[{ required: true, message: 'required' }]">
<cr-field name="payType" label="交费方式" :rules="[{ required: true, message: 'required' }]">
<template #input>
<cr-radio-btn v-model="formData.type" :radio-data="paywayOptions" />
<cr-radio-btn v-model="formData.payType" :radio-data="paywayOptions" />
</template>
</cr-field>
</cr-cell-group>
......@@ -63,16 +75,16 @@ export default {
return {
formData: {},
sexOptions: [
{ label: "", value: "1" },
{ label: "", value: "2" }
{ label: "", value: "0" },
{ label: "", value: "1" }
],
countOptions: [
{ label: "100万", value: "1" },
{ label: "150万", value: "2" },
{ label: "200万", value: "3" },
{ label: "250万", value: "4" },
{ label: "300万", value: "5" },
{ label: "350万", value: "6" }
{ label: "100万", value: "1000000" },
{ label: "150万", value: "15000000" },
{ label: "200万", value: "2000000" },
{ label: "250万", value: "2500000" },
{ label: "300万", value: "3000000" },
{ label: "350万", value: "3500000" }
],
termOptions: [
{ label: "10年", value: "1" },
......
......@@ -86,6 +86,7 @@
<script>
import Card from "@/components/Card";
import { mapState, mapActions } from "vuex";
import { getFamilyList } from "@/api/user";
import localStorage from "@/service/localStorage";
import CrRadioBtn from "@/components/CrRadioBtn";
const DATA_CHANGE_EVENT = "input";
......@@ -112,6 +113,7 @@ export default {
data() {
return {
formData: {},
familyList: [],
mongoToken: localStorage.get("mongoToken"),
xyqbAuthState: localStorage.get("xyqbAuthState")
};
......@@ -150,34 +152,50 @@ export default {
}
},
computed: {
...mapState(["showAuthXyqb"]),
...mapState("user", ["familyList"])
...mapState(["showAuthXyqb"])
},
mounted() {
this.setFamilyList();
this.getFamilyList();
},
methods: {
...mapActions(["setAuthXyqb"]),
...mapActions("user", ["setFamilyList"]),
inputClick() {
if (this.showAuthXyqb === 1) {
this.setAuthXyqb(2);
}
},
relationChange(relation = this.formData.relation) {
const userArray = this.familyList.filter(item => item.relation === +relation);
if (userArray.length > 0) {
this.formData.name = userArray[0].nameMask;
this.formData.idNo = userArray[0].idNoMask;
this.formData.socialSecurity = userArray[0].socialSecurity ? "1" : "0";
if (relation === "0") {
this.formData.selfName = userArray[0].nameMask;
this.formData.selfIdNo = userArray[0].idNoMask;
this.familyList.forEach(item => {
const {
relation,
nameMask: selfName,
idNoMask: selfIdNo,
userInfoSecId: selfSecId,
socialSecurity
} = item;
if (relation === 0) {
this.formData = {
...this.formData,
...{ selfName, selfIdNo, selfSecId, selfSocialSecurity: socialSecurity ? "1" : "0" }
};
}
} else {
this.formData.name = "";
this.formData.idNo = "";
this.formData.socialSecurity = "0";
});
const userArray = this.familyList.filter(item => item.relation === +relation);
let [name, idNo, userInfoSecId, socialSecurity] = ["", "", "", "0"];
if (userArray.length) {
let { nameMask, idNoMask, userInfoSecId: id, socialSecurity: ss } = userArray[0];
[name, idNo, userInfoSecId, socialSecurity] = [nameMask, idNoMask, id, ss];
}
this.formData = {
...this.formData,
...{ name, idNo, userInfoSecId, socialSecurity: socialSecurity ? "1" : "0" }
};
},
async getFamilyList() {
const res = await getFamilyList();
if (res) {
this.familyList = res;
this.showAuthXyqb && this.relationChange();
}
}
}
......
......@@ -43,7 +43,42 @@ export default {
this.generateOrder();
},
generateFormData() {
this.subFromData = {};
const {
productNo,
userInfoSecId,
name,
idNo,
relation,
// socialSecurity,
// selfSocialSecurity,
selfName,
selfIdNo,
selfPhone,
selfSecId,
payType,
autoRenewPolicy
} = this.formData;
this.subFromData = {
insuredUserInfo: {
userInfoSecId: userInfoSecId ?? null,
name,
idNo,
relation
// socialSecurity: socialSecurity ? !!Number(socialSecurity) : null
},
productNo,
holderUserInfo: {
phoneNo: selfPhone,
userInfoSecId: selfSecId,
name: selfName,
idNo: selfIdNo
// socialSecurity: selfSocialSecurity ? !!Number(selfSocialSecurity) : null
},
productItem: {
payType: payType ? payType : null
},
autoRenewPolicy: autoRenewPolicy
};
}
}
};
......
......@@ -17,6 +17,7 @@
label="姓名"
placeholder="请输入投保人姓名"
:rules="[{ require: true, message: '请输入投保人姓名' }]"
@click.native="inputClick"
/>
<cr-field
v-model="formData.holderUserInfo.idNo"
......@@ -24,6 +25,7 @@
label="身份证号"
placeholder="请填写投保人身份证号"
:rules="[{ require: true, message: '请填写投保人身份证号' }]"
@click.native="inputClick"
/>
<cr-field
v-model="formData.holderUserInfo.phoneNo"
......@@ -32,6 +34,7 @@
label="手机号"
placeholder="请填写投保人手机号"
:rules="[{ require: true, message: '请填写投保人手机号' }]"
@click.native="inputClick"
/>
<cr-field
v-model="formData.holderUserInfo.email"
......@@ -119,6 +122,7 @@
<template #input>
<cr-radio-btn
v-model="formData.insuredUserInfo.relation"
@input="relationChange"
:radio-data="insuredOptions"
/>
</template>
......@@ -277,7 +281,7 @@
:rules="[{ require: true, message: '请选择交费方式' }]"
>
<template #input>
<cr-radio-btn v-model="formData.payPeriod" :radio-data="paywayOptions" />
<cr-radio-btn v-model="formData.productItem.payType" :radio-data="paywayOptions" />
</template>
</cr-field>
<cr-field
......@@ -349,8 +353,11 @@ import Stepper from "@/components/Stepper";
import GoInsureDialog from "@/views/Goods/Detail/modules/GoInsureDialog";
import detailPayMixin from "@/views/Goods/Detail/modules/detailPay.mixin";
import localStorage from "@/service/localStorage";
import { mapState, mapActions } from "vuex";
import Detail from "@/api/detail.huagui.shouxian";
import { detail, trail } from "@/api/product";
import { list, trail } from "@/api/product";
import { getFamilyList } from "@/api/user";
const { headerInfo, popupArray } = Detail;
export default {
name: "AddPolicy",
......@@ -372,13 +379,17 @@ export default {
goInsureState: false,
goodActionInfo: {},
goodBuyModalInfo: [],
policyFormData: JSON.parse(sessionStorage.getItem("policyFormData") || "{}"),
formData: {
insuredUserInfo: {},
insuredUserInfo: {
relation: "0"
},
holderUserInfo: {},
productItem: {
insuredAmount: "50"
insuredAmount: "500000"
}
},
familyList: [],
formMaskData: {},
idCardInvaildOptions: [
{ label: "非长期", value: "1" },
......@@ -451,17 +462,38 @@ export default {
});
}, 600);
}
},
showAuthXyqb: {
immediate: true,
handler(val) {
if (val === 4) {
const xyqbUserInfo = localStorage.get("xyqbUserInfo");
this.formData.holderUserInfo.name = xyqbUserInfo.nameMask;
this.formData.holderUserInfo.idNo = xyqbUserInfo.idNoMask;
this.formData.holderUserInfo.phoneNo = xyqbUserInfo.phoneNoMask;
this.$forceUpdate();
}
}
}
},
computed: {
...mapState(["showAuthXyqb"]),
formDataCpu() {
return JSON.parse(JSON.stringify(this.formData));
}
},
mounted() {
this.getParamFromSession();
this.getDetail();
this.getFamilyList();
},
methods: {
...mapActions(["setAuthXyqb"]),
inputClick() {
if (this.showAuthXyqb === 1) {
this.setAuthXyqb(2);
}
},
onFormSubmit() {
this.goInsureState = true;
},
......@@ -470,33 +502,86 @@ export default {
this.$notify({ type: "warning", message: errors[0].message });
},
nextStep() {
this.generateFormData();
this.generateOrder();
},
generateFormData() {
this.subFromData = {};
relationChange(relation = this.formData.insuredUserInfo.relation) {
this.familyList.forEach(item => {
const { relation, nameMask: name, idNoMask: idNo, userInfoSecId, socialSecurity } = item;
if (relation === 0) {
this.formData.holderUserInfo = {
...this.formData.holderUserInfo,
...{ name, idNo, userInfoSecId, socialSecurity: socialSecurity ? "1" : "0" }
};
}
});
const userArray = this.familyList.filter(item => item.relation === +relation);
let [name, idNo, userInfoSecId, socialSecurity] = ["", "", "", "0"];
if (userArray.length) {
let { nameMask, idNoMask, userInfoSecId: id, socialSecurity: ss } = userArray[0];
[name, idNo, userInfoSecId, socialSecurity] = [nameMask, idNoMask, id, ss];
}
this.formData.insuredUserInfo = {
...this.formData.insuredUserInfo,
...{ name, idNo, userInfoSecId, socialSecurity: socialSecurity ? "1" : "0" }
};
},
getParamFromSession() {
const {
amountInsured: insuredAmount,
policyPeriod,
payPeriod: paymentPeriod,
payType,
productNo
} = this.policyFormData;
this.formData.productNo = productNo;
this.formData.insuredUserInfo = {
...this.formData.insuredUserInfo,
...{ insuredAmount, policyPeriod, paymentPeriod, payType }
};
this.$forceUpdate();
},
async getDetail() {
this.goodId = this.$route.query.id;
const res = await detail({ productNo: this.goodId });
const res = await list();
if (res) {
this.headerInfo.price[0] = res.firstMonthPrice;
this.headerInfo.subPrice[0] = res.price;
res.forEach(item => {
if (item.productNo === this.formData.productNo) {
this.headerInfo.price[0] = item.downPayPrice;
}
});
}
},
async getFamilyList() {
const res = await getFamilyList();
if (res) {
this.familyList = res;
this.showAuthXyqb && this.relationChange();
}
},
async calFee() {
let { price, subPrice } = this.headerInfo;
const res = await trail(this.formData);
let { price } = this.headerInfo;
const { birth, gender, insuredAmount, policyPeriod, paymentPeriod, payType } = this.formData;
const _param = {
productNo: this.goodId,
productUserInfo: {
userInfo: {
birth,
gender
},
productItem: {
amountInsured: insuredAmount,
policyPeriod,
payPeriod: paymentPeriod,
payType
}
}
};
const res = await trail(_param);
if (res) {
price[0] = res.firstPrice;
subPrice[0] = res.regularPrice;
price[0] = res.downPayPrice;
this.goodActionInfo = {
title: price
};
this.goodBuyModalInfo = [
{ title: `${price[2]}保费`, value: `${price[0]}${price[1]}` },
{ title: `${subPrice[2]}保费`, value: `${subPrice[0]}${subPrice[1]}${subPrice[3]}` }
];
this.goodBuyModalInfo = [{ title: `${price[2]}保费`, value: `${price[0]}${price[1]}` }];
}
}
}
......
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