Commit dbb1e9d7 authored by 郝聪敏's avatar 郝聪敏

Merge branch 'feature/fix_sm' into 'master'

fix: 修改bug

See merge request !52
parents 0835ae66 6ed9eb91
......@@ -33,6 +33,16 @@ export default {
{ title: "身故(可选)", value: "已交保费/基本保额" },
{ title: "附加投保人保费豁免(可选)", value: "免交后续保费" }
],
securityContent: [
{title: "重大疾病保险金(100种)", value: "50万元", content: "被保险人在等待期(180天)以后经认可的医院确诊初次患上一种或多种本合同约定的重大疾病(100种),按基本保额的一定比例(被保险人年满60周岁前确诊,给付160%;被保险人年满60周岁后(含)确诊,给付100%)给付重大疾病保险金。重大疾病保险金给付一次为限。给付重大疾病保险金后,本合同的现金价值降低为零。"},
{title: "中症疾病保险金(25种)", value: "30万元", content: "被保险人在等待期(180天)以后经认可的医院确诊初次患上一种或多种本合同约定的中症疾病(25种),按基本保额的60%给付中症疾病保险金,中症疾病保险金给付两次为限。每种中症疾病只给付一次中症疾病保险金,给付后该种中症疾病保险金责任效力终止。若被保险人因同一疾病原因、同次医疗行为或同次意外伤害事故导致初次患上本合同所列的两种或两种以上中症疾病,仅按一种中症疾病给付中症疾病保险金。"},
{title: "轻症疾病保险金(48种)", value: "20万/22.5万/25万", content: "被保险人在等待期(180天)以后经认可的医院确诊初次患上一种或多种本合同约定的轻症疾病(48种),按基本保额的一定比例(第一次40%、第二次45%、第三次50%)给付轻症疾病保险金。轻症疾病保险金三次为限。若被保险人因同一疾病原因、同次医疗行为或同次意外伤害事故导致初次患上本合同所列的两种或两种以上轻症疾病,仅按一种轻症疾病给付轻症疾病保险金。每种轻症疾病只给付一次轻症疾病保险金,给付后该种轻症疾病保险金责任效力终止。"},
{title: "前症疾病保险金(12种)", value: "7.5万元", content: "被保险人在等待期(180天)以后经认可的医院确诊初次患上一种或多种本合同约定的前症疾病(12种),并经本合同约定的治疗后,按基本保额的15%向受益人给付前症疾病保险金。前症疾病保险金一次为限。"},
{title: "重症/中症/轻症/前症保费豁免", value: "免交后续保费", content: "被保险人确诊初次发生合同约定的“恶性肿瘤”且给付重大疾病保险金后,自恶性肿瘤确诊之日起3年后,经认可的医院确诊再次发生合同约定的“恶性肿瘤”(含持续、新发、复发及转移),给付120%基本保额。被保险人经认可的医院确诊初次发生恶性肿瘤以外的重大疾病且给付重大疾病保险金后,自确诊之日180天后,确认发生合同约定的恶性肿瘤,给付120%基本保额。第二次恶性肿瘤保险金给付一次为限。"},
{title: "第二次心脑血管特定疾病(已选)", value: "60万", content: "被保险人确诊初次发生合同约定的“心脑血管特定疾病”且给付重大疾病保险金后,自心脑血管特定疾病确诊之日起1年后,经认可的医院确诊再次发生该种疾病,给付120%基本保额。被保险人确诊初次发生合同约定范围内12种心脑血管特定疾病以外的重大疾病且给付重大疾病保险金后,自确诊之日180天后,经认可的医院确诊初次发生合同约定的12种心脑血管特定疾病,给付120%基本保额。第二次心脑血管特定疾病保险金给付一次为限。"},
{title: "身故保险金(已选)", value: "已交保费/基本保额", content: "被保险人因意外或等待期180天后18周岁前身故,给付已交保费(无息);被保险人因意外或等待期180天后身故且18周岁以后(含当日),给付基本保额。身故保险金”与“重大疾病保险金”二者不可兼得,即若给付其中一项保险金,则另一保险金将不再给付。"},
{title: "附加投保人保费豁免(已选)", value: "免交后续保费", content: "等待期90天后,投保人身故/全残,或确诊初次患上合同约定的重疾、中症、轻症,豁免确诊日后主合同及其附加的长期保险合同余下未来各期保险费。 "}
],
insuredAmountOptions: [
{ label: "10万", value: "100000" },
{ label: "15万", value: "150000" },
......@@ -54,6 +64,10 @@ export default {
{ label: "交20年", value: "4" },
{ label: "交30年", value: "5" }
],
termOptions: [
{ label: "保至70周岁", value: "1" },
{ label: "终身", value: "2" }
],
popupArray: [
{
title: "保险条款",
......
......@@ -67,6 +67,10 @@ export default {
{title: "民生银行", value: "0112"},
{title: "邮政储蓄", value: "0128"}
],
securityContent: [
{title: "身故保险金", value: "350万"},
{title: "意外伤残", value: "350万"}
],
planTipOptions: ["最高350万", "高风险职业可保", "免体检"],
noticeCellInfo: [
{ title: "投保年龄", value: `18~60周岁` },
......
......@@ -126,7 +126,7 @@ export default [
icon: life,
guarantee_title: "人寿保障",
guarantee_sub: "最高350万保额,顶梁柱必备",
company: "泰财",
company: "贵寿",
payType: [{ label: "年缴", value: 1 }],
policyPeriod: [
{ label: "10年", value: 1 },
......
......@@ -6,6 +6,8 @@ import { isXyqb, isWeixinBrower } from "@/service/validation";
import cfg from "@/config";
import { authByxyqb, getwxOpenId } from "@/api/user";
import localStorage from "@/service/localStorage";
import goodsList from "@/api/goodsList.mock";
Vue.use(VueRouter);
const originalPush = VueRouter.prototype.push;
......@@ -24,6 +26,7 @@ const router = new VueRouter({
router.beforeEach((to, from, next) => {
const urlParams = parseSearch(window.location.href);
setTitle(to.meta.title, to.path, to.query);
if (isXyqb) getAuthInfo(urlParams.token);
if (isWeixinBrower) getWxOpenId(urlParams.code);
next();
......@@ -44,6 +47,13 @@ async function getWxOpenId(code) {
const res = await getwxOpenId({ code, appId: cfg.wxAppId });
localStorage.set("openId", res.openId);
}
// router.afterEach(() => {});
function setTitle(title, path, query) {
if (path === "/goods/detail") {
const goods = goodsList.find(v => v.id === query.id);
title = goods.title;
}
document.title = title;
}
export default router;
......@@ -7,112 +7,134 @@ export default [
{
path: "/home",
name: "Home",
component: () => import("../views/Home/index.vue")
component: () => import("../views/Home/index.vue"),
meta: { title: "芒果保险" }
},
{
path: "/home/smart-measure",
name: "SmartMeasure",
component: () => import("../views/Home/SmartMeasure/index.vue")
component: () => import("../views/Home/SmartMeasure/index.vue"),
meta: { title: "智能风险评测" }
},
{
path: "/home/smart-measure/report",
name: "Report",
component: () => import("../views/Home/SmartMeasure/Report/index.vue")
component: () => import("../views/Home/SmartMeasure/Report/index.vue"),
meta: { title: "智能风险评测" }
},
{
path: "/home/activity",
name: "Activity",
component: () => import("../views/Home/Activity/index.vue")
component: () => import("../views/Home/Activity/index.vue"),
meta: { title: "芒果保险" }
},
{
path: "/goods",
name: "Goods",
component: () => import("../views/Goods/index.vue")
component: () => import("../views/Goods/index.vue"),
meta: { title: "产品" }
},
{
path: "/goods/detail",
name: "GoodsDetail",
component: () => import("../views/Goods/Detail/index.vue")
component: () => import("../views/Goods/Detail/index.vue"),
meta: { title: "" }
},
{
path: "/goods/plan",
name: "GoodsPlan",
component: () => import("../views/Goods/Plan/index.vue")
component: () => import("../views/Goods/Plan/index.vue"),
meta: { title: "保障详情" }
},
{
path: "/goods/inform",
name: "GoodsInform",
component: () => import("../views/Goods/Inform/index.vue")
component: () => import("../views/Goods/Inform/index.vue"),
meta: { title: "健康告知" }
},
{
path: "/consultant",
name: "Consultant",
component: () => import("../views/Consultant/index.vue")
component: () => import("../views/Consultant/index.vue"),
meta: { title: "1对1保险顾问" }
},
{
path: "/consultant/plan",
name: "ConsultantPlan",
component: () => import("../views/Consultant/Plan/index.vue")
component: () => import("../views/Consultant/Plan/index.vue"),
meta: { title: "保险顾问" }
},
{
path: "/user",
name: "User",
component: () => import("../views/User/index.vue")
component: () => import("../views/User/index.vue"),
meta: { title: "我的" }
},
{
path: "/user/family",
name: "Family",
component: () => import("../views/User/Family/index.vue")
component: () => import("../views/User/Family/index.vue"),
meta: { title: "添加家人" }
},
{
path: "/user/family/detail/:id",
name: "Family",
component: () => import("../views/User/Family/Detail/index.vue")
component: () => import("../views/User/Family/Detail/index.vue"),
meta: { title: "修改信息" }
},
{
path: "/user/help-center",
name: "Family",
component: () => import("../views/User/HelpCenter/index.vue")
component: () => import("../views/User/HelpCenter/index.vue"),
meta: { title: "帮助中心" }
},
{
path: "/policy",
name: "Policy",
component: () => import("../views/Policy/index.vue")
component: () => import("../views/Policy/index.vue"),
meta: { title: "我的保单" }
},
{
path: "/policy/detail/:orderNo",
name: "Detail",
component: () => import("../views/Policy/Detail/index.vue")
component: () => import("../views/Policy/Detail/index.vue"),
meta: { title: "保单详情" }
},
{
path: "/policy/virtual-detail",
name: "PolicyVirtualDetail",
component: () => import("../views/Policy/VirtualDetail/index.vue")
component: () => import("../views/Policy/VirtualDetail/index.vue"),
meta: { title: "芒果保险" }
},
{
path: "/policy/success/:orderNo",
name: "Sucess",
component: () => import("../views/Policy/Success/index.vue")
component: () => import("../views/Policy/Success/index.vue"),
meta: { title: "芒果保险" }
},
{
path: "/policy/add",
name: "AddPolicy",
component: () => import("../views/Policy/Add/index.vue")
component: () => import("../views/Policy/Add/index.vue"),
meta: { title: "填写保单" }
},
{
path: "/policy/renewal/:orderNo/:policySecId",
name: "Renewal",
component: () => import("../views/Policy/Renewal/index.vue")
component: () => import("../views/Policy/Renewal/index.vue"),
meta: { title: "次年自动续保" }
},
{
path: "/policy/payment-record/:policySecId/:status",
name: "Renewal",
component: () => import("../views/Policy/PaymentRecord/index.vue")
component: () => import("../views/Policy/PaymentRecord/index.vue"),
meta: { title: "缴费记录" }
},
{
path: "/introduction",
name: "Introduction",
component: () => import("../views/Introduction/index.vue")
component: () => import("../views/Introduction/index.vue"),
meta: { title: "了解芒果保险" }
},
{
path: "/paytest",
......
......@@ -178,4 +178,4 @@ export function parseTime(time, cFormat) {
return value || 0;
});
return timeStr;
}
}
\ No newline at end of file
......@@ -265,7 +265,7 @@
display: flex;
justify-content: space-between;
align-items: center;
margin: 20px auto 27px;
margin: 20px auto 127px;
padding: 0 19px;
width: 130px;
height: 40px;
......@@ -283,6 +283,10 @@
}
}
.report-container-explain {
position: fixed;
bottom: 0;
left: 0;
right: 0;
width: 343px;
height: 76px;
margin: 0 auto 24px;
......
......@@ -81,9 +81,11 @@ import { mapState } from "vuex";
import GOODS_LIST from "@/api/goodsList.mock";
import { list } from "@/api/product";
import { getRiskEvaluation } from "@/api/smartMeasure";
import autoSaveForm from "@/mixins/autoSaveForm.mixin";
export default {
name: "Report",
mixins: [autoSaveForm],
data() {
return {
answers: {
......@@ -143,6 +145,7 @@ export default {
});
},
goBack() {
this.clearSaveHandler("smartMeasureList");
this.$router.push("/home/smart-measure");
},
productImg(itype) {
......
......@@ -103,7 +103,7 @@ const selectList = {
],
type: "multi-select",
selected: [],
required: true
required: false
},
travel: {
data: [
......
......@@ -42,13 +42,7 @@
</div>
<div class="measure-dialogue-user" v-show="index !== dataList.length - 1 && item.answer">
<p class="Md-user-answer">{{ item.answer }}</p>
<cr-image
class="Md-user-avatar"
width=""
height=""
fit="cover"
src="@/assets/images/user/male@2x.png"
/>
<cr-image class="Md-user-avatar" width="" height="" fit="cover" :src="avatar" />
</div>
</div>
<cr-loading v-if="isLoading" class="measure-loading" size="24px">测评报告生成中...</cr-loading>
......@@ -63,6 +57,9 @@ import { addRiskEvaluation } from "@/api/smartMeasure";
import autoSaveForm from "@/mixins/autoSaveForm.mixin";
import { answerMap, paramsMap } from "./constants";
import localStorage from "@/service/localStorage";
import _ from "lodash";
import man from "@/assets/images/user/male@2x.png";
import woman from "@/assets/images/user/female@2x.png";
export default {
name: "SmartMeasure",
......@@ -74,12 +71,13 @@ export default {
},
data() {
return {
dataList: questionList,
dataList: _.cloneDeep(questionList),
isLoading: false,
currentAnswer: ""
};
},
created() {
console.log("smartMeasureList", this.hasAutoSaveData("smartMeasureList"), this.dataList);
if (this.hasAutoSaveData("smartMeasureList")) {
this.getSaveInfoHandler("smartMeasureList", "dataList");
}
......@@ -93,28 +91,27 @@ export default {
this.autoSaveHandler("dataList", "smartMeasureList", 0);
this.scrollToBottom();
return JSON.parse(JSON.stringify(result));
},
avatar() {
return this.dataList[0].answer === "男神" ? man : woman;
}
},
methods: {
nextQuestion() {
this.$forceUpdate();
nextQuestion: _.debounce(function() {
const id = this.smartMeasure[this.smartMeasure.length - 1].id;
const smartMeasureLength = this.smartMeasure.length;
this.dataList = this.dataList.map(data => {
if (data.id === id) data.answer = this.currentAnswer;
return data;
});
setTimeout(() => {
const smartMeasureLength = this.smartMeasure.length;
this.dataList = this.dataList.map(data => {
if (data.id === id) data.answer = this.currentAnswer;
return data;
});
console.log(smartMeasureLength, this.dataList.length);
if (smartMeasureLength === this.dataList.length) {
this.submit();
} else {
this.currentAnswer = "";
}
}, 600);
},
console.log(smartMeasureLength, this.dataList.length);
if (smartMeasureLength === this.dataList.length) {
this.submit();
} else {
this.currentAnswer = "";
}
}, 500),
goBack(id) {
if (this.isLoading) return;
this.dataList[id - 1].answer = "";
......
......@@ -57,6 +57,7 @@
&-item {
display: flex;
align-items: center;
height: 81px;
.Hs-item-svg {
margin-right: 5px;
......@@ -68,7 +69,8 @@
font-size: 16px;
font-weight: 600;
color: #242629;
line-height: 22px;
height: 32px;
line-height: 35px;
}
}
}
......@@ -91,6 +93,7 @@
.Hs-desc-item {
display: flex;
align-items: center;
height: 16px;
margin-right: 12px;
.Hsd-item-svg {
......@@ -100,10 +103,10 @@
}
.Hsd-item-text {
padding-top: 2px;
font-size: 12px;
font-weight: 600;
color: #666666;
line-height: 16px;
}
}
}
......@@ -185,6 +188,7 @@
}
.Hcc-operation-svg {
margin-right: 5px;
width: 16px;
height: 16px;
}
......@@ -264,6 +268,12 @@
}
}
@{deep} .copyright {
p, a {
color: #CCCCCC !important;
}
}
&-logo {
display: flex;
align-items: center;
......
......@@ -104,6 +104,7 @@ import { list, getLink } from "@/api/product";
import goodsList from "@/api/goodsList.mock";
import settings from "@/api/settings";
import { getRiskEvaluation } from "@/api/smartMeasure";
import localStorage from "@/service/localStorage";
import _ from "lodash";
export default {
......@@ -117,7 +118,7 @@ export default {
return {
...settings,
goodsList,
articleUseful: localStorage.getItem("articleUseful"),
articleUseful: localStorage.get("articleUseful"),
articleList: [
{
title: "25~45岁间该怎么买保险",
......@@ -137,7 +138,9 @@ export default {
},
async mounted() {
this.getList();
this.report = await getRiskEvaluation();
if (localStorage.get("mongoToken")) {
this.report = await getRiskEvaluation();
}
},
methods: {
clickUsefulOption(val) {
......
......@@ -30,11 +30,14 @@ import PayCost from "../modules/PayCost";
import StatusDesc from "../modules/StatusDesc";
import CustomerService from "../modules/CustomerService";
import detailPayMixin from "@/views/Policy/mixin/orderInfo.mixin";
import { parseTime } from "@/service/utils";
import _ from "lodash";
import ciiDetail from "@/api/detail.huatai.zhongjixian";
import liDetail from "@/api/detail.huagui.shouxian";
import miDetail from "@/api/detail.taikang.yiliaobaozhang";
import aiDetail from "@/api/detail.zhongan.yiwai";
import biDetail from "@/api/detail.bainian.zhongshen";
export default {
name: "Guarantee",
......@@ -73,14 +76,61 @@ export default {
return ["2", "4"].includes(this.data?.cardConfig?.key);
},
planDetail() {
const { type, planCellInfo: info } = this.productInfo;
const { amountInsured } = this.data.productItem;
const planCellInfo = amountInsured ? info[amountInsured] : info;
return { type, planCellInfo: planCellInfo };
const {
type,
planCellInfo,
securityContent,
termOptions,
benefitOptions,
paywayOptions
} = this.productInfo;
let info = [];
if (["HTDQZJX001", "ZAYWX001"].includes(this.data.productNo)) {
info = [
...planCellInfo[this.data?.productItem?.amountInsured],
...[
{ title: "生效日期", value: this.EffectiveDate },
{ title: "终止日期", value: this.EndDate }
]
];
} else if (["HGSX001", "BNZJX001"].includes(this.data.productNo)) {
info = [
...securityContent,
...[
{
title: "保障期限",
value: termOptions[this.data?.productItem?.policyPeriod - 1].label
},
{ title: "生效日期", value: this.EffectiveDate },
{ title: "受益人", value: "法定" },
{
title: "交费年限",
value: benefitOptions[this.data?.productItem?.payPeriod - 1].label.slice(1)
},
{ title: "交费方式", value: paywayOptions[this.data?.productItem?.payType - 1].label }
]
];
} else if (this.data.productNo === "TKYLX001") {
info = [
...planCellInfo,
...[
{ title: "生效日期", value: this.EffectiveDate },
{ title: "终止日期", value: this.EndDate }
]
];
}
return { type, planCellInfo: info };
},
qaDetail() {
const { qaInfo, protocolData, popupArray } = this.productInfo;
return { qaInfo, protocolData, popupArray };
},
EffectiveDate() {
return parseTime(this.data.policyEffectiveDate, "{y}.{m}.{d}");
},
EndDate() {
return parseTime(this.data.policyEndDate, "{y}.{m}.{d}");
}
},
methods: {
......@@ -89,18 +139,19 @@ export default {
const { productNo } = this.data;
switch (productNo) {
case "TKYLX001":
this.productInfo = miDetail;
this.productInfo = _.cloneDeep(miDetail);
break;
case "HTDQZJX001":
this.productInfo = ciiDetail;
this.productInfo = _.cloneDeep(ciiDetail);
break;
case "BNZJX001":
this.productInfo = _.cloneDeep(biDetail);
break;
case "ZAYWX001":
this.productInfo = aiDetail;
this.productInfo = _.cloneDeep(aiDetail);
break;
case "HGSX001":
this.productInfo = liDetail;
this.productInfo = _.cloneDeep(liDetail);
break;
default:
break;
......
......@@ -433,10 +433,13 @@
}
.Pdb-footer {
position: fixed;
bottom: 40px;
left: 0;
right: 0;
display: flex;
flex-direction: column;
align-items: center;
margin: 231px 0 20px;
span:first-child {
margin-bottom: 2px;
......
<template>
<div>
<div class="collapse">
<div
:class="[{ show: item.show }, 'collapse-item']"
v-for="(item, index) in list"
:key="index"
>
<div class="collapse-item-title" @click="itemClick(index)">
<div class="Ci-title-left">
<span class="Cit-left-txt">{{ item.title }}</span>
<svg-icon icon-class="triangle-down" v-if="item.content" class-name="Cit-left-svg" />
</div>
<span class="Ci-title-right">{{ item.value }}</span>
</div>
<div class="collapse-item-content">
<div class="collapse-item-content-txt" v-html="item.content"></div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "CollapseSecurity",
props: {
collapseData: {
type: Array,
default() {
return [];
}
},
hideIcon: {
type: Boolean,
default: false
}
},
watch: {
collapseData: {
immediate: true,
deep: true,
handler(val) {
console.log("collapseData", val);
this.list = val.map(item => {
item.showItem = false;
return item;
});
}
}
},
data() {
return {
list: []
};
},
methods: {
itemClick(index) {
let _item = this.list[index];
if (!_item.content) return;
_item.show = !_item.show;
this.$set(this.list, index, _item);
}
}
};
</script>
<style lang="less" scoped>
@import "../../../../style/var.less";
.collapse {
&-item {
&-title {
display: flex;
justify-content: space-between;
.svg-icon {
height: 17px;
width: 17px;
transform: rotate(-90deg);
transition: all 0.2s linear;
}
font-size: 12px;
line-height: 24px;
.Ci-title-left {
display: flex;
align-items: center;
font-weight: 400;
color: #666666;
}
.Ci-title-right {
font-weight: 600;
color: #333333;
}
}
&-content {
display: none;
overflow: hidden;
color: @black;
font-size: @font-size-14;
background-color: @gray-1;
border-radius: @border-radius-md;
padding: 16px 16px 16px 12px;
line-height: @line-height-sm + 2;
margin-bottom: 15px;
&-icon {
font-style: normal;
font-weight: @font-weight-bold;
width: 15px;
}
&-txt {
margin-left: 8px;
}
}
&.show {
.collapse-item-title {
.svg-icon {
transform: rotate(0deg);
}
}
.collapse-item-content {
display: flex;
}
}
}
}
</style>
......@@ -3,7 +3,7 @@
<p class="Pdb-insurance-name">{{ productTitle }}</p>
<p class="Pdb-insurance-no">NO.{{ policyNo }}<br />{{ productCompany }}承保</p>
<div class="Pdb-insurance-operation">
<cr-button class="Pdbi-operation-button" @click="goNext">{{ buttonText }}</cr-button>
<cr-button class="Pdbi-operation-button" v-if="isShowRenewalButton" @click="goNext">{{ buttonText }}</cr-button>
<cr-button class="Pdbi-operation-button">申请理赔</cr-button>
</div>
</div>
......@@ -47,6 +47,9 @@ export default {
},
buttonText() {
return this.autoRenewPolicy ? "已开通次年续保" : "已关闭次年续保";
},
isShowRenewalButton() {
return !["BNZJX001", "HGSX001"].includes(this.productNo);
}
},
methods: {
......
......@@ -52,7 +52,7 @@ export default {
pupopData() {
const { currentPupopIndex } = this;
const { popupArray } = this.detail;
return popupArray[currentPupopIndex] || {};
return (currentPupopIndex && popupArray[currentPupopIndex]) || {};
}
},
data() {
......
......@@ -6,14 +6,15 @@
tag="span"
:to="{ name: 'GoodsPlan', query: { type: detail.type } }"
class="Pdbc-head-status"
v-if="data.productNo !== 'BNZJX001'"
>
查看详情
</router-link>
</div>
<div class="Pdb-content-body">
<div class="Pdb-content-body" v-if="data.productNo !== 'BNZJX001'">
<div
class="Pdbc-body-item"
v-for="(item, index) in content"
v-for="(item, index) in detail.planCellInfo"
:key="index"
:class="{ inline: item.inline }"
>
......@@ -22,6 +23,7 @@
<cr-divider v-if="item.divider" />
</div>
</div>
<Collapse v-else :collapse-data="detail.planCellInfo" />
<div class="Pdb-content-operation">
<cr-button class="Pdbc-button" @click="showPdf">电子保单</cr-button>
</div>
......@@ -42,9 +44,13 @@
</div>
</template>
<script>
import { parseTime } from "@/service/utils";
import Collapse from "./Collapse";
export default {
name: "SecurityContent",
components: {
Collapse
},
props: {
data: {
type: Object,
......@@ -55,31 +61,13 @@ export default {
detail: {
type: Object,
default() {
return {};
return {
planCellInfo: [],
type: ""
};
}
}
},
data() {
return {};
},
computed: {
EffectiveDate() {
return parseTime(this.data.policyEffectiveDate, "{y}-{m}-{d}");
},
EndDate() {
return parseTime(this.data.policyEndDate, "{y}-{m}-{d}");
},
content() {
const planCellInfo = this.detail.planCellInfo
? JSON.parse(JSON.stringify(this.detail.planCellInfo))
: [];
planCellInfo.push(
{ title: "生效日期", value: this.EffectiveDate },
{ title: "终止日期", value: this.EndDate }
);
return planCellInfo;
}
},
methods: {
showPdf() {
this.$router.push({ path: "/policy/virtual-detail", query: { url: this.data.policyUrl } });
......
......@@ -4,7 +4,7 @@
<p class="Pdb-status">{{ cardConfig.statusText }}</p>
<div class="Pdb-tips" v-if="cardConfig.recordText" @click="goNext">
<span class="Pdb-tips-text">{{ cardConfig.recordText }}</span>
<svg-icon class-name="Pdb-tips-svg" icon-class="payment-record" />
<svg-icon class-name="Pdb-tips-svg" v-if="isShowIcon" icon-class="payment-record" />
</div>
</div>
</template>
......@@ -34,6 +34,9 @@ export default {
return this.cardConfig.detailText
? `${this.cardConfig.statusText}...`
: this.cardConfig.statusText;
},
isShowIcon() {
return !["13", "14"].includes(this.cardConfig.key);
}
},
methods: {
......
......@@ -59,9 +59,9 @@ export default {
result = {
...result,
permium: `${this.policy?.downPayPrice || 0}/`,
note: `合同终止前,每年${this.policy?.nextPayInfo?.day || "-"}${this.policy?.nextPayInfo
?.day || "-"}${this.policy?.company || "-"}保险公司将在您预留尾号为${this.policy
?.bankCardNoLast4 || "-"}的银行卡内扣除次年保费,请保证余额充足哦。`
note: `合同终止前,每年${this.policy?.nextPayInfo?.month || "-"}${this.policy
?.nextPayInfo?.day || "-"}${this.policy?.company || "-"}保险公司将在您预留尾号为${this
.policy?.bankCardNoLast4 || "-"}的银行卡内扣除次年保费,请保证余额充足哦。`
};
// 缴费方式为“一次结清”时不显示扣费提醒
if (!payType || payType === "一次交清") {
......
......@@ -6,6 +6,7 @@
<script>
import pdf from "vue-pdf";
import CMapReaderFactory from "vue-pdf/src/CMapReaderFactory.js";
import { mapActions } from "vuex";
export default {
name: "PolicyVirtualDetail",
......@@ -32,7 +33,7 @@ export default {
this.pdfTask();
},
pdfTask() {
this.pdfUrl = pdf.createLoadingTask(this.url);
this.pdfUrl = pdf.createLoadingTask({ url: this.url, CMapReaderFactory });
this.pdfUrl.promise
.then(pdf => {
this.pdfNumPages = pdf.numPages;
......
......@@ -20,7 +20,8 @@
}
span:nth-child(2) {
width: 89px;
padding: 1px 0 2px;
padding: 3px 0 0px;
height: 20px;
line-height: normal;
text-align: center;
background: #000000;
......
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