|
@@ -1,7 +1,13 @@
|
|
<template>
|
|
<template>
|
|
<div class="pdf-view-example j-contanter">
|
|
<div class="pdf-view-example j-contanter">
|
|
<div class="pdf-container j-main">
|
|
<div class="pdf-container j-main">
|
|
- <iframe v-if="pdfUrl" sandbox="allow-same-origin allow-scripts" allow="pdf" :src="pdfUrl" />
|
|
|
|
|
|
+ <iframe
|
|
|
|
+ frameborder="0"
|
|
|
|
+ :src="pdfUrl"
|
|
|
|
+ sandbox="allow-same-origin allow-scripts"
|
|
|
|
+ allow="pdf"
|
|
|
|
+ :style="{ height: '100%' }"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
<div v-if="!getUserId" class="j-footer">
|
|
<div v-if="!getUserId" class="j-footer">
|
|
<a href="/jyapp/free/login?back=index&to=back&activity=bidCreditReportPreview" class="adsense-container">
|
|
<a href="/jyapp/free/login?back=index&to=back&activity=bidCreditReportPreview" class="adsense-container">
|
|
@@ -19,6 +25,7 @@
|
|
<script>
|
|
<script>
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
import AdSingle from '@/components/ad/Ad'
|
|
import AdSingle from '@/components/ad/Ad'
|
|
|
|
+import { getAssetsFile } from '@/utils'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'PdfViewExample',
|
|
name: 'PdfViewExample',
|
|
@@ -27,7 +34,7 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- pdfUrl: `${location.origin}/shareFile/bidCreditReportFile/1e452a27575834907747949258e09893/%E4%B8%87%E8%BE%BE%E4%BF%A1%E6%81%AF%E8%82%A1%E4%BB%BD%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8.pdf`
|
|
|
|
|
|
+ pdfUrl: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -36,7 +43,11 @@ export default {
|
|
created() {
|
|
created() {
|
|
const { pdfUrl } = this.$route.query
|
|
const { pdfUrl } = this.$route.query
|
|
if (pdfUrl) {
|
|
if (pdfUrl) {
|
|
- this.pdfUrl = pdfUrl
|
|
|
|
|
|
+ this.pdfUrl = decodeURIComponent(pdfUrl)
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ const pdf = getAssetsFile('example.pdf')
|
|
|
|
+ this.pdfUrl = pdf
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|