diff --git a/pages/index.vue b/pages/index.vue index 07b9d51..d6e1e84 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -15,10 +15,8 @@ const { data: rawSongList } = await $api.song.listSafe.useQuery(); const songList = ref(rawSongList.value ?? []); const { data: arrangementList } = await $api.arrangement.listSafe.useQuery(); -const songListInfo = ref(0); const timeCanSubmit = ref(true); try { - songListInfo.value = await $api.song.info.query({ getAll: false }); timeCanSubmit.value = await $api.time.currently.query(); } catch (err) { useErrorHandler(err); @@ -132,14 +130,12 @@ async function refreshData() { if (timeCanSubmit.value) { try { const res = await Promise.all([ - $api.song.info.query({ getAll: false }), $api.time.currently.query(), $api.song.listSafe.query(), ]); - songListInfo.value = res[0]; - timeCanSubmit.value = res[1]; - songList.value = res[2]; + timeCanSubmit.value = res[0]; + songList.value = res[1]; } catch { } // swallow the errors } else { try { @@ -160,7 +156,7 @@ async function refreshData() {
- {{ songListInfo }} + {{ songList.length }} 已收集歌曲