<template>
	<view  style="height: 1100rpx;">
		<web-view :src="url" ></web-view>
    <!-- <iframe width="100%" height="800rpx" :src="url"></iframe> -->
	</view>
</template>

<script setup>
	import {onMounted,computed,ref} from 'vue';
	import {onLoad,} from '@dcloudio/uni-app';
	import { store } from '../../store';
	
	const urlList = uni.getStorageSync('baseUrl')
	const url = ref("")
	const pdfUrl = ref("")
	const webHost = ref(urlList.pdfAppURL)
	const fileUrl = ref("")
	const pdfjs = ref("/static/hybrid/html/web/viewer.html")
	const totalPage=ref(0) //总页码
	const currentReadPage = ref(0) //当前页码
	onLoad((options) => {
		
		pdfUrl.value = options.param1
		fileUrl.value =webHost.value + pdfUrl.value 
		console.log(webHost.value)
		uni.setNavigationBarTitle({
			title: ""
		});
		console.log(fileUrl.value)
		init();
		
	});


	function init() {
		console.log(fileUrl.value)
		url.value =pdfjs.value + '?file=' +encodeURIComponent(fileUrl.value);
		
		console.log(11, url.value)
	}
	
	
	
	
	
</script>

<style>

</style>
