<route lang="json5" type="page">
	{
	layout: 'default',
	style: {
	navigationStyle: 'custom',
	navigationBarTitleText: 'H5在线预览',
	},
	}
</route>
<template>
	<PageLayout navTitle="在线预览">
		<iframe id="bdIframe" :src="fileUrl" ref="bdIframe" style="border: none;" class="iframe" />
	</PageLayout>
</template>
<script setup>
	import {
		onLoad
	} from '@dcloudio/uni-app';
	import {
		Base64
	} from 'js-base64'

	var fileUrl = "";
	const baseUrl = 'https://10.75.166.6/jeecg-boot/sys/common/static/';

	onLoad((options) => {
		let url = JSON.parse(options.data)
		url = baseUrl + url;
		fileUrl = 'https://szcx.zyyt.sinopec.com/preview/onlinePreview?url=' + encodeURIComponent(Base64.encode(url))
	})
</script>

<style>
	#bdIframe {
		position: absolute;
		top: 20;
		left: 0;
		width: 100%;
		height: 100%;
	}
</style>