🚸 默认最新回复

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 loading = ref<boolean>(true);
const loadingTitle = ref<string>("正在加载中..."); const loadingTitle = ref<string>("正在加载中...");
const posts = ref<TGApp.Plugins.Mys.News.RenderCard[]>([]); const posts = ref<TGApp.Plugins.Mys.Forum.RenderCard[]>([]);
onMounted(async () => { onMounted(async () => {
loading.value = true; loading.value = true;
const getData = await Mys.Post.forum(26); const getData = await Mys.Posts.get(26, 2, 1);
posts.value = Mys.News.card.news(getData); posts.value = Mys.Posts.card(getData);
loading.value = false; loading.value = false;
}); });
</script> </script>

View File

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

View File

@@ -43,4 +43,11 @@ declare namespace TGApp.Plugins.Mys.Forum {
databox: unknown; databox: unknown;
list: TGApp.Plugins.Mys.News.Item[]; list: TGApp.Plugins.Mys.News.Item[];
} }
/**
* @description 渲染数据
* @since Beta v0.3.7
* @interface RenderCard
*/
type RenderCard = TGApp.Plugins.Mys.News.RenderCard;
} }