Skip to content

Let's use AI to Earn!

feat: 热门专题相关接口

yikaJasonMic4b6116c34a50
diff --git a/src/api/platform.ts b/src/api/platform.ts
index 494b5822..2a9fe2a6 100644
--- a/src/api/platform.ts
+++ b/src/api/platform.ts
@@ -167,26 +167,32 @@ export const platformApi = {
// ---- 热门专题 ----
- // 获取所有专题分类
- getTopicCategories() {
- return http.get<string[]>(`/topics/categories`, {
+ // 获取所有专题标签
+ getTopics() {
+ return http.get<string[]>(`/topics/topics`, {
isToken: false,
});
},
- // 获取子分类列表
- getSubCategories(category?: string) {
- return http.get<string[]>(`/topics/sub-categories`, {
+ // 获取所有专题类型
+ getMsgType() {
+ return http.get<string[]>(`/topics/msgType`, {
+ isToken: false,
+ });
+ },
+
+ // 获取所有专题分类
+ getTopicTypes(msgType: string) {
+ return http.get<string[]>(`/topics/types/${msgType}`, {
isToken: false,
- params: {
- category,
- },
});
},
+
// 获取热门专题列表
getAllTopics(params: {
- category?: string; // 分类
- subCategory?: string; // 子分类
+ msgType?: string; // 项目类型
+ type?: string; // 类型
+ platformId?: string; // 平台ID
startTime?: string; // 发布时间开始
endTime?: string; // 发布时间结束
topic?: string; // 话题标签
@@ -197,20 +203,6 @@ export const platformApi = {
});
},
- // 获取所有专题标签
- getTopics() {
- return http.get<string[]>(`/topics/topics`, {
- isToken: false,
- });
- },
-
- // 获取所有专题类型
- getMsgType() {
- return http.get<string[]>(`/topics/msgType`, {
- isToken: false,
- });
- },
-
// ---- 爆款标题 ----
// 获取有数据的平台列表
findPlatformsWithData() {