[fix] 添加 卡单产品的pdf

This commit is contained in:
tian.guangyuan
2020-04-22 15:56:40 +08:00
parent 45f3a541e1
commit 25a12d966c
3 changed files with 28 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ export default {
init() {
let cardListPDF = JSON.parse(localStorage.cardListPDF)
console.log(cardListPDF)
this.pdfUrl = this.$mainUrl + cardListPDF.url
this.pdfUrl = cardListPDF.url
this.shareContent = cardListPDF.title
document.title = cardListPDF.title
}

View File

@@ -221,7 +221,12 @@
>
</FieldDatePicter> -->
<van-checkbox-group v-model="result" ref="checkboxGroup" style="box-sizing:border-box;" class="pl8 pr20 pt10 pb10 bg-white">
<van-checkbox name="a" shape="square" icon-size="13px">本人已仔细阅读并了解投保须知投保声明保险条款等内容自愿为被保险人投保本保险<br />
<van-checkbox name="a" shape="square" icon-size="13px">本人已仔细阅读并了解
<span class="blue" @click="goDocu('http://139.199.50.151:8000/app/product/GFRS_M0022/M0022Notice.pdf','短期交通卡投保须知')">短期交通卡投保须知</span>
<span class="blue" @click="goDocu('http://139.199.50.151:8000/app/product/GFRS_M0022/M0022Explain.pdf','短期交通卡投保声明')">短期交通卡投保声明</span>
<span class="blue" @click="goDocu('http://139.199.50.151:8000/app/product/GFRS_M0022/M0022.pdf','国富人寿综合交通意外保险2020')">国富人寿综合交通意外保险2020</span>
等内容自愿为被保险人投保本保险<br />
为未成年子女投保的人身保险在被保险人成年之前因被保险人身故给付的保险金总和不得超过国务院保险监督管理机构规定的限额身故给付的保险金额总和的约定也不得超过前述限额但航空意外死亡保险金额及重大自然灾害意外死亡保险金额不计算在上述规定限额之中</van-checkbox>
</van-checkbox-group>
@@ -368,7 +373,8 @@ export default {
occupationShowPicker: false,
timeId: null,
chooseProducts: JSON.parse(localStorage.chooseProducts),
trialList: JSON.parse(localStorage.trialList)
trialList: JSON.parse(localStorage.trialList),
pdf:['','','']
}
},
created() {
@@ -400,6 +406,22 @@ export default {
this.allPrice = this.trialList[0].prem
},
methods: {
goDocu(url, name) {
// let pdfUrl = //encodeURIComponent(url)
localStorage.setItem('cardListPDF', JSON.stringify({ documentUrl: url, title: name }))
console.log('url', url)
this.$jump({
flag: 'h5',
extra: {
title: name,
// url: 'http://47.96.143.111/pdfjs/web/viewer.html?file=' + url //测试代码
url: location.origin + '/#/cardList/ShowPDF'
},
routerInfo: {
path: '/cardList/ShowPDF'
}
})
},
//监听名字变化
nameChange(name) {
// console.log('name',name)
@@ -982,6 +1004,7 @@ export default {
}
})
} else {
console.error(resultData.resultMessage);
this.$toast(resultData.resultMessage)
}
},

View File

@@ -10,7 +10,7 @@
is-link
v-for="(item, index) in docuList"
:key="index"
@click="goDocu(item.url, item.type, item.name)"
@click="goDocu(item.url, item.name)"
/>
</div>
<div class="bottom-area bottom-btn">
@@ -48,7 +48,7 @@ export default {
await this.insureTrial()
},
methods: {
goDocu(url, type, name) {
goDocu(url, name) {
// let pdfUrl = //encodeURIComponent(url)
localStorage.setItem('cardListPDF', JSON.stringify({ documentUrl: url, title: name }))
console.log('url', url)