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

fix: 电子保单回显方式改变、首页ui调整、缴费记录跳转问题

parent 1a65888d
......@@ -8,13 +8,7 @@
>
<cr-tabbar-item v-for="(item, index) in tabbarData" :key="item.name">
<div class="mongo-tabbar-item">
<svg-icon
:icon-class="[index === activeIdx ? item.activeIcon : item.icon]"
:class-name="[
{ 'mongo-tabbar-item-svg_active': index === activeIdx },
'mongo-tabbar-item-svg'
]"
/>
<img class="mongo-tabbar-item-svg" :src="index === activeIdx ? item.activeImg : item.img">
<span class="mongo-tabbar-item-name">{{ item.name }}</span>
</div>
</cr-tabbar-item>
......@@ -23,31 +17,47 @@
<script>
import { mapState, mapMutations } from "vuex";
import homeImg from "@/assets/images/home/tab_home@2x.png";
import homeActiveImg from "@/assets/images/home/tab_home_active@2x.png";
import goodsImg from "@/assets/images/home/tab_product@2x.png";
import goodsActiveImg from "@/assets/images/home/tab_product_active@2x.png";
import consultantImg from "@/assets/images/home/tab_consultant@2x.png";
import consultantActiveImg from "@/assets/images/home/tab_consultant_active@2x.png";
import userImg from "@/assets/images/home/tab_user@2x.png";
import userActiveImg from "@/assets/images/home/tab_user_active@2x.png";
const tabbarData = [
{
name: "首页",
path: "/home",
icon: "home",
activeIcon: "home-active"
img: homeImg,
activeImg: homeActiveImg
// icon: "home",
// activeIcon: "home-active"
},
{
name: "产品",
path: "/goods",
icon: "product",
activeIcon: "product-active"
img: goodsImg,
activeImg: goodsActiveImg
// icon: "product",
// activeIcon: "product-active"
},
{
name: "顾问",
path: "/consultant",
icon: "counselor",
activeIcon: "counselor-active"
img: consultantImg,
activeImg: consultantActiveImg
// icon: "counselor",
// activeIcon: "counselor-active"
},
{
name: "我的",
path: "/user",
icon: "user",
activeIcon: "user-active"
img: userImg,
activeImg: userActiveImg
// icon: "user",
// activeIcon: "user-active"
}
];
......@@ -97,10 +107,6 @@ export default {
&-svg {
width: 28px;
height: 28px;
display: inline-block;
&_active {
display: none;
}
}
&-name {
font-size: 10px;
......@@ -113,12 +119,6 @@ export default {
.mongo-tabbar-item-name {
color: #000000;
}
.mongo-tabbar-item-svg {
display: none;
&_active {
display: inline-block;
}
}
}
}
</style>
......@@ -146,22 +146,22 @@
border-radius: 14px;
.Hc-card-question {
margin: 31px 0 2px;
margin: 24px 130px 11px 0;
font-size: 18px;
font-weight: 600;
color: #242629;
line-height: 31px;
line-height: 23px;
display: block;
position: relative;
z-index: 2;
}
.Hc-card-result {
margin-bottom: 21px;
margin-bottom: 15px;
padding: 3px 0 2px;
width: 124px;
text-align: center;
background: rgba(255, 103, 2, 1);
background: #FF6702;
border-radius: 7px 3px 7px 3px;
font-size: 12px;
color: #FFFFFF;
......
......@@ -39,8 +39,12 @@
<div class="home-classroom">
<p class="home-classroom-title">芒果小课堂</p>
<div class="home-classroom-card" @click="goArticle(0)">
<a :href="articleList[0].url" target="_blank" class="Hc-card-question">
{{ articleList[0].title }}
<a
:href="articleList[0].url"
target="_blank"
class="Hc-card-question"
v-html="articleList[0].title"
>
</a>
<p class="Hc-card-result">已有1.8万人认为有用</p>
<div
......@@ -77,13 +81,7 @@
<p>{{ item.title }}</p>
<p>芒果小课堂</p>
</div>
<cr-image
class="Hc-item-right"
width=""
height=""
fit="cover"
src="@/assets/images/home/teacher@2x.png"
/>
<cr-image class="Hc-item-right" width="" height="" fit="cover" :src="item.img" />
</a>
</div>
<!-- <div class="home-phone">
......@@ -107,6 +105,8 @@ import settings from "@/api/settings";
import { getRiskEvaluation } from "@/api/smartMeasure";
import localStorage from "@/service/localStorage";
import { has } from "lodash-es";
import qa_2_img from "@/assets/images/home/qa-2@2x.png";
import qa_3_img from "@/assets/images/home/qa-3@2x.png";
export default {
name: "Home",
......@@ -123,16 +123,18 @@ export default {
mongoToken: localStorage.get("mongoToken"),
articleList: [
{
title: "25~45岁间该怎么买保险",
url: "https://mp.weixin.qq.com/s/yG_n8cnvsFd9NPIYZycYvg"
},
{
title: "有了医保,还需要买商业保险吗?",
title: "有了医保,<br>还需要买商业保险吗?",
url: "https://mp.weixin.qq.com/s/6GZTTDwwHMHaIKFib7QGfg"
},
{
title: "常见保险有几类,作用是什么?",
url: "https://mp.weixin.qq.com/s/rIhVsxnxcxHfiYHIwq11hQ"
url: "https://mp.weixin.qq.com/s/rIhVsxnxcxHfiYHIwq11hQ",
img: qa_2_img
},
{
title: "25~45岁间该怎么买保险",
url: "https://mp.weixin.qq.com/s/yG_n8cnvsFd9NPIYZycYvg",
img: qa_3_img
}
],
report: {}
......
......@@ -70,7 +70,7 @@ export default {
},
methods: {
showPdf() {
this.$router.push({ path: "/policy/virtual-detail", query: { url: this.data.policyUrl } });
this.$router.push({ path: "/policy/virtual-detail", query: { policySecId: this.data.policySecId } });
}
},
computed: {
......
......@@ -54,7 +54,7 @@ export default {
goNext() {
const arr = ["6.2-3", "6.1-3", "6.3", "8", "9-5", "9-6", "10"];
const payTypeText = this.payTypeList?.find(v => v.value === this.payType);
const isAClear = payTypeText.label === "一次交清";
const isAClear = payTypeText?.label === "一次交清";
if (arr.includes(this.cardConfig?.status)) {
this.$router.push(
`/policy/payment-record/${encodeURIComponent(this.policySecId)}/${
......
......@@ -8,6 +8,7 @@
import pdf from "vue-pdf";
import config from "@/config";
import { mapActions } from "vuex";
import localStorage from "@/service/localStorage";
let CMAP_URL = "https://cdn.jsdelivr.net/npm/pdfjs-dist@2.5.207/cmaps/";
export default {
......@@ -17,33 +18,30 @@ export default {
},
data() {
return {
url: "",
pdfUrl: "",
pdfNumPages: null
};
},
mounted() {
this.setDetail();
this.pdfTask();
},
methods: {
...mapActions(["setIsLoading"]),
setDetail() {
let { url } = this.$route.query;
if (!url?.startsWith("http")) url = `${config.basicHost}${url}`;
this.setIsLoading(true);
if (!url) this.$router.back();
this.url = url;
this.pdfTask();
},
pdfTask() {
this.pdfUrl = pdf.createLoadingTask({ url: this.url, cMapUrl: CMAP_URL, cMapPacked: true });
const token = localStorage.get("mongoToken");
const policySecId = this.$route.query?.policySecId;
if (!policySecId || !token) this.$router.back();
const url = `${
config.basicHost
}policy/download?token=${token}&policySecId=${encodeURIComponent(policySecId)}`;
this.pdfUrl = pdf.createLoadingTask({ url, cMapUrl: CMAP_URL, cMapPacked: true });
this.pdfUrl.promise
.then(pdf => {
this.pdfNumPages = pdf.numPages;
this.setIsLoading(false);
})
.catch(err => {
console.error(err);
console.error("err", err);
});
}
}
......
......@@ -136,7 +136,7 @@ export default {
query: { id: item.id, type: item.itype }
});
} else if (text === "电子保单") {
this.$router.push({ path: "/policy/virtual-detail", query: { url: item.policyUrl } });
this.$router.push({ path: "/policy/virtual-detail", query: { policySecId: item.policySecId } });
} else if (text === "去支付") {
this.orderInfo = {
payOrderNo: item?.payInfo?.payOrderNo,
......
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