Commit 2e310b6d authored by 郭志伟's avatar 郭志伟 Committed by 郝聪敏

fix: 电子保单优化

parent 80b60ac8
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<script> <script>
import pdf from "vue-pdf"; import pdf from "vue-pdf";
import { mapActions } from "vuex";
export default { export default {
name: "PolicyVirtualDetail", name: "PolicyVirtualDetail",
components: { components: {
...@@ -22,8 +23,10 @@ export default { ...@@ -22,8 +23,10 @@ export default {
this.setDetail(); this.setDetail();
}, },
methods: { methods: {
...mapActions(["setIsLoading"]),
setDetail() { setDetail() {
const { url } = this.$route.query; const { url } = this.$route.query;
this.setIsLoading(true);
if (!url) this.$router.back(); if (!url) this.$router.back();
this.url = url; this.url = url;
this.pdfTask(); this.pdfTask();
...@@ -33,6 +36,7 @@ export default { ...@@ -33,6 +36,7 @@ export default {
this.pdfUrl.promise this.pdfUrl.promise
.then(pdf => { .then(pdf => {
this.pdfNumPages = pdf.numPages; this.pdfNumPages = pdf.numPages;
this.setIsLoading(false);
}) })
.catch(err => { .catch(err => {
console.error(err); console.error(err);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment