mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-05-17 04:46:46 +08:00
🏷️ add await
This commit is contained in:
@@ -63,7 +63,7 @@ onBeforeMount(async () => {
|
||||
console.log(next.value);
|
||||
});
|
||||
|
||||
function toBirth(type: TGApp.Archive.Birth.RoleItem | true): void {
|
||||
async function toBirth(type: TGApp.Archive.Birth.RoleItem | true): Promise<void> {
|
||||
let dateStr;
|
||||
if (type === true) {
|
||||
const date = new Date();
|
||||
@@ -74,15 +74,15 @@ function toBirth(type: TGApp.Archive.Birth.RoleItem | true): void {
|
||||
dateStr = type.role_birthday;
|
||||
}
|
||||
if (type !== true) {
|
||||
router.push({ name: "留影叙佳期", params: { date: dateStr } });
|
||||
await router.push({ name: "留影叙佳期", params: { date: dateStr } });
|
||||
return;
|
||||
}
|
||||
if (cur.value.length > 0 && !cur.value[0].is_subscribe) {
|
||||
recentNewsType.value = "news";
|
||||
router.push("/news/2/news");
|
||||
await router.push("/news/2/news");
|
||||
return;
|
||||
}
|
||||
router.push({ name: "留影叙佳期", params: { date: dateStr } });
|
||||
await router.push({ name: "留影叙佳期", params: { date: dateStr } });
|
||||
}
|
||||
|
||||
function parseDesc(intro: string): string {
|
||||
|
||||
Reference in New Issue
Block a user