From b502cf40255b2401a86235333e0e87891fb3c966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=AE=E6=A3=83?= Date: Sat, 27 Jul 2024 21:08:15 +0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=E5=B8=96=E5=AD=90?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=89=88=E5=9D=97=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/overlay/to-channel.vue | 47 ++------------------ src/views/t-post.vue | 35 ++++++++++----- src/web/constant/TGConstant.ts | 12 +++++- src/web/constant/bbs.ts | 62 ++++++++++++++++++++++++++- 4 files changed, 98 insertions(+), 58 deletions(-) diff --git a/src/components/overlay/to-channel.vue b/src/components/overlay/to-channel.vue index 60414e2b..80995c6e 100644 --- a/src/components/overlay/to-channel.vue +++ b/src/components/overlay/to-channel.vue @@ -30,6 +30,8 @@ import { computed } from "vue"; import { useRouter } from "vue-router"; import { useAppStore } from "../../store/modules/app.js"; +import { ToChannelItem } from "../../web/constant/bbs.js"; +import TGConstant from "../../web/constant/TGConstant.js"; import showSnackbar from "../func/snackbar.js"; import TOverlay from "../main/t-overlay.vue"; @@ -41,12 +43,6 @@ interface ToChannelProps { type ToChannelEmits = (e: "update:modelValue", value: boolean) => void; -interface ToChannelItem { - title: string; - icon: string; - gid: string; -} - const props = withDefaults(defineProps(), { modelValue: false, }); @@ -60,44 +56,7 @@ const visible = computed({ }); const router = useRouter(); const appStore = useAppStore(); - -const channelList: ToChannelItem[] = [ - { - title: "原神", - icon: "/platforms/mhy/ys.webp", - gid: "2", - }, - { - title: "崩坏:星穹铁道", - icon: "/platforms/mhy/sr.webp", - gid: "6", - }, - { - title: "绝区零", - icon: "/platforms/mhy/zzz.webp", - gid: "8", - }, - { - title: "崩坏3", - icon: "/platforms/mhy/bh3.webp", - gid: "1", - }, - { - title: "崩坏2", - icon: "/platforms/mhy/bh2.webp", - gid: "3", - }, - { - title: "未定事件簿", - icon: "/platforms/mhy/wd.webp", - gid: "4", - }, - { - title: "大别野", - icon: "/platforms/mhy/dby.webp", - gid: "5", - }, -]; +const channelList = TGConstant.BBS.CHANNELS; function onCancel(): void { visible.value = false; diff --git a/src/views/t-post.vue b/src/views/t-post.vue index daf4ced6..d93a01a5 100644 --- a/src/views/t-post.vue +++ b/src/views/t-post.vue @@ -15,31 +15,32 @@