YNUtdPlatform/pages/realName/workbench/contractWitness/contractPdf.vue

86 lines
1.7 KiB
Vue

<template>
<view class="page">
<u-navbar class="u-navbar" title="PDF查看" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
<view class="file-box">
<PdfView :path="webUrl1" style="width: 100%;height: 80%!important;"/>
</view>
<view class="bottom-box">
<view class="btn1" @click="leftClick">返回</view>
</view>
</view>
</template>
<script>
import PdfView from '../../components/PdfView.vue'
import config from '@/config'
export default {
components: { PdfView },
data() {
return {
webUrl1:"",
}
},
onLoad(option) {
var url = plus.io.convertLocalFileSystemURL(option.pdfUrl)
console.log(url)
this.webUrl1=plus.io.convertLocalFileSystemURL(option.pdfUrl)||"";
console.log('?? ~ mounted ~ mounted-index:')
},
onShow() {
},
methods: {
// 返回
leftClick() {
console.log('返回')
uni.navigateBack({
delta: 1 // 返回
});
}
},
}
</script>
<style lang="scss">
.page {
width: 100vw;
height: 100vh;
background-color: #EFEFEF;
box-sizing: border-box;
position: relative;
.file-box{
width: 100%;
height: 80vh;
// overflow-y: auto;
}
.bottom-box{
width: 90%;
margin: 0 auto;
height: 120rpx;
display: flex;
justify-content: center;
align-items: center;
.btn1{
width: 90%;
height: 80rpx;
display: flex;
align-items: center;justify-content: center;
color: #FFF;
background: #00337A;
border-radius: 10rpx;
}
.btn2{
width: 40%;
height: 80rpx;
display: flex;
align-items: center;justify-content: center;
color: #FFF;
background: #00337A;
border-radius: 10rpx;
}
}
}
</style>