mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-14 09:38:13 +08:00
💄 帖子一次刷新12条
This commit is contained in:
@@ -202,7 +202,7 @@ async function freshPostData(): Promise<void> {
|
|||||||
);
|
);
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
loadingTitle.value = `正在加载 ${curGameLabel.value}-${curForumLabel.value}-${curSortLabel.value} 的数据`;
|
loadingTitle.value = `正在加载 ${curGameLabel.value}-${curForumLabel.value}-${curSortLabel.value} 的数据`;
|
||||||
const postsGet = await Mys.Posts.get(curForum.value, curSortType.value);
|
const postsGet = await Mys.Posts.get(curForum.value, curSortType.value, 12);
|
||||||
posts.value = postsGet.list;
|
posts.value = postsGet.list;
|
||||||
await nextTick();
|
await nextTick();
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -1,24 +1,30 @@
|
|||||||
/**
|
/**
|
||||||
* @file plugins/Mys/request/getForumList.ts
|
* @file plugins/Mys/request/getForumList.ts
|
||||||
* @description Mys 插件特定论坛请求
|
* @description Mys 插件特定论坛请求
|
||||||
* @since Beta v0.5.0
|
* @since Beta v0.5.1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import TGHttp from "../../../utils/TGHttp.js";
|
import TGHttp from "../../../utils/TGHttp.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 获取特定论坛列表
|
* @description 获取特定论坛列表
|
||||||
* @since Beta v0.5.0
|
* @since Beta v0.5.1
|
||||||
* @param {number} forumId 特定论坛 ID
|
* @param {number} forumId 特定论坛 ID
|
||||||
* @param {number} type 排序方式: 0-按热度排序,1-最新回复,2-按时间排序
|
* @param {number} type 排序方式: 0-按热度排序,1-最新回复,2-按时间排序
|
||||||
|
* @param {number} page_size 每页数量
|
||||||
* @return {Promise<TGApp.Plugins.Mys.Forum.FullData>}
|
* @return {Promise<TGApp.Plugins.Mys.Forum.FullData>}
|
||||||
*/
|
*/
|
||||||
async function getForumList(
|
async function getForumList(
|
||||||
forumId: number,
|
forumId: number,
|
||||||
type: number = 0,
|
type: number = 0,
|
||||||
|
page_size: number = 20,
|
||||||
): Promise<TGApp.Plugins.Mys.Forum.FullData> {
|
): Promise<TGApp.Plugins.Mys.Forum.FullData> {
|
||||||
const url = "https://bbs-api.miyoushe.com/post/wapi/getForumPostList";
|
const url = "https://bbs-api.miyoushe.com/post/wapi/getForumPostList";
|
||||||
const params = { forum_id: forumId.toString(), sort_type: type.toString() };
|
const params = {
|
||||||
|
forum_id: forumId.toString(),
|
||||||
|
sort_type: type.toString(),
|
||||||
|
page_size: page_size.toString(),
|
||||||
|
};
|
||||||
const resp = await TGHttp<TGApp.Plugins.Mys.Forum.Response>(url, {
|
const resp = await TGHttp<TGApp.Plugins.Mys.Forum.Response>(url, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
query: params,
|
query: params,
|
||||||
|
|||||||
Reference in New Issue
Block a user