优化预览路径

pull/2/head
jwg 6 months ago
parent 121b97b5ce
commit e57a20cca6

@ -14,4 +14,7 @@ VUE_APP_API= '/'
# 方楠
# VUE_APP_BASE_API = 'https://2537287x0n.imdo.co'
VUE_APP_BASE_API = '/proxy-api'
VUE_APP_BASE_API = '/proxy-api'
#线上预览
VUE_APP_ONLINE_API = 'http://139.224.253.31:48012'

@ -13,5 +13,10 @@ VUE_APP_API= '/'
# 请求环境
# 方楠
VUE_APP_BASE_API = 'http://one-h5.lyrfp.com'
# VUE_APP_BASE_API = 'http://one-h5.lyrfp.com'
# 开发环境 不要删
VUE_APP_BASE_API = 'http://192.168.3.128:58088'
# VUE_APP_BASE_API = 'http://60.204.223.58:8080'
#线上预览
VUE_APP_ONLINE_API = 'http://139.224.253.31:48012'

@ -1,13 +1,27 @@
<!-- -->
<template>
<div>
<iframe v-if="showFdf" :src="url" frameborder="0" :class="fullscreen?'ifarmefullscreen':'ifarme'"></iframe>
<iframe :src="previewUrl + encodeURIComponent(base64Encode(url))" frameborder="0" style="width:100%;height:80vh;"></iframe>
<iframe
v-if="showFdf"
:src="url"
frameborder="0"
:class="fullscreen ? 'ifarmefullscreen' : 'ifarme'"
></iframe>
<iframe
:src="previewUrl + encodeURIComponent(base64Encode(url))"
frameborder="0"
style="width: 100%; height: 80vh"
></iframe>
<div class="sumbit-box">
<div class="item-box" v-for="(item,index) in btnList" :key="index" @click="handleBack(item.key)">
<div
class="item-box"
v-for="(item, index) in btnList"
:key="index"
@click="handleBack(item.key)"
>
<van-icon :name="item.icon" :color="item.color" size="25" />
<div class="box-tt">
<span :style="`color:${item.color}`"> {{item.title}}</span>
<span :style="`color:${item.color}`"> {{ item.title }}</span>
</div>
</div>
</div>
@ -16,44 +30,40 @@
<script>
export default {
name: '',
name: "",
created() {
this.handleSetFile()
this.handleSetFile();
},
data() {
return {
showFdf: false,
// previewUrl: 'http://60.204.223.58:8086/onlinePreview?url=',
// KKFileView
previewUrl: 'http://139.224.253.31:48012/onlinePreview?url=',
url: '',
btnList: [
{ title: '返回', icon: 'revoke', color: "#909399", key: 0 },
]
}
// previewUrl: 'http://139.224.253.31:48012/onlinePreview?url=',
previewUrl: process.env.VUE_APP_ONLINE_API + "/onlinePreview?url=",
url: "",
btnList: [{ title: "返回", icon: "revoke", color: "#909399", key: 0 }],
};
},
methods: {
base64Encode(url) {
if (url) {
return this.$Base64.encode(url)
return this.$Base64.encode(url);
}
},
handleBack() {
history.back()
history.back();
},
handleSetFile() {
this.url = this.$route.query.url
}
this.url = this.$route.query.url;
},
},
components: {},
computed: {},
}
};
</script>
<style scoped lang="scss">
@import '~@/assets/style/common/form.scss';
</style>
@import "~@/assets/style/common/form.scss";
</style>

Loading…
Cancel
Save