From 527093b98210515afbb66b83c8570e1bf4153183 Mon Sep 17 00:00:00 2001 From: BTMuli Date: Sat, 9 Dec 2023 15:31:52 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20=E9=BB=98=E8=AE=A4=E6=9C=80?= =?UTF-8?q?=E6=96=B0=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/common/Posts.vue | 6 +++--- src/plugins/Mys/index.ts | 5 ++++- src/plugins/Mys/types/Forum.d.ts | 7 +++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/pages/common/Posts.vue b/src/pages/common/Posts.vue index d3e972d7..26a3f18f 100644 --- a/src/pages/common/Posts.vue +++ b/src/pages/common/Posts.vue @@ -61,12 +61,12 @@ import { createPost } from "../../utils/TGWindow"; const loading = ref(true); const loadingTitle = ref("正在加载中..."); -const posts = ref([]); +const posts = ref([]); onMounted(async () => { loading.value = true; - const getData = await Mys.Post.forum(26); - posts.value = Mys.News.card.news(getData); + const getData = await Mys.Posts.get(26, 2, 1); + posts.value = Mys.Posts.card(getData); loading.value = false; }); diff --git a/src/plugins/Mys/index.ts b/src/plugins/Mys/index.ts index 6c7f4158..c9e367f3 100644 --- a/src/plugins/Mys/index.ts +++ b/src/plugins/Mys/index.ts @@ -21,7 +21,10 @@ const Mys = { Api: MysApi, Post: { get: getPostData, - forum: getForumList, + }, + Posts: { + get: getForumList, + card: getNewsCard, }, Gacha: { get: getGachaData, diff --git a/src/plugins/Mys/types/Forum.d.ts b/src/plugins/Mys/types/Forum.d.ts index 02dc576c..09054e48 100644 --- a/src/plugins/Mys/types/Forum.d.ts +++ b/src/plugins/Mys/types/Forum.d.ts @@ -43,4 +43,11 @@ declare namespace TGApp.Plugins.Mys.Forum { databox: unknown; list: TGApp.Plugins.Mys.News.Item[]; } + + /** + * @description 渲染数据 + * @since Beta v0.3.7 + * @interface RenderCard + */ + type RenderCard = TGApp.Plugins.Mys.News.RenderCard; }