mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-14 09:38:13 +08:00
🎨 暂时就简化到这里吧
This commit is contained in:
@@ -182,15 +182,8 @@ onBeforeMount(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
loadingTitle.value = "正在获取公告数据";
|
|
||||||
const noticeData = await Mys.News.get(gid);
|
|
||||||
rawData.value.notice.isLast = noticeData.is_last;
|
|
||||||
rawData.value.notice.lastId = noticeData.list.length;
|
|
||||||
postData.value.notice = Mys.News.card.notice(noticeData);
|
|
||||||
tab.value = "notice";
|
tab.value = "notice";
|
||||||
setTimeout(() => {
|
await firstLoad("notice");
|
||||||
loading.value = false;
|
|
||||||
}, 1500);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
async function firstLoad(key: NewsKey): Promise<void> {
|
async function firstLoad(key: NewsKey): Promise<void> {
|
||||||
@@ -198,7 +191,7 @@ async function firstLoad(key: NewsKey): Promise<void> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (rawData.value[key].lastId === 0) {
|
if (rawData.value[key].lastId === 0) {
|
||||||
loadingTitle.value = `正在获取${rawData.value[key].name}数据...;`;
|
loadingTitle.value = `正在获取${rawData.value[key].name}数据...`;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const getData = await Mys.News.get(gid, NewsType[key]);
|
const getData = await Mys.News.get(gid, NewsType[key]);
|
||||||
rawData.value[key].isLast = getData.is_last;
|
rawData.value[key].isLast = getData.is_last;
|
||||||
|
|||||||
Reference in New Issue
Block a user