aaa
This commit is contained in:
51
pc-web/src/views/GetFile.vue
Normal file
51
pc-web/src/views/GetFile.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<div class="get-file">
|
||||
<loading :active="isLoading" :is-full-page="true" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Loading from "vue-loading-overlay";
|
||||
import "vue-loading-overlay/dist/vue-loading.css";
|
||||
import { serchUrlPath } from "../api/registrations";
|
||||
import { buildPdfUrl } from "../api/client";
|
||||
|
||||
export default {
|
||||
name: "GetFile",
|
||||
components: {
|
||||
Loading,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLoading: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
fileSuffix() {
|
||||
return this.$route.params.urlPath;
|
||||
},
|
||||
fullPath() {
|
||||
return this.$route.fullPath;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.isLoading = true;
|
||||
serchUrlPath(this.fileSuffix).then((res) => {
|
||||
if (res != null && res.length > 1) {
|
||||
window.location.href = buildPdfUrl(res);
|
||||
} else {
|
||||
this.isLoading = false;
|
||||
alert("请访问短信提供的链接!");
|
||||
}
|
||||
}).catch(() => {
|
||||
this.isLoading = false;
|
||||
});
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.get-file {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user