mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
🚸 默认最新回复
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
7
src/plugins/Mys/types/Forum.d.ts
vendored
7
src/plugins/Mys/types/Forum.d.ts
vendored
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user