feat: release

This commit is contained in:
zzc
2026-05-21 18:00:07 +08:00
parent b349e606fc
commit b778216afb
3 changed files with 275 additions and 241 deletions

View File

@@ -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",
});
};