feat: release
This commit is contained in:
19
api/topic.js
19
api/topic.js
@@ -1,5 +1,6 @@
|
||||
import { request } from "@/utils/request.js";
|
||||
|
||||
// 发布主题
|
||||
export const releaseTopic = async (data) => {
|
||||
return request({
|
||||
url: "/api/rating/topic/release",
|
||||
@@ -8,6 +9,7 @@ export const releaseTopic = async (data) => {
|
||||
});
|
||||
};
|
||||
|
||||
// 获取主题分类列表
|
||||
export const fetchTopicCategories = async (data) => {
|
||||
return request({
|
||||
url: "/api/rating/topic/category/list",
|
||||
@@ -15,9 +17,26 @@ export const fetchTopicCategories = async (data) => {
|
||||
});
|
||||
};
|
||||
|
||||
// 根据分类ID获取主题列表
|
||||
export const fetchTopicList = async (categoryId, page = 1) => {
|
||||
return request({
|
||||
url: `/api/rating/topic/list/${categoryId}?page=${page}`,
|
||||
method: "GET",
|
||||
});
|
||||
};
|
||||
|
||||
// 获取主题详情
|
||||
export const fetchTopicDetail = async (topicId) => {
|
||||
return request({
|
||||
url: `/api/rating/topic/detail/${topicId}`,
|
||||
method: "GET",
|
||||
});
|
||||
};
|
||||
|
||||
// 获取主题下的评分项
|
||||
export const fetchTopicRatingItems = async (topicId, page = 1) => {
|
||||
return request({
|
||||
url: `/api/rating/topic/item/list/${topicId}?page=${page}`,
|
||||
method: "GET",
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user