mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-04-05 07:15:06 +08:00
🔥 移除帖子的 loadmore,刷新已经够用
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @file plugins/Mys/api/index.ts
|
||||
* @description Mys API
|
||||
* @since Beta v0.3.7
|
||||
* @since Beta v0.3.9
|
||||
*/
|
||||
|
||||
const MysApi = {
|
||||
@@ -10,7 +10,7 @@ const MysApi = {
|
||||
Lottery: "https://bbs-api.miyoushe.com/painter/wapi/lottery/user/show?id={lotteryId}",
|
||||
News: "https://bbs-api.mihoyo.com/post/wapi/getNewsList?gids={gid}&page_size={pageSize}&type={newsType}&last_id={lastId}",
|
||||
Forum:
|
||||
"https://bbs-api.miyoushe.com/post/wapi/getForumPostList?forum_id={forum}&gids={gid}&sort_type={type}&page={page}&page_size=20",
|
||||
"https://bbs-api.miyoushe.com/post/wapi/getForumPostList?forum_id={forum}&sort_type={type}",
|
||||
Feed: "https://bbs-api.miyoushe.com/post/api/feeds/posts?gids={gid}",
|
||||
Navigator: "https://bbs-api.miyoushe.com/apihub/api/home/new?gids={gid}",
|
||||
Position: "https://api-static.mihoyo.com/common/blackboard/ys_obc/v1/home/position?app_sn=ys_obc",
|
||||
|
||||
@@ -10,23 +10,19 @@ import MysApi from "../api";
|
||||
|
||||
/**
|
||||
* @description 获取特定论坛列表
|
||||
* @since Beta v0.3.7
|
||||
* @since Beta v0.3.9
|
||||
* @param {number} forumId 特定论坛 ID
|
||||
* @param {number} gid GID
|
||||
* @param {number} type 排序方式: 0-按热度排序,1-最新回复,2-按时间排序
|
||||
* @param {number} page 页码
|
||||
* @return {Promise<TGApp.Plugins.Mys.Forum.FullData>}
|
||||
*/
|
||||
async function getForumList(
|
||||
forumId: number,
|
||||
gid: number = 2,
|
||||
type: number = 0,
|
||||
page: number = 1,
|
||||
): Promise<TGApp.Plugins.Mys.Forum.FullData> {
|
||||
const url = MysApi.Forum.replace("{forum}", forumId.toString())
|
||||
.replace("{gid}", gid.toString())
|
||||
.replace("{type}", type.toString())
|
||||
.replace("{page}", page.toString());
|
||||
const url = MysApi.Forum.replace("{forum}", forumId.toString()).replace(
|
||||
"{type}",
|
||||
type.toString(),
|
||||
);
|
||||
return await http.fetch<TGApp.Plugins.Mys.Forum.Response>(url).then((res) => res.data.data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user