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

feat: 详情对接

parent 95bf561f
...@@ -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-03 15:30:14 * @LastEditTime: 2020-08-05 16:56:21
*/ */
import goodsBg from "@/assets/images/goods/detail/shouxian/bg.png"; import goodsBg from "@/assets/images/goods/detail/shouxian/bg.png";
...@@ -19,6 +19,7 @@ export default { ...@@ -19,6 +19,7 @@ export default {
type: "huagui", type: "huagui",
company: "", company: "",
title: "大麦2020定期寿险", title: "大麦2020定期寿险",
price: [155, "元/年起"],
insuredNum: 0, insuredNum: 0,
stamp: false stamp: false
}, },
...@@ -77,13 +78,6 @@ export default { ...@@ -77,13 +78,6 @@ export default {
{ label: "月缴<small style='color: #999;font-size: 11px'>(12期)</small>", value: "1" }, { label: "月缴<small style='color: #999;font-size: 11px'>(12期)</small>", value: "1" },
{ label: "一次交清", value: "2" } { label: "一次交清", value: "2" }
], ],
goodActionInfo: {
title: ["155", "元/年起"]
},
goodBuyModalInfo: [
{ title: "首月保费", value: `3元` },
{ title: "次月保费", value: "5.6元/月起(共11期)" }
],
popupArray: [ popupArray: [
{ {
title: "保险条款", title: "保险条款",
......
...@@ -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-07-29 19:56:56 * @LastEditTime: 2020-08-05 16:36:29
*/ */
import goodsBg from "@/assets/images/goods/detail/zhongjixian/bg.png"; import goodsBg from "@/assets/images/goods/detail/zhongjixian/bg.png";
...@@ -21,7 +21,8 @@ export default { ...@@ -21,7 +21,8 @@ export default {
company: "华泰财险", company: "华泰财险",
title: "30万重疾轻症保障", title: "30万重疾轻症保障",
sub: "100种重症+40种轻症确诊即赔", sub: "100种重症+40种轻症确诊即赔",
price: "首月<strong>3</strong>元<small>次月5.6元/月起</small>", price: [3, "", "首月"],
subPrice: [5.6, "元/月起", "次月", "(共11期)"],
insuredNum: 0, insuredNum: 0,
stamp: true stamp: true
}, },
...@@ -89,14 +90,6 @@ export default { ...@@ -89,14 +90,6 @@ export default {
{ label: "月缴<small style='color: #999;font-size: 11px'>(12期)</small>", value: "1" }, { label: "月缴<small style='color: #999;font-size: 11px'>(12期)</small>", value: "1" },
{ label: "一次交清", value: "2" } { label: "一次交清", value: "2" }
], ],
goodActionInfo: {
title: ["3", "", "首月"],
sub: "次月5.6元/月起"
},
goodBuyModalInfo: [
{ title: "首月保费", value: `3元` },
{ title: "次月保费", value: "5.6元/月起(共11期)" }
],
noticeCellInfo: { noticeCellInfo: {
"3": [ "3": [
{ title: "投保年龄", value: `30天~50周岁` }, { title: "投保年龄", value: `30天~50周岁` },
......
...@@ -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-03 15:11:55 * @LastEditTime: 2020-08-05 16:19:26
*/ */
import goodsBg from "@/assets/images/goods/detail/yiliaoxian/bg.png"; import goodsBg from "@/assets/images/goods/detail/yiliaoxian/bg.png";
...@@ -21,7 +21,8 @@ export default { ...@@ -21,7 +21,8 @@ export default {
company: "泰康在线", company: "泰康在线",
title: "1000万医疗保障", title: "1000万医疗保障",
sub: "责任内100%报销住院医疗费", sub: "责任内100%报销住院医疗费",
price: "首月<strong>1</strong>元<small>次月3.6元/月起</small>", price: [1, "", "首月"],
subPrice: [3.6, "元/月起", "次月", "(共11期)"],
insuredNum: 0, insuredNum: 0,
stamp: true stamp: true
}, },
...@@ -78,14 +79,6 @@ export default { ...@@ -78,14 +79,6 @@ export default {
{ label: "月缴<small style='color: #999;font-size: 11px'>(12期)</small>", value: "1" }, { label: "月缴<small style='color: #999;font-size: 11px'>(12期)</small>", value: "1" },
{ label: "一次交清", value: "2" } { label: "一次交清", value: "2" }
], ],
goodActionInfo: {
title: ["3", "", "首月"],
sub: "次月5.6元/月起"
},
goodBuyModalInfo: [
{ title: "首月保费", value: `1元` },
{ title: "次月保费", value: "3.6元/月起(共11期)" }
],
noticeCellInfo: [ noticeCellInfo: [
{ title: "投保年龄", value: `30~65周岁` }, { title: "投保年龄", value: `30~65周岁` },
{ title: "保障期限", value: "1年(可续保至99周岁)" }, { title: "保障期限", value: "1年(可续保至99周岁)" },
...@@ -94,8 +87,7 @@ export default { ...@@ -94,8 +87,7 @@ export default {
title: "保费", title: "保费",
value: { value: {
needSlot: true, needSlot: true,
tpl: "保费于被保人年龄、有无社保有关<br />首月1元,次月3.6元/月起", tpl: "保费于被保人年龄、有无社保有关<br />首月1元,次月3.6元/月起"
longTxt: true
} }
} }
], ],
......
...@@ -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-03 14:33:37 * @LastEditTime: 2020-08-05 16:38:21
*/ */
import goodsBg from "@/assets/images/goods/detail/yiwaixian/bg.png"; import goodsBg from "@/assets/images/goods/detail/yiwaixian/bg.png";
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
company: "众安保险", company: "众安保险",
title: "100万意外保障", title: "100万意外保障",
sub: "最高可赔400万 包含猝死责任", sub: "最高可赔400万 包含猝死责任",
price: "<strong>53</strong>元/年起", price: [53, "元/年起"],
insuredNum: 0, insuredNum: 0,
stamp: true stamp: true
}, },
...@@ -108,12 +108,6 @@ export default { ...@@ -108,12 +108,6 @@ export default {
{ label: "月缴<small style='color: #999;font-size: 11px'>(12期)</small>", value: "1" }, { label: "月缴<small style='color: #999;font-size: 11px'>(12期)</small>", value: "1" },
{ label: "一次交清", value: "2" } { label: "一次交清", value: "2" }
], ],
goodActionInfo: {
title: ["53", "元/年", ""]
},
goodBuyModalInfo: [
{ title: "每年保费", value: `350元` }
],
noticeCellInfo: { noticeCellInfo: {
"10": [ "10": [
{ title: "投保年龄", value: `18周岁~65周岁` }, { title: "投保年龄", value: `18周岁~65周岁` },
......
...@@ -14,14 +14,14 @@ import life from "@/assets/images/user/life@2x.png"; ...@@ -14,14 +14,14 @@ import life from "@/assets/images/user/life@2x.png";
export default [ export default [
{ {
id: 1, id: 1,
itype: "mi", itype: "mi", // 保险类型,英文收字母缩写,详情需要传
scope: [1, 2, 3], // 范围,列表中区分类型用,1成人 2老年 3少儿 scope: [1, 2, 3], // 范围,列表中区分类型用,1成人 2老年 3少儿
img: good01, img: good01,
title: "万家保·百万医疗险", title: "万家保·百万医疗险",
sub: "产品优势", sub: "看病报销医药费,最高600万",
glory: "好评榜第1名", glory: "好评榜第1名",
price: "0", price: "1",
unit: "", unit: "首月",
allow: true, allow: true,
termType: "short", termType: "short",
icon_closed: medical_closed, icon_closed: medical_closed,
...@@ -49,13 +49,13 @@ export default [ ...@@ -49,13 +49,13 @@ export default [
{ {
id: 3, id: 3,
itype: "cii", itype: "cii",
scope: [1, 2], scope: [1, 3],
img: good02, img: good02,
title: "康惠保2020终身重疾", title: "百年康惠保(2.0)重大疾病",
sub: "100种重疾+40种轻症", sub: "终身保障155种重疾,最多赔付6次",
glory: "", glory: "",
price: "3", price: "256",
unit: "首月", unit: "年起",
allow: true, allow: true,
termType: "long", termType: "long",
icon_closed: illness_closed, icon_closed: illness_closed,
...@@ -69,10 +69,10 @@ export default [ ...@@ -69,10 +69,10 @@ export default [
scope: [1, 2, 3], scope: [1, 2, 3],
img: good03, img: good03,
title: "万家保·综合意外险", title: "万家保·综合意外险",
sub: "产品优势", sub: "意外风险覆盖全,最高100万保额",
glory: "开车必备", glory: "开车必备",
price: "0", price: "145",
unit: "", unit: "年起",
allow: true, allow: true,
termType: "short", termType: "short",
icon_closed: casualty_closed, icon_closed: casualty_closed,
...@@ -83,13 +83,13 @@ export default [ ...@@ -83,13 +83,13 @@ export default [
{ {
id: 5, id: 5,
itype: "li", itype: "li",
scope: [1, 3], scope: [1, 2],
img: good04, img: good04,
title: "华贵大麦2020定期寿险", title: "华贵大麦2020定期寿险",
sub: "产品优势", sub: "最高350万保额,顶梁柱必备",
glory: "", glory: "顶梁柱必备",
price: "0", price: "15.5",
unit: "", unit: "年起",
allow: true, allow: true,
termType: "long", termType: "long",
icon_closed: life_closed, icon_closed: life_closed,
......
...@@ -6,7 +6,7 @@ export const list = param => { ...@@ -6,7 +6,7 @@ export const list = param => {
}; };
// 产品详情 // 产品详情
export const addPolicyDetail = param => { export const detail = param => {
return req.get("product/detail", param); return req.get("product/detail", param);
}; };
......
...@@ -38,20 +38,7 @@ export default { ...@@ -38,20 +38,7 @@ export default {
data() { data() {
return { return {
showAuth: true, showAuth: true,
userInfo: [ userInfo: []
{
label: "手机号码",
value: xyqbUserInfo.phoneNoMask
},
{
label: "姓名",
value: xyqbUserInfo.nameMask
},
{
label: "身份证号码",
value: xyqbUserInfo.idNoMask
}
]
}; };
}, },
watch: { watch: {
...@@ -62,6 +49,22 @@ export default { ...@@ -62,6 +49,22 @@ export default {
} }
} }
}, },
created() {
this.userInfo = [
{
label: "手机号码",
value: xyqbUserInfo.phoneNoMask
},
{
label: "姓名",
value: xyqbUserInfo.nameMask
},
{
label: "身份证号码",
value: xyqbUserInfo.idNoMask
}
];
},
computed: { computed: {
...mapState(["showAuthXyqb"]) ...mapState(["showAuthXyqb"])
}, },
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
:value="item.value.tpl || item.value" :value="item.value.tpl || item.value"
:class="{ :class="{
'compact-cell': 1, 'compact-cell': 1,
'compact-cell_br': item.value.longTxt,
'compact-cell_divider': item.divider, 'compact-cell_divider': item.divider,
'compact-cell_inline': item.inline 'compact-cell_inline': item.inline
}" }"
......
...@@ -13,7 +13,11 @@ ...@@ -13,7 +13,11 @@
<strong>{{ content.title[0] || "" }}</strong> <strong>{{ content.title[0] || "" }}</strong>
{{ content.title[1] || "" }} {{ content.title[1] || "" }}
</h6> </h6>
<small v-if="content.sub">{{ content.sub }}</small> <small v-if="content.sub">
{{ content.sub[2] || "" }}
{{ content.sub[0] || "" }}
{{ content.sub[1] || "" }}
</small>
</slot> </slot>
</div> </div>
<div class="good-action-right"> <div class="good-action-right">
......
<template> <template>
<div class="goods-list"> <div class="goods-list">
<div v-if="hasChildren"> <div v-if="hasChildren">
<template v-for="(item, index) in goodsList"> <template v-for="(item, index) in list">
<div class="goods-list-head" :key="'head' + index"> <div class="goods-list-head" :key="'head' + index" v-if="item.children.length > 0">
<slot :data="item"> <slot :data="item">
<h5>{{ item.title || "-" }}</h5> <h5>{{ item.title || "-" }}</h5>
<small> <small>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
type="flex" type="flex"
class="goods-list-item" class="goods-list-item"
:class="{ 'not-allow': !it.allow }" :class="{ 'not-allow': !it.allow }"
v-for="(it, idx) in goodsList" v-for="(it, idx) in list"
:key="idx" :key="idx"
@click.native="clickItem(it)" @click.native="clickItem(it)"
> >
...@@ -80,28 +80,12 @@ export default { ...@@ -80,28 +80,12 @@ export default {
default() { default() {
return []; return [];
} }
},
sort: {
type: Number,
default: 0
} }
}, },
computed: { computed: {
// TODO // TODO
hasChildren: function() { hasChildren: function() {
return this.list[0] && this.list[0].children && this.list[0].children.length > 0; return this.list[0] && this.list[0].children && this.list[0].children.length > 0;
},
goodsList() {
const { sort, list, hasChildren } = this;
if (sort === 0) {
return list;
} else {
if (hasChildren) {
return list;
} else {
return list.filter(item => item.scope.includes(sort));
}
}
} }
}, },
methods: { methods: {
......
...@@ -39,6 +39,9 @@ export default { ...@@ -39,6 +39,9 @@ export default {
height: 24px; height: 24px;
color: #333; color: #333;
font-size: 14px; font-size: 14px;
display: flex;
justify-content: space-between;
align-items: center;
} }
.svg-icon { .svg-icon {
height: 16px; height: 16px;
......
...@@ -40,6 +40,9 @@ export default { ...@@ -40,6 +40,9 @@ export default {
height: 24px; height: 24px;
color: #333; color: #333;
font-size: 14px; font-size: 14px;
display: flex;
justify-content: space-between;
align-items: center;
} }
.svg-icon { .svg-icon {
height: 16px; height: 16px;
......
...@@ -85,9 +85,10 @@ import ProtocolRead from "./modules/ProtocolRead"; ...@@ -85,9 +85,10 @@ import ProtocolRead from "./modules/ProtocolRead";
import NavTab from "./modules/NavTab"; import NavTab from "./modules/NavTab";
import Detail from "@/api/detail.zhongan.yiwai"; import Detail from "@/api/detail.zhongan.yiwai";
import { detail } from "@/api/product";
export default { export default {
name: "GoodsDetail-CII", name: "GoodsDetail-AI",
components: { components: {
DetailHeader, DetailHeader,
DetailFooter, DetailFooter,
...@@ -114,10 +115,12 @@ export default { ...@@ -114,10 +115,12 @@ export default {
data() { data() {
return { return {
...Detail, ...Detail,
goodActionInfo: {},
goodBuyModalInfo: [],
popupShow: false, popupShow: false,
currentPupopIndex: null, currentPupopIndex: null,
formData: { formData: {
planValue: "5", planValue: "10",
insured: "1", insured: "1",
payway: "1", payway: "1",
auto: false, auto: false,
...@@ -127,6 +130,16 @@ export default { ...@@ -127,6 +130,16 @@ export default {
showLayer: false showLayer: false
}; };
}, },
watch: {
headerInfo: {
deep: true,
handler(val) {
const { price } = val;
this.goodActionInfo = { title: price };
this.goodBuyModalInfo = [{ title: `${price[2]}保费`, value: `${price[0]}${price[1]}` }];
}
}
},
computed: { computed: {
pupopData() { pupopData() {
const { popupArray, currentPupopIndex } = this; const { popupArray, currentPupopIndex } = this;
...@@ -150,6 +163,9 @@ export default { ...@@ -150,6 +163,9 @@ export default {
}; };
} }
}, },
mounted() {
this.getDetail();
},
methods: { methods: {
openIframePupop(index) { openIframePupop(index) {
if (index === 4) { if (index === 4) {
...@@ -158,6 +174,14 @@ export default { ...@@ -158,6 +174,14 @@ export default {
} }
this.currentPupopIndex = index; this.currentPupopIndex = index;
this.popupShow = true; this.popupShow = true;
},
async getDetail() {
this.goodId = this.$route.query.id;
const res = await detail({ productNo: this.goodId });
if (res) {
this.headerInfo.price[0] = res.price;
this.headerInfo.company = res.companyName;
}
} }
} }
}; };
......
...@@ -83,6 +83,7 @@ import ProtocolRead from "./modules/ProtocolRead"; ...@@ -83,6 +83,7 @@ import ProtocolRead from "./modules/ProtocolRead";
import NavTab from "./modules/NavTab"; import NavTab from "./modules/NavTab";
import Detail from "@/api/detail.huatai.zhongjixian"; import Detail from "@/api/detail.huatai.zhongjixian";
import { detail, trail } from "@/api/product";
export default { export default {
name: "GoodsDetail-CII", name: "GoodsDetail-CII",
...@@ -112,12 +113,18 @@ export default { ...@@ -112,12 +113,18 @@ export default {
data() { data() {
return { return {
...Detail, ...Detail,
calTimer: null,
goodActionInfo: {},
goodBuyModalInfo: [],
popupShow: false, popupShow: false,
currentPupopIndex: null, currentPupopIndex: null,
formData: { formData: {
planValue: "3", name: "",
idNo: "",
socialSecurity: "1",
insured: "1", insured: "1",
payway: "1", type: "1",
planValue: "3",
auto: false, auto: false,
pact: false pact: false
}, },
...@@ -125,6 +132,48 @@ export default { ...@@ -125,6 +132,48 @@ export default {
showLayer: false showLayer: false
}; };
}, },
watch: {
headerInfo: {
deep: true,
handler(val) {
console.log(val);
const { price, subPrice } = val;
this.goodActionInfo = {
title: price,
sub: subPrice
};
this.goodBuyModalInfo = [
{ title: `${price[2]}保费`, value: `${price[0]}${price[1]}` },
{ title: `${subPrice[2]}保费`, value: `${subPrice[0]}${subPrice[1]}${subPrice[3]}` }
];
}
},
formData: {
deep: true,
handler(val, oldVal) {
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;
this.calTimer = setTimeout(() => {
this.calFee({ name, idNo, socialSecurity, type });
}, 600);
}
}
},
computed: { computed: {
pupopData() { pupopData() {
const { popupArray, currentPupopIndex } = this; const { popupArray, currentPupopIndex } = this;
...@@ -148,6 +197,9 @@ export default { ...@@ -148,6 +197,9 @@ export default {
}; };
} }
}, },
mounted() {
this.getDetail();
},
methods: { methods: {
openIframePupop(index) { openIframePupop(index) {
if (index === 4) { if (index === 4) {
...@@ -163,7 +215,32 @@ export default { ...@@ -163,7 +215,32 @@ export default {
onFailed(errorInfo) { onFailed(errorInfo) {
const { errors } = errorInfo; const { errors } = errorInfo;
this.$notify({ type: "warning", message: errors[0].message }); this.$notify({ type: "warning", message: errors[0].message });
this.goInsureState = true; // this.goInsureState = true;
},
async getDetail() {
this.goodId = this.$route.query.id;
const res = await detail({ productNo: this.goodId });
if (res) {
this.headerInfo.price[0] = res.firstMonthPrice;
this.headerInfo.subPrice[0] = res.price;
this.headerInfo.company = res.companyName;
}
},
async calFee({ name, idNo, socialSecurity, type }) {
let { price, subPrice } = this.headerInfo;
const res = await trail({ name, idNo, socialSecurity, type });
if (res) {
price[0] = res.firstPrice;
subPrice[0] = res.regularPrice;
this.goodActionInfo = {
title: price,
sub: subPrice
};
this.goodBuyModalInfo = [
{ title: `${price[2]}保费`, value: `${price[0]}${price[1]}` },
{ title: `${subPrice[2]}保费`, value: `${subPrice[0]}${subPrice[1]}${subPrice[3]}` }
];
}
} }
} }
}; };
......
...@@ -21,7 +21,9 @@ ...@@ -21,7 +21,9 @@
<compactCellGroup :cell-data="planCellInfo" :text-bold="true" /> <compactCellGroup :cell-data="planCellInfo" :text-bold="true" />
<div class="cal-footer" slot="footer"> <div class="cal-footer" slot="footer">
<div class="cal-footer-num"> <div class="cal-footer-num">
<h4>155<small>元/年起</small></h4> <h4>
{{ headerInfo.price[0] }}<small>{{ headerInfo.price[1] }}</small>
</h4>
</div> </div>
<cr-button type="warning" @click="openIframePupop(6)">算一算保费</cr-button> <cr-button type="warning" @click="openIframePupop(6)">算一算保费</cr-button>
</div> </div>
...@@ -108,9 +110,10 @@ import ProtocolRead from "./modules/ProtocolRead"; ...@@ -108,9 +110,10 @@ import ProtocolRead from "./modules/ProtocolRead";
import NavTab from "./modules/NavTab"; import NavTab from "./modules/NavTab";
import Detail from "@/api/detail.huagui.shouxian"; import Detail from "@/api/detail.huagui.shouxian";
import { detail } from "@/api/product";
export default { export default {
name: "GoodsDetail-CII", name: "GoodsDetail-LI",
components: { components: {
DetailHeader, DetailHeader,
DetailFooter, DetailFooter,
...@@ -134,6 +137,7 @@ export default { ...@@ -134,6 +137,7 @@ export default {
data() { data() {
return { return {
...Detail, ...Detail,
goodActionInfo: {},
popupShow: false, popupShow: false,
currentPupopIndex: null, currentPupopIndex: null,
formData: { formData: {
...@@ -147,6 +151,13 @@ export default { ...@@ -147,6 +151,13 @@ export default {
watch: { watch: {
popupShow(val) { popupShow(val) {
if (!val && this.currentPupopIndex === 6) this.currentPupopIndex = null; if (!val && this.currentPupopIndex === 6) this.currentPupopIndex = null;
},
headerInfo: {
deep: true,
handler(val) {
const { price } = val;
this.goodActionInfo = { title: price };
}
} }
}, },
computed: { computed: {
...@@ -155,6 +166,9 @@ export default { ...@@ -155,6 +166,9 @@ export default {
return popupArray[currentPupopIndex] || {}; return popupArray[currentPupopIndex] || {};
} }
}, },
mounted() {
this.getDetail();
},
methods: { methods: {
openIframePupop(index) { openIframePupop(index) {
if (index === 4) { if (index === 4) {
...@@ -163,6 +177,14 @@ export default { ...@@ -163,6 +177,14 @@ export default {
} }
this.currentPupopIndex = index; this.currentPupopIndex = index;
this.popupShow = true; this.popupShow = true;
},
async getDetail() {
this.goodId = this.$route.query.id;
const res = await detail({ productNo: this.goodId });
if (res) {
this.headerInfo.price[0] = res.price;
this.headerInfo.company = res.companyName;
}
} }
} }
}; };
......
...@@ -81,10 +81,11 @@ import AutoDeduct from "./modules/AutoDeduct"; ...@@ -81,10 +81,11 @@ import AutoDeduct from "./modules/AutoDeduct";
import ProtocolRead from "./modules/ProtocolRead"; import ProtocolRead from "./modules/ProtocolRead";
import NavTab from "./modules/NavTab"; import NavTab from "./modules/NavTab";
import { detail } from "@/api/product";
import Detail from "@/api/detail.taikang.yiliaobaozhang"; import Detail from "@/api/detail.taikang.yiliaobaozhang";
export default { export default {
name: "GoodsDetail-CII", name: "GoodsDetail-MI",
components: { components: {
DetailHeader, DetailHeader,
DetailFooter, DetailFooter,
...@@ -112,6 +113,8 @@ export default { ...@@ -112,6 +113,8 @@ export default {
data() { data() {
return { return {
...Detail, ...Detail,
goodActionInfo: {},
goodBuyModalInfo: [],
popupShow: false, popupShow: false,
currentPupopIndex: null, currentPupopIndex: null,
formData: { formData: {
...@@ -125,6 +128,22 @@ export default { ...@@ -125,6 +128,22 @@ export default {
showLayer: false showLayer: false
}; };
}, },
watch: {
headerInfo: {
deep: true,
handler(val) {
const { price, subPrice } = val;
this.goodActionInfo = {
title: price,
sub: subPrice
};
this.goodBuyModalInfo = [
{ title: `${price[2]}保费`, value: `${price[0]}${price[1]}` },
{ title: `${subPrice[2]}保费`, value: `${subPrice[0]}${subPrice[1]}${subPrice[3]}` }
];
}
}
},
computed: { computed: {
pupopData() { pupopData() {
const { popupArray, currentPupopIndex } = this; const { popupArray, currentPupopIndex } = this;
...@@ -139,6 +158,9 @@ export default { ...@@ -139,6 +158,9 @@ export default {
}; };
} }
}, },
mounted() {
this.getDetail();
},
methods: { methods: {
openIframePupop(index) { openIframePupop(index) {
if (index === 4) { if (index === 4) {
...@@ -147,6 +169,15 @@ export default { ...@@ -147,6 +169,15 @@ export default {
} }
this.currentPupopIndex = index; this.currentPupopIndex = index;
this.popupShow = true; this.popupShow = true;
},
async getDetail() {
this.goodId = this.$route.query.id;
const res = await detail({ productNo: this.goodId });
if (res) {
this.headerInfo.price[0] = res.firstMonthPrice;
this.headerInfo.subPrice[0] = res.price;
this.headerInfo.company = res.companyName;
}
} }
} }
}; };
......
...@@ -22,7 +22,7 @@ export default { ...@@ -22,7 +22,7 @@ export default {
}, },
data() { data() {
return { return {
detailType: "li", detailType: "",
show: true show: true
}; };
}, },
......
<template functional> <template functional>
<card <card
title="理赔流程" title="理赔流程"
:option="props.more ? ['了解更多理赔信息'] : ''" :option="props.more ? ['了解更多理赔信息'] : []"
@option-click="listeners.click" @option-click="listeners.click"
> >
<div class="cps-process-list"> <div class="cps-process-list">
......
<template functional> <template functional>
<card title="常见问题" class="qa-header"> <card title="常见问题" class="qa-header">
<collapse :collapse-data="props.qaData" :more-btn="props.more" /> <collapse :collapse-data="props.qaData" :more-btn="props.more" :init-length="4" />
</card> </card>
</template> </template>
......
...@@ -21,7 +21,14 @@ ...@@ -21,7 +21,14 @@
<small class="det-hd-insured-sub"> <small class="det-hd-insured-sub">
{{ props.det.sub }} {{ props.det.sub }}
</small> </small>
<h5 class="det-hd-insured-price" v-html="props.det.price"></h5> <h5 class="det-hd-insured-price" v-if="props.det.price">
<!-- eslint-disable-next-line prettier/prettier -->
{{ props.det.price[2] || "" }}<strong>{{ props.det.price[0] || "" }}</strong>{{ props.det.price[1] || "" }}
<small v-if="props.det.subPrice">
<!-- eslint-disable-next-line prettier/prettier -->
{{ props.det.subPrice[2] || "" }}{{ props.det.subPrice[0] || "" }}{{ props.det.subPrice[1] || "" }}
</small>
</h5>
<cr-button type="warning" block @click="listeners.click" native-type="submit"> <cr-button type="warning" block @click="listeners.click" native-type="submit">
立即开启保障 立即开启保障
</cr-button> </cr-button>
...@@ -49,6 +56,7 @@ export default { ...@@ -49,6 +56,7 @@ export default {
title: "", title: "",
sub: "", sub: "",
price: "", price: "",
subPrice: "",
insuredNum: 0 insuredNum: 0
}; };
} }
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
placeholder="请输入投保人姓名" placeholder="请输入投保人姓名"
label="姓名" label="姓名"
:rules="[{ required: true, message: '请输入姓名' }]" :rules="[{ required: true, message: '请输入姓名' }]"
@click.native="inputClick"
/> />
<cr-field <cr-field
name="selfIdNo" name="selfIdNo"
...@@ -15,17 +16,20 @@ ...@@ -15,17 +16,20 @@
placeholder="信息保密,仅用于投保" placeholder="信息保密,仅用于投保"
label="身份证号" label="身份证号"
:rules="[{ required: true, message: '请输入身份证号' }]" :rules="[{ required: true, message: '请输入身份证号' }]"
@click.native="inputClick"
/> />
<cr-field <cr-field
name="selfIdNo" name="selfPhone"
v-model="formData.selfIdNo" v-model="formData.selfPhone"
placeholder="请输入您的手机号码" placeholder="请输入您的手机号码"
label="手机号码" label="手机号码"
:rules="[{ required: true, message: '请输入手机号码' }]" :rules="[{ required: true, message: '请输入手机号码' }]"
@click.native="inputClick"
/> />
<cr-field <cr-field
name="selfIdNo" name="selfCode"
v-model="formData.selfIdNo" v-model="formData.selfCode"
v-if="xyqbAuthState !== 4"
placeholder="请输入短信验证码" placeholder="请输入短信验证码"
label="验证码" label="验证码"
:rules="[{ required: true, message: '请输入验证码' }]" :rules="[{ required: true, message: '请输入验证码' }]"
...@@ -34,18 +38,24 @@ ...@@ -34,18 +38,24 @@
</cr-field> </cr-field>
</cr-cell-group> </cr-cell-group>
<h6 class="insure-form-title">为谁投保</h6> <h6 class="insure-form-title">为谁投保</h6>
<cr-radio-btn v-model="formData.insured" :radio-data="radioOptions.insuredOptions" /> <cr-radio-btn
v-model="formData.insured"
:radio-data="radioOptions.insuredOptions"
class="insured"
/>
<cr-cell-group class="insure-form"> <cr-cell-group class="insure-form">
<cr-field <cr-field
name="relativeName" name="relativeName"
v-model="formData.relativeName" v-if="formData.insured !== '1'"
v-model="formData.name"
placeholder="请输入被保人姓名" placeholder="请输入被保人姓名"
label="姓名" label="姓名"
:rules="[{ required: true, message: '请输入姓名' }]" :rules="[{ required: true, message: '请输入姓名' }]"
/> />
<cr-field <cr-field
name="relativeIdNo" name="relativeIdNo"
v-model="formData.relativeIdNo" v-if="formData.insured !== '1'"
v-model="formData.idNo"
placeholder="信息保密,仅用于投保" placeholder="信息保密,仅用于投保"
label="身份证号" label="身份证号"
:rules="[{ required: true, message: '请输入身份证号' }]" :rules="[{ required: true, message: '请输入身份证号' }]"
...@@ -56,15 +66,15 @@ ...@@ -56,15 +66,15 @@
<cr-icon type="question-o" color="#ccc" /> <cr-icon type="question-o" color="#ccc" />
</template> </template>
<cr-radio-btn <cr-radio-btn
name="medical" name="socialSecurity"
v-model="formData.medical" v-model="formData.socialSecurity"
:radio-data="radioOptions.medicalOptions" :radio-data="radioOptions.medicalOptions"
/> />
</cr-cell> </cr-cell>
<cr-cell title="缴费方式" class="insure-form-item_nobg"> <cr-cell title="缴费方式" class="insure-form-item_nobg">
<cr-radio-btn <cr-radio-btn
name="payway" name="type"
v-model="formData.payway" v-model="formData.type"
:radio-data="radioOptions.paywayOptions" :radio-data="radioOptions.paywayOptions"
/> />
</cr-cell> </cr-cell>
...@@ -74,6 +84,8 @@ ...@@ -74,6 +84,8 @@
<script> <script>
import Card from "@/components/Card"; import Card from "@/components/Card";
import { mapState, mapActions } from "vuex";
import localStorage from "@/service/localStorage";
import CrRadioBtn from "@/components/CrRadioBtn"; import CrRadioBtn from "@/components/CrRadioBtn";
const DATA_CHANGE_EVENT = "input"; const DATA_CHANGE_EVENT = "input";
export default { export default {
...@@ -98,7 +110,9 @@ export default { ...@@ -98,7 +110,9 @@ export default {
}, },
data() { data() {
return { return {
formData: {} formData: {},
mongoToken: localStorage.get("mongoToken"),
xyqbAuthState: localStorage.get("xyqbAuthState")
}; };
}, },
watch: { watch: {
...@@ -114,6 +128,30 @@ export default { ...@@ -114,6 +128,30 @@ export default {
handler(val) { handler(val) {
this.$emit(DATA_CHANGE_EVENT, val); this.$emit(DATA_CHANGE_EVENT, val);
} }
},
showAuthXyqb: {
immediate: true,
handler(val) {
if (val === 4) {
const xyqbUserInfo = localStorage.get("xyqbUserInfo");
this.formData.selfName = xyqbUserInfo.nameMask;
this.formData.selfIdNo = xyqbUserInfo.idNoMask;
this.formData.selfPhone = xyqbUserInfo.phoneNoMask;
this.xyqbAuthState = localStorage.get("xyqbAuthState");
this.$forceUpdate();
}
}
}
},
computed: {
...mapState(["showAuthXyqb"])
},
methods: {
...mapActions(["setAuthXyqb"]),
inputClick() {
if (this.showAuthXyqb === 1) {
this.setAuthXyqb(2);
}
} }
} }
}; };
...@@ -168,4 +206,7 @@ export default { ...@@ -168,4 +206,7 @@ export default {
} }
} }
} }
.insured {
margin-bottom: 20px;
}
</style> </style>
...@@ -8,8 +8,7 @@ ...@@ -8,8 +8,7 @@
<cr-tabbar-item>少儿</cr-tabbar-item> <cr-tabbar-item>少儿</cr-tabbar-item>
</cr-tabbar> </cr-tabbar>
</cr-sticky> </cr-sticky>
<good-list :list="goodsList" /> <good-list :list="list" />
<record-layer v-model="showLayer" desc="敬请期待"></record-layer>
<ai-test-tip @click.native="showLayer = true" /> <ai-test-tip @click.native="showLayer = true" />
<copyright :logo="true" /> <copyright :logo="true" />
<tabbar></tabbar> <tabbar></tabbar>
...@@ -18,51 +17,96 @@ ...@@ -18,51 +17,96 @@
<script> <script>
import goodsList from "@/api/goodsList.mock"; import goodsList from "@/api/goodsList.mock";
import { list } from "@/api/product";
import AiTestTip from "./modules/AiTestTip"; import AiTestTip from "./modules/AiTestTip";
import GoodList from "@/components/GoodList/index"; import GoodList from "@/components/GoodList/index";
import Tabbar from "@/components/Tabbar"; import Tabbar from "@/components/Tabbar";
import copyright from "@/components/Copyright"; import copyright from "@/components/Copyright";
import RecordLayer from "@/components/RecordLayer";
const categoryList = [
{
title: "住院医疗险",
sub: "报销医药费,有无社保均可保",
children: []
},
{
title: "重大疾病险",
sub: "责任内疾病确诊即赔",
children: []
},
{
title: "意外伤害险",
sub: "意外保障无等待期",
children: []
},
{
title: "人寿保险",
sub: "避免因家庭顶梁柱身故,导致的房贷、子女教育等生活压力",
children: []
}
];
export default { export default {
name: "GoodsList", name: "GoodsList",
components: { components: {
AiTestTip, AiTestTip,
GoodList, GoodList,
Tabbar, Tabbar,
copyright, copyright
RecordLayer
}, },
data() { data() {
return { return {
active: 0, active: 0,
showLayer: false, showLayer: false,
goodsList: [], goodsList: []
goodsLists: [
{
title: "住院医疗险",
sub: "报销医药费,有无社保均可保",
children: []
},
{
title: "重大疾病险",
sub: "责任内疾病确诊即赔",
children: []
},
{
title: "意外伤害险",
sub: "意外保障无等待期",
children: []
},
{
title: "人寿保险",
sub: "家庭顶梁柱必备",
children: []
}
]
}; };
}, },
computed: {
list() {
const { active } = this;
const _catList = JSON.parse(JSON.stringify(categoryList));
this.goodsList.forEach(item => {
switch (item.itype) {
case "mi":
_catList[0].children.push(item);
break;
case "cii":
(item.scope.includes(active) || active === 0) && _catList[1].children.push(item);
break;
case "ai":
_catList[2].children.push(item);
break;
case "li":
(item.scope.includes(active) || active === 0) && _catList[3].children.push(item);
break;
default:
break;
}
});
return _catList;
}
},
mounted() { mounted() {
this.goodsList = goodsList; this.getList();
},
methods: {
async getList() {
const res = await list();
if (res) {
goodsList.forEach(item => {
res.forEach(it => {
item.id = "AKFSFA1421523151";
if (it.title === item.title) {
item.id = it.productNo ?? item.id;
item.price = it.priceDesc ?? item.price;
item.sellCount = it.sellCount ?? 0;
}
});
});
this.goodsList = goodsList;
}
}
} }
}; };
</script> </script>
......
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