From 71ba3df54bcc88ab697b76335fb988ec4c8a66d3 Mon Sep 17 00:00:00 2001 From: "liu.xiaofeng@ebiz-digits.com" Date: Mon, 21 Aug 2023 17:20:35 +0800 Subject: [PATCH] =?UTF-8?q?feature=E3=80=90GFRS-3645=E3=80=91=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=B0=83=E6=95=B4pdf=E5=B1=95=E7=A4=BA=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=B1=BB=E5=9E=8B=E4=B8=BAimage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ebiz/YB_agentSign/step2.vue | 36 ++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/src/views/ebiz/YB_agentSign/step2.vue b/src/views/ebiz/YB_agentSign/step2.vue index c7a0bb155..cb436ab7d 100644 --- a/src/views/ebiz/YB_agentSign/step2.vue +++ b/src/views/ebiz/YB_agentSign/step2.vue @@ -3,7 +3,9 @@ {{ `提示:阅读时长需在${this.Time ? this.time : this.number}秒以上` }} - +
+
+
本人确认已阅读《国富人寿保险股份有限公司委托代理合同》 @@ -35,11 +37,12 @@ import { RadioGroup, Radio, Dialog, NoticeBar } from 'vant' import config from '@/config' import { generateAgreementYB, putContractInfo } from '@/api/ebiz/YB_agentSign/YB_agentSign' + import Pdfh5 from "pdfh5"; export default { data() { let isWeixin = this.$utils.device().isWeixin //判断环境 return { - time:'2', + time:'10', radio: '', number: '', src: location.origin + '/pdfjs/web/viewer.html?file=', @@ -55,7 +58,8 @@ signSuccessShow:false, signImgUrl:'data:image/gif;base64,', signH5Val: '', - signH5Img: '' + signH5Img: '', + pdfh5: null } }, components: { @@ -84,7 +88,16 @@ this.$toast.clear() if(res.result == 0){ window.sessionStorage.setItem('signName',this.$store.getters.getYBname) - this.pdfUrl = config.assetsUpUrl + res.content.rgssUrl + // this.pdfUrl = config.assetsUpUrl + res.content.rgssUrl + //实例化 + this.pdfh5 = new Pdfh5("#pdfH5ID", { + pdfurl: config.assetsUpUrl + res.content.rgssUrl, + // pdfurl: 'https://iagentsales-test2.e-guofu.com/opt/ebiz/webapps/ebiz-epolicy/pdf/2023/08/09/1000001078372351/1000001078372351.pdf', + lazy:false, + scale:1 + }).on("complete", function (status, msg, time) { //监听完成事件 + console.log("状态:" + status + ",信息:" + msg + ",耗时:" + time + "毫秒,总页数:" + this.totalNum) + }) this.signH5Img = sessionStorage.getItem('signH5Img') if(this.signH5Img){ this.$set(this.signInfo, 'status', '2') @@ -197,4 +210,19 @@ width: 100vw; height: 70vh; } + #pdfH5ID{ + width: 100vw; + } + /deep/.viewerContainer{ + width: 100vw; + overflow: inherit; + } + /deep/ .pageNum{ + display: none!important; + } + /deep/ .pageContainer{ + img{ + width: 100vw; + } + }