1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <template>
- <div class="preview">
- <div class="loader" v-if="!isLoaded">
- <v-progress-circular indeterminate></v-progress-circular>
- </div>
- <VideoArticle v-else :videoItem="videoItem" />
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- isLoaded: false,
- videoItem: null,
- };
- },
- colorMode: 'dark',
- async mounted() {
- const uuid = this.$route.query.uuid;
- if(uuid) {
- let response = await this.$axios.get(`admin/news/preview/${uuid}`);
- this.videoItem = response.data.data
- }
- else {
- this.videoItem = JSON.parse(window.localStorage.getItem("preview"))
- }
- if (this.videoItem) this.isLoaded = true;
- },
- };
- </script>
- <style lang="less" scoped>
- .loader {
- text-align: center;
- padding: 50px 0;
- }
- </style>>
|