Files
reg_java/pc-web/src/views/GetFile.vue
王子琦 ea34c396dd aaa
2026-01-09 15:48:50 +08:00

52 lines
1015 B
Vue

<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>