基于Java spring + vue3 + nuxt构建的内容管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

66 lines
2.1 KiB

<template>
<div class="w-full bg-white pb-20 mb-3">
<div class="text-center flex flex-col items-center py-15 relative ">
<div class="sub-title">
<p class="text-gray-200 text-6xl font-bold dark:text-gray-700 py-0 line-height-5">
{{ comments }}
</p>
</div>
<h2 class="text-3xl font-bold tracking-tight text-[#FF6E0CFF] lg:text-5xl">
{{ title }}
</h2>
</div>
<div class="xl:w-screen-xl m-auto text-xl">
<div class="carousel py-3 text-center" v-if="indexVideo">
<video id="my-video" class="video-js vjs-default-skin" controls preload="auto" width="900" height="510"
:poster="indexVideoImg?.value" data-setup="{}">
<source :src="indexVideo?.value" type="video/mp4">
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a web browser that
<a :href="indexVideo?.value" target="_blank">supports HTML5 video</a>
</p>
</video>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import {useServerRequest} from "~/composables/useServerRequest";
import type {ApiResult, PageResult} from "~/api";
import type {CmsArticle} from "~/api/cms/cmsArticle/model";
const props = withDefaults(
defineProps<{
list?: any[];
disabled?: boolean;
title?: string;
comments?: string;
}>(),
{
title: '卡片标题',
comments: '卡片描述'
}
);
const emit = defineEmits<{
(e: 'done'): void;
}>();
const indexVideo = ref();
const indexVideoImg = ref();
// 请求数据
const reload = async () => {
const {data: IndexVideo} = await useServerRequest<ApiResult<PageResult<CmsArticle>>>('/cms/cms-website-field/10735', {
baseURL: 'https://server.gxwebsoft.com/api'
})
const {data: IndexVideoImg} = await useServerRequest<ApiResult<PageResult<CmsArticle>>>('/cms/cms-website-field/10736', {
baseURL: 'https://server.gxwebsoft.com/api'
})
indexVideo.value = IndexVideo.value?.data;
indexVideoImg.value = IndexVideoImg.value?.data;
}
reload();
</script>