diff --git a/src/components/wiki/twg-card.vue b/src/components/wiki/twg-card.vue index 1f7acf38..9290ce7e 100644 --- a/src/components/wiki/twg-card.vue +++ b/src/components/wiki/twg-card.vue @@ -18,7 +18,7 @@ interface TwgCardProps { const props = defineProps(); -function toWiki(): void { +async function toWiki(): Promise { if (!props.data.contentId || props.data.contentId === 0) { showSnackbar({ text: `卡牌 ${props.data.name} 暂无外部链接`, @@ -27,7 +27,7 @@ function toWiki(): void { return; } const url = Mys.Api.Obc.replace("{contentId}", props.data.contentId.toString()); - createTGWindow( + await createTGWindow( url, "Sub_window", `Content_${props.data.contentId} ${props.data.name}`, diff --git a/src/pages/WIKI/Character.vue b/src/pages/WIKI/Character.vue index 48ba4621..9c92d41e 100644 --- a/src/pages/WIKI/Character.vue +++ b/src/pages/WIKI/Character.vue @@ -126,7 +126,14 @@ async function toOuter(item?: TGApp.App.Character.WikiBriefInfo): Promise return; } const url = Mys.Api.Obc.replace("{contentId}", item.contentId.toString()); - createTGWindow(url, "Sub_window", `Content_${item.contentId} ${item.name}`, 1200, 800, true); + await createTGWindow( + url, + "Sub_window", + `Content_${item.contentId} ${item.name}`, + 1200, + 800, + true, + ); }