<template>
	<web-view :src="previewPath"></web-view>
</template>

<script>
	import { BASEURL } from '../../publicConfig/config'
	export default {
		data() {
			return {
				previewPath: '',
			}
		},
		onLoad(options) {
			const fileId = options.fileId
			this.previewPath = `${BASEURL.url}/handler/previewFile?code=${fileId}`
			// const filePath = `${BASEURL.url}/handler/previewPdf?code=${fileId}`
			// this.previewPath = `${BASEURL.url}/assets/h5test/static/pdfjs-3.8.162-dist/web/viewer.html?file=${filePath}` //临时文件路径http与服务器https跨域					
		},
		methods: {

		}
	}
</script>

<style>

</style>