35 lines
538 B
Vue
35 lines
538 B
Vue
<template>
|
|
<view>
|
|
<web-view :src="path" />
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import { mapState } from "vuex";
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
path: "",
|
|
};
|
|
},
|
|
computed: {
|
|
...mapState("user", ["userInfo"]),
|
|
},
|
|
onShow() {
|
|
this.downloadAndSavePDF();
|
|
},
|
|
methods: {
|
|
downloadAndSavePDF() {
|
|
let downUrl = uni.getStorageSync("contractDownloadUrl");
|
|
|
|
this.path = `/static/pdf/web/viewer.html?file=${encodeURIComponent(
|
|
downUrl
|
|
)}`;
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style>
|
|
</style> |