44 lines
883 B
Vue
44 lines
883 B
Vue
<template>
|
|
<view :class="['content',{'gray':store.isgray==1}]">
|
|
<iframe id="bdIframe" :src="fileUrl" ref="bdIframe" style="border: none;" class="iframe" />
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import {
|
|
useStore
|
|
} from '@/store';
|
|
import {
|
|
onLoad
|
|
} from '@dcloudio/uni-app';
|
|
import Base64 from '@/utils/code.js';
|
|
const baseUrl = import.meta.env.VITE_REQUEST_BASE_URL + '/jeecg-boot/sys/common/static/'
|
|
const store = useStore();
|
|
|
|
var fileUrl = "";
|
|
|
|
onLoad((options) => {
|
|
let base64 = new Base64();
|
|
var url= JSON.parse(options.data)
|
|
url = baseUrl + url;
|
|
fileUrl = 'https://10.75.166.6/preview/onlinePreview' + '?url=' + encodeURIComponent(base64.encode(url))
|
|
})
|
|
</script>
|
|
|
|
<style>
|
|
.container {
|
|
position: relative;
|
|
width: 100%;
|
|
height: 100vh;
|
|
|
|
}
|
|
#bdIframe {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
|
|
|
|
}
|
|
</style> |