🚸 默认最新回复

This commit is contained in:
BTMuli
2023-12-09 15:31:52 +08:00
parent 7b34124cd2
commit 527093b982
3 changed files with 14 additions and 4 deletions

View File

@@ -61,12 +61,12 @@ import { createPost } from "../../utils/TGWindow";
const loading = ref<boolean>(true);
const loadingTitle = ref<string>("正在加载中...");
const posts = ref<TGApp.Plugins.Mys.News.RenderCard[]>([]);
const posts = ref<TGApp.Plugins.Mys.Forum.RenderCard[]>([]);
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;
});
</script>

View File

@@ -21,7 +21,10 @@ const Mys = {
Api: MysApi,
Post: {
get: getPostData,
forum: getForumList,
},
Posts: {
get: getForumList,
card: getNewsCard,
},
Gacha: {
get: getGachaData,

View File

@@ -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;
}