Commit 647b8ec3 authored by 郝聪敏's avatar 郝聪敏

fix: 修改pdf数据显示异常问题

parent 1389ef3f
......@@ -14,6 +14,7 @@
:autoRenewPolicy="data.autoRenewPolicy"
:policyNo="data.policyNo"
:orderNo="data.orderNo"
v-if="showInsuranceCard"
></insurance-card>
<security-content :data="data" :detail="planDetail"></security-content>
<insurance-service :detail="qaDetail"></insurance-service>
......@@ -75,6 +76,9 @@ export default {
showPayCost() {
return ["2", "4"].includes(this.data?.cardConfig?.key);
},
showInsuranceCard() {
return this.data?.cardConfig?.key !== "4";
},
planDetail() {
const {
type,
......@@ -131,6 +135,13 @@ export default {
},
EndDate() {
return parseTime(this.data.policyEndDate, "{y}.{m}.{d}");
},
payInfo() {
return {
payOrderNo: this.data?.payInfo?.payOrderNo,
payType: this.data?.payInfo?.payOrderType,
orderNo: this.data?.orderNo
};
}
},
methods: {
......
......@@ -5,7 +5,6 @@
v-if="showPayCost"
:statusKey="data.cardConfig.key"
:payCostConfig="data.cardConfig.payCostConfig"
:payInfo="payInfo"
></pay-cost>
<refund
v-else
......@@ -57,7 +56,7 @@ export default {
return this.data.cardConfig.key === "8" ? "到账时间" : "支付时间";
},
showPayCost() {
return ["4", "14", "13"].includes(this.data?.cardConfig?.key);
return ["14", "13"].includes(this.data?.cardConfig?.key);
}
}
};
......
......@@ -375,9 +375,6 @@
}
&-agreement {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
a {
font-size: 12px;
......
......@@ -52,7 +52,7 @@ export default {
pupopData() {
const { currentPupopIndex } = this;
const { popupArray } = this.detail;
return (currentPupopIndex && popupArray[currentPupopIndex]) || {};
return popupArray[currentPupopIndex] || {};
}
},
data() {
......
......@@ -6,7 +6,7 @@
</template>
<script>
import setting from "@/api/settings";
console.log(setting);
export default {
name: "Phone",
data() {
......
......@@ -24,7 +24,7 @@
</div>
</div>
<Collapse v-else :collapse-data="detail.planCellInfo" />
<div class="Pdb-content-operation">
<div class="Pdb-content-operation" v-if="isShowPdfBtn">
<cr-button class="Pdbc-button" @click="showPdf">电子保单</cr-button>
</div>
<div class="Pdb-content-user">
......@@ -70,7 +70,12 @@ export default {
},
methods: {
showPdf() {
this.$router.push({ path: "/policy/virtual-detail", query: { url: this.data.policyUrl } });
this.$router.push({ path: "/policy/virtual-detail", query: { url: "http://hathaway-mg.liangkebang.net/third/huagui/download?idStr=Z3BSb1djY1N0S2s9" } });
}
},
computed: {
isShowPdfBtn() {
return this.data?.cardConfig?.key !== "4";
}
}
};
......
......@@ -53,13 +53,13 @@ export default {
...result,
permium: `首月保费${this.policy?.downPayPrice || 0}元,次月起${this.policy
?.regularPrice || 0}`,
note: `:微信将会在每月${this.policy.nextPayInfo.day}日在您的账户内扣除该保费。(您可以随时取消自动扣费)`
note: `微信将会在每月${this.policy.nextPayInfo.day}日在您的账户内扣除该保费。(您可以随时取消自动扣费)`
};
} else {
result = {
...result,
permium: `${this.policy?.downPayPrice || 0}/`,
note: `合同终止前,每年${this.policy?.nextPayInfo?.month || "-"}${this.policy
note: `注:合同终止前,每年${this.policy?.nextPayInfo?.month || "-"}${this.policy
?.nextPayInfo?.day || "-"}${this.policy?.company || "-"}保险公司将在您预留尾号为${this
.policy?.bankCardNoLast4 || "-"}的银行卡内扣除次年保费,请保证余额充足哦。`
};
......
......@@ -6,8 +6,9 @@
<script>
import pdf from "vue-pdf";
import CMapReaderFactory from "vue-pdf/src/CMapReaderFactory.js";
import { mapActions } from "vuex";
let CMAP_URL = "https://unpkg.com/pdfjs-dist@2.0.943/cmaps/";
export default {
name: "PolicyVirtualDetail",
components: {
......@@ -33,7 +34,7 @@ export default {
this.pdfTask();
},
pdfTask() {
this.pdfUrl = pdf.createLoadingTask({ url: this.url, CMapReaderFactory });
this.pdfUrl = pdf.createLoadingTask({ url: this.url, cMapUrl: CMAP_URL, cMapPacked: true });
this.pdfUrl.promise
.then(pdf => {
this.pdfNumPages = pdf.numPages;
......
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