<route lang="json5" type="page">
	{
	layout: 'default',
	style: {
	navigationStyle: 'custom',
	navigationBarTitleText: '在线预览',
	},
	}
</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 '@/utils/code';
	const baseUrl = 'https://10.75.166.6/jeecg-boot/sys/common/static/';
	var fileUrl = "";

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

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