diff --git a/src/pages/common/Announcements.vue b/src/pages/common/Announcements.vue index fedb6875..94331907 100644 --- a/src/pages/common/Announcements.vue +++ b/src/pages/common/Announcements.vue @@ -44,7 +44,7 @@ import { nextTick, onMounted, ref } from "vue"; import { useRouter } from "vue-router"; import ToLoading from "../../components/overlay/to-loading.vue"; -import { createAnno } from "../../utils/TGWindow"; +import { createTGWindow } from "../../utils/TGWindow"; import TGRequest from "../../web/request/TGRequest"; import TGUtils from "../../web/utils/TGUtils"; @@ -100,6 +100,12 @@ function parseTitle(title: string): string { async function switchNews(): Promise { await router.push("/news/2"); } + +function createAnno(item: TGApp.App.Announcement.ListCard): void { + const annoPath = `/anno_detail/${item.id}`; + const annoTitle = `Anno_${item.id} ${item.title}`; + createTGWindow(annoPath, "Sub_window", annoTitle, 960, 720, false, false); +} diff --git a/src/views/t-post.vue b/src/views/t-post.vue index a4a2e689..b37ef7dc 100644 --- a/src/views/t-post.vue +++ b/src/views/t-post.vue @@ -166,7 +166,7 @@ onMounted(async () => { // 打开 json const isDev = useAppStore().devMode ?? false; if (isDev) { - createPostJson(postId.toString()); + createPostJson(postId); } await nextTick(() => { loading.value = false; @@ -236,7 +236,7 @@ function parseContent(content: string): string { return JSON.stringify(result); } -function createPostJson(postId: string): void { +function createPostJson(postId: number): void { const jsonPath = `/post_detail_json/${postId}`; const jsonTitle = `Post_${postId}_JSON`; createTGWindow(jsonPath, "Dev_JSON", jsonTitle, 960, 720, false, false);