43 lines
724 B
Vue
43 lines
724 B
Vue
<template>
|
|
<view>
|
|
<web-view id="pdfArea" style="padding-top: 50rpx;" :src="`/static/hybrid/html/web/viewer.html?file=${pdfUrl}`" @message="getPage"></web-view>
|
|
<!-- <web-view src="/pdf/web/demo.pdf"></web-view> -->
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
viewerUrl: '/hybrid/html/web/viewer.html',
|
|
pdfUrl: '',
|
|
urlStr: '',
|
|
hasRead: '',
|
|
total: '',
|
|
initPage: 1,
|
|
event: ''
|
|
}
|
|
},
|
|
methods: {
|
|
getPage (e) {
|
|
console.log(e);
|
|
this.event = e
|
|
}
|
|
},
|
|
onLoad(params) {
|
|
console.log(params);
|
|
this.pdfUrl = params.pdfUrl
|
|
},
|
|
onBackPress() {
|
|
console.log(123, this.event);
|
|
},
|
|
onShow() {
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
|
|
</style>
|