diff --git a/src/views/home/components/video.vue b/src/views/home/components/video.vue new file mode 100644 index 0000000..c9d6644 --- /dev/null +++ b/src/views/home/components/video.vue @@ -0,0 +1,120 @@ + + + + + + + {{ props.title || "视频播放" }} + + + + + + + + + + + + {{ currentVideo.title }} + + + + + + + 您的浏览器不支持视频播放 + + + + + + + 直播列表 ({{ config.length }}) + + + + + + {{ index + 1 }} + + + {{ item.title }} + + + + + + + + + + + diff --git a/src/views/home/index.vue b/src/views/home/index.vue index fb5433c..ec1a453 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -3,11 +3,13 @@ import type { Treaty } from "@elysiajs/eden"; import type { InfiniteScrollCustomEvent } from "@ionic/vue"; import type { Action } from "./"; import type { TreatyQuery } from "@/api/types"; +import { modalController } from "@ionic/vue"; import { chevronForwardOutline, eyeOutline, megaphoneOutline, timeOutline } from "ionicons/icons"; import { client, safeClient } from "@/api"; import banner2 from "@/assets/images/home-banner2.jpg?url"; import banner1 from "@/assets/images/home-banner.jpg?url"; import { actions } from "./"; +import Video from "./components/video.vue"; type NewsItem = Treaty.Data["data"][number]; type NewsQuery = TreatyQuery; @@ -36,9 +38,32 @@ interface Announcement { const announcements = ref([ { id: 1, + title: "深化改革线上视频大会-18:30分", + onClick: async () => { + const modal = await modalController.create({ + component: Video, + componentProps: { + title: "视频大会", + config: [ + { + title: "深化改革线上视频大会18:30分", + link: "https://www.w3schools.com/html/mov_bbb.mp4", + }, + { + title: "深化改革线上视频大会20:30分", + link: "https://www.w3schools.com/html/mov_bbb.mp4", + }, + ], + }, + }); + await modal.present(); + }, + }, + { + id: 2, title: "欢迎使用我们的服务平台,祝您投资顺利!", onClick: () => { - console.log("点击了第一条公告"); + console.log("公告2点击"); }, }, ]);