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

feat: 保单详情完善

parent 309bca7a
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Description: 华贵大麦2020定期寿险 * @Description: 华贵大麦2020定期寿险
* @Date: 2020-07-27 15:46:37 * @Date: 2020-07-27 15:46:37
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2020-08-11 16:51:59 * @LastEditTime: 2020-08-11 17:03:21
*/ */
import goodsBg from "@/assets/images/goods/detail/shouxian/bg.png"; import goodsBg from "@/assets/images/goods/detail/shouxian/bg.png";
...@@ -143,6 +143,15 @@ export default { ...@@ -143,6 +143,15 @@ export default {
url: "http://mangguo-contract.qthbx.com/hua-gui-ren-shen-bao-xian-tou-bao-ti-shi-shu-v1/" url: "http://mangguo-contract.qthbx.com/hua-gui-ren-shen-bao-xian-tou-bao-ti-shi-shu-v1/"
} }
], ],
protocolData: [
{ title: "保险条款", id: 0 },
{ title: "投保须知与声明", id: 2 },
{ title: "服务协议", id: 3 },
{ title: "转账授权书", id: 1 },
{ title: "人身保险投保提示书", id: 8 },
{ title: "税收居民身份证明", id: 3 },
{ title: "风控查询授权书", id: 3 }
],
caseInfo: { caseInfo: {
name: "张先生", name: "张先生",
info: "33岁 北京", info: "33岁 北京",
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Description:华太30万轻重疾险 * @Description:华太30万轻重疾险
* @Date: 2020-07-27 15:46:37 * @Date: 2020-07-27 15:46:37
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2020-08-11 14:41:05 * @LastEditTime: 2020-08-11 17:04:45
*/ */
import goodsBg from "@/assets/images/goods/detail/zhongjixian/bg.png"; import goodsBg from "@/assets/images/goods/detail/zhongjixian/bg.png";
...@@ -157,6 +157,12 @@ export default { ...@@ -157,6 +157,12 @@ export default {
url: "http://mangguo-contract.qthbx.com/zi-dong-xu-bao-fu-wu-xie-yi-v1/" url: "http://mangguo-contract.qthbx.com/zi-dong-xu-bao-fu-wu-xie-yi-v1/"
} }
], ],
protocolData: [
{ title: "保险条款", id: 0 },
{ title: "健康告知", id: 1 },
{ title: "投保须知及声明", id: 2 },
{ title: "平台服务协议", id: 3 }
],
caseInfo: { caseInfo: {
name: "吴先生", name: "吴先生",
info: "46岁 北京 有社保", info: "46岁 北京 有社保",
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Description: 泰康600万医疗保障 * @Description: 泰康600万医疗保障
* @Date: 2020-07-27 15:46:37 * @Date: 2020-07-27 15:46:37
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2020-08-11 16:39:54 * @LastEditTime: 2020-08-11 17:05:02
*/ */
import goodsBg from "@/assets/images/goods/detail/yiliaoxian/bg.png"; import goodsBg from "@/assets/images/goods/detail/yiliaoxian/bg.png";
...@@ -121,6 +121,12 @@ export default { ...@@ -121,6 +121,12 @@ export default {
url: "http://mangguo-contract.qthbx.com/zi-dong-xu-bao-fu-wu-xie-yi-v1/" url: "http://mangguo-contract.qthbx.com/zi-dong-xu-bao-fu-wu-xie-yi-v1/"
} }
], ],
protocolData: [
{ title: "保险条款", id: 0 },
{ title: "健康告知", id: 1 },
{ title: "投保须知及声明", id: 2 },
{ title: "平台服务协议", id: 3 }
],
caseInfo: { caseInfo: {
name: "吴先生", name: "吴先生",
info: "46岁 北京 有社保", info: "46岁 北京 有社保",
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Description:众安50万意外险 * @Description:众安50万意外险
* @Date: 2020-07-27 15:46:37 * @Date: 2020-07-27 15:46:37
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2020-08-11 14:41:35 * @LastEditTime: 2020-08-11 17:05:56
*/ */
import goodsBg from "@/assets/images/goods/detail/yiwaixian/bg.png"; import goodsBg from "@/assets/images/goods/detail/yiwaixian/bg.png";
...@@ -132,10 +132,6 @@ export default { ...@@ -132,10 +132,6 @@ export default {
title: "保险条款", title: "保险条款",
url: "http://mangguo-contract.qthbx.com/zhong-an-baoxiantiaokuan-v1/" url: "http://mangguo-contract.qthbx.com/zhong-an-baoxiantiaokuan-v1/"
}, },
{
title: "健康告知",
url: "http://mangguo-contract.qthbx.com/huatai-jian-kang-gao-zhi-v1/"
},
{ {
title: "投保须知及声明", title: "投保须知及声明",
url: "http://mangguo-contract.qthbx.com/zhong-an-tou-bao-xu-zhi-v1/" url: "http://mangguo-contract.qthbx.com/zhong-an-tou-bao-xu-zhi-v1/"
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
class="collapse-item" class="collapse-item"
:class="{ :class="{
show: item.show, show: item.show,
'hide-icon': hideIcon,
more: index > initLength && !more && moreBtn more: index > initLength && !more && moreBtn
}" }"
v-for="(item, index) in list" v-for="(item, index) in list"
...@@ -19,7 +20,11 @@ ...@@ -19,7 +20,11 @@
<i class="collapse-item-content-icon">A:</i> <i class="collapse-item-content-icon">A:</i>
<div class="collapse-item-content-txt" v-html="item.a"></div> <div class="collapse-item-content-txt" v-html="item.a"></div>
</div> </div>
<cr-divider :hairline="false" :style="{ color: '#ebebeb', margin: 0 }" /> <cr-divider
:hairline="false"
:style="{ color: '#ebebeb', margin: 0 }"
v-if="index !== list.length - 1"
/>
</div> </div>
</div> </div>
<div class="collapse-more" :class="{ active: more }" v-if="moreBtn"> <div class="collapse-more" :class="{ active: more }" v-if="moreBtn">
...@@ -49,6 +54,10 @@ export default { ...@@ -49,6 +54,10 @@ export default {
initLength: { initLength: {
type: Number, type: Number,
default: 2 default: 2
},
hideIcon: {
type: Boolean,
default: false
} }
}, },
watch: { watch: {
...@@ -90,6 +99,20 @@ export default { ...@@ -90,6 +99,20 @@ export default {
&.more { &.more {
display: none; display: none;
} }
&.hide-icon {
.collapse-item-title-icon {
display: none;
}
.collapse-item-content-icon {
display: none;
}
.collapse-item-title-txt {
margin-left: 0;
}
.collapse-item-content-txt {
margin-left: 0;
}
}
&-title { &-title {
display: flex; display: flex;
color: @black; color: @black;
......
...@@ -96,7 +96,6 @@ export default { ...@@ -96,7 +96,6 @@ export default {
methods: { methods: {
pdfTask() { pdfTask() {
this.pdfUrl = pdf.createLoadingTask(this.url); this.pdfUrl = pdf.createLoadingTask(this.url);
console.log(this.pdfUrl);
this.pdfUrl.promise this.pdfUrl.promise
.then(pdf => { .then(pdf => {
this.pdfNumPages = pdf.numPages; this.pdfNumPages = pdf.numPages;
......
...@@ -84,6 +84,11 @@ export default [ ...@@ -84,6 +84,11 @@ export default [
name: "Detail", name: "Detail",
component: () => import("../views/Policy/Detail/index.vue") component: () => import("../views/Policy/Detail/index.vue")
}, },
{
path: "/policy/virtual-detail",
name: "PolicyVirtualDetail",
component: () => import("../views/Policy/VirtualDetail/index.vue")
},
{ {
path: "/policy/success", path: "/policy/success",
name: "Sucess", name: "Sucess",
......
...@@ -203,10 +203,10 @@ export default { ...@@ -203,10 +203,10 @@ export default {
}, },
onSubmit() { onSubmit() {
this.goInsureState = true; this.goInsureState = true;
sessionStorage.setItem( // sessionStorage.setItem(
"policyFormData", // "policyFormData",
JSON.stringify(Object.assign(this.formData, { productNo: this.goodId })) // JSON.stringify(Object.assign(this.formData, { productNo: this.goodId }))
); // );
}, },
onFailed(errorInfo) { onFailed(errorInfo) {
const { errors } = errorInfo; const { errors } = errorInfo;
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
:autoRenewPremium="data.autoRenewPremium" :autoRenewPremium="data.autoRenewPremium"
:policyNo="data.policyNo" :policyNo="data.policyNo"
></insurance-card> ></insurance-card>
<security-content :data="data" :detail="SecurityDetail"></security-content> <security-content :data="data" :detail="planDetail"></security-content>
<insurance-service></insurance-service> <insurance-service :detail="qaDetail"></insurance-service>
<customer-service></customer-service> <customer-service></customer-service>
<insurance-recommend class="Pdb-recommend" /> <insurance-recommend class="Pdb-recommend" />
</div> </div>
...@@ -69,11 +69,15 @@ export default { ...@@ -69,11 +69,15 @@ export default {
showPayCost() { showPayCost() {
return ["2", "4"].includes(this.data?.cardConfig?.key); return ["2", "4"].includes(this.data?.cardConfig?.key);
}, },
SecurityDetail() { planDetail() {
const { type, planCellInfo: info } = this.productInfo; const { type, planCellInfo: info } = this.productInfo;
const { amountInsured } = this.data.productItem; const { amountInsured } = this.data.productItem;
const planCellInfo = amountInsured ? info[amountInsured] : info; const planCellInfo = amountInsured ? info[amountInsured] : info;
return { type, planCellInfo: planCellInfo }; return { type, planCellInfo: planCellInfo };
},
qaDetail() {
const { qaInfo, protocolData, popupArray } = this.productInfo;
return { qaInfo, protocolData, popupArray };
} }
}, },
methods: { methods: {
......
...@@ -282,14 +282,25 @@ ...@@ -282,14 +282,25 @@
} }
&-agreement { &-agreement {
display: flex; display: flex;
justify-content: space-between; padding-top: 3px;
font-size: 0; align-items: center;
span { flex-wrap: wrap;
font-size: 12px; a {
font-weight: 400; font-size: 12px;
color: #333333; color: #333;
line-height: 24px; &::after {
} display: inline-block;
content: " ";
width: 0;
height: 12px;
border-right: 1px #333 solid;
margin: 0 5px;
vertical-align: -2px;
}
&:last-child::after {
display: none;
}
}
} }
} }
.Pdb-operation { .Pdb-operation {
......
<template> <template>
<div class="Pdb-service"> <div class="Pdb-service">
<!-- <div class="Pdb-service-head"> <div class="Pdb-service-question" @click="showQa = !showQa">
<span>增值服务</span>
<span>查看详情</span>
</div>
<div class="Pdb-service-body">
<div>
<span>重疾快速就医</span>
<span></span>
</div>
<div>
<span>住院押金垫付</span>
<span></span>
</div>
</div> -->
<div class="Pdb-service-question">
<span>常见问题</span> <span>常见问题</span>
<svg-icon icon-class="arrow" /> <svg-icon icon-class="arrow" :style="{ transform: `rotate(${showQa ? '90deg' : '0deg'})` }" />
</div> </div>
<collapse
:collapse-data="detail.qaInfo"
:more-btn="false"
:hide-icon="true"
:init-length="3"
v-show="showQa"
/>
<cr-divider class="Pdb-service-divider" :hairline="false" /> <cr-divider class="Pdb-service-divider" :hairline="false" />
<div class="Pdb-service-agreement"> <div class="Pdb-service-agreement">
<span>保险条款</span> <a
<span>|</span> href="javascript:;"
<span>健康告知</span> @click="openIframePupop(item.id)"
<span>|</span> v-for="(item, index) in detail.protocolData"
<span>投保须知与声明</span> :key="index"
<span>|</span> >
<span>服务协议</span> {{ item.title }}
</a>
</div> </div>
<popup-with-iframe
v-model="popupShow"
:title="pupopData.title"
:content="pupopData.content"
:url="pupopData.url"
/>
</div> </div>
</template> </template>
<script> <script>
import Collapse from "@/components/Collapse";
import PopupWithIframe from "@/components/PopupWithIframe";
export default { export default {
name: "InsuranceService", name: "InsuranceService",
components: {
PopupWithIframe,
Collapse
},
props: {
detail: {
type: Object,
default() {
return {};
}
}
},
computed: {
pupopData() {
const { currentPupopIndex } = this;
const { popupArray } = this.detail;
return popupArray[currentPupopIndex] || {};
}
},
data() { data() {
return {}; return {
showQa: false,
popupShow: false,
currentPupopIndex: null
};
},
methods: {
openIframePupop(index) {
this.currentPupopIndex = index;
this.popupShow = true;
}
} }
}; };
</script> </script>
......
...@@ -81,8 +81,15 @@ export default { ...@@ -81,8 +81,15 @@ export default {
} }
}, },
methods: { methods: {
showPdf() {} showPdf() {
this.$router.push({ path: "/policy/virtual-detail", query: { url: this.data.policyUrl } });
}
} }
}; };
</script> </script>
<style lang="less" src="../index.less" scoped></style> <style lang="less" src="../index.less" scoped>
container {
width: 100%;
height: 100%;
}
</style>
<template>
<div class="container">
<pdf v-for="(item, index) in pdfNumPages" :key="index" :src="pdfUrl" :page="index + 1" />
</div>
</template>
<script>
import pdf from "vue-pdf";
export default {
name: "PolicyVirtualDetail",
components: {
pdf
},
data() {
return {
url: "",
pdfUrl: "",
pdfNumPages: null
};
},
mounted() {
this.setDetail();
},
methods: {
setDetail() {
const { url } = this.$route.query;
if (!url) this.$router.back();
this.url = url;
this.pdfTask();
},
pdfTask() {
this.pdfUrl = pdf.createLoadingTask(this.url);
this.pdfUrl.promise
.then(pdf => {
this.pdfNumPages = pdf.numPages;
})
.catch(err => {
console.error(err);
});
}
}
};
</script>
<style lang="less" scoped></style>
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