import { request } from "@/utils/request.js"; // 发布主题 export const releaseTopic = async (data) => { return request({ url: "/api/rating/topic/release", method: "POST", data, }); }; // 获取主题分类列表 export const fetchTopicCategories = async (data) => { return request({ url: "/api/rating/topic/category/list", method: "GET", }); }; // 根据分类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", }); };