merchapp/java-mall-app-shop-admin/pages/my/contract.vue
2025-05-08 10:16:20 +08:00

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>