@gt6/sdk 1.0.48 → 1.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/gt6-sdk.cjs.js
CHANGED
|
@@ -1003,11 +1003,13 @@ class ArticlesAPI {
|
|
|
1003
1003
|
tag: tagInfo
|
|
1004
1004
|
};
|
|
1005
1005
|
}
|
|
1006
|
+
// 将文章ID列表倒序排列
|
|
1007
|
+
const reversedArticleIds = [...tagData.articleIds].reverse();
|
|
1006
1008
|
// 应用分页
|
|
1007
1009
|
const page = options?.page || 1;
|
|
1008
1010
|
const limit = options?.limit || 10;
|
|
1009
1011
|
const offset = (page - 1) * limit;
|
|
1010
|
-
const paginatedArticleIds =
|
|
1012
|
+
const paginatedArticleIds = reversedArticleIds.slice(offset, offset + limit);
|
|
1011
1013
|
// 获取文章详情
|
|
1012
1014
|
const articles = await Promise.all(paginatedArticleIds.map(articleId => this.getArticle_all(articleId)));
|
|
1013
1015
|
// 应用状态过滤
|