diff --git a/src/pages/common/PageAnno.vue b/src/pages/common/PageAnno.vue index 1d838edd..16f7660a 100644 --- a/src/pages/common/PageAnno.vue +++ b/src/pages/common/PageAnno.vue @@ -16,6 +16,7 @@ label="服务器" width="200px" density="compact" + :disabled="isReq" /> @@ -93,6 +95,7 @@ const router = useRouter(); const tabValues: Readonly> = ["activity", "game"]; const tab = ref("activity"); const annoCards = shallowRef({ activity: [], game: [] }); +const isReq = ref(false); watch( () => server.value, @@ -120,6 +123,8 @@ onMounted(async () => { }); async function loadData(): Promise { + if (isReq.value) return; + isReq.value = true; await showLoading.start( "正在获取公告数据", `服务器:${getRegionName(server.value)},语言:${getLangName(lang.value)}`, @@ -139,6 +144,7 @@ async function loadData(): Promise { game: listCards.filter((item) => item.typeLabel === AnnoType.game), }; await showLoading.end(); + isReq.value = false; } function getRegionName(value: AnnoServer): string { diff --git a/src/pages/common/PostForum.vue b/src/pages/common/PostForum.vue index 8e60332d..ecc494f7 100644 --- a/src/pages/common/PostForum.vue +++ b/src/pages/common/PostForum.vue @@ -15,6 +15,7 @@ item-value="gid" variant="outlined" label="分区" + :disabled="isReq" >