feat: 新增举报详情功能及相关接口、页面
新增举报详情页面路由与配置 新增举报详情接口及路由规则 新增举报列表状态筛选功能 新增错误信息标准化处理方法 优化举报列表页面UI交互 完善微信登录异常提示处理
这个提交包含在:
@@ -68,6 +68,8 @@ export const postApi = {
|
||||
comment: (id, payload) => post(`/post/${id}/comment`, payload, { silent: true }),
|
||||
/** 发布者回复评价 */
|
||||
replyComment: (commentId, payload) => post(`/post/comment/${commentId}/reply`, payload, { silent: true }),
|
||||
/** 删除自己的评价 */
|
||||
deleteComment: (commentId) => post(`/post/comment/${commentId}/delete`, {}, { silent: true }),
|
||||
/** 评价列表(详情页「用户评价」,替代前端写死的假评价) */
|
||||
comments: (id) => get(`/post/${id}/comments`, {}, { silent: true }),
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/**
|
||||
* 接口模块 · 举报(用户端)
|
||||
* 对应接口契约:
|
||||
* - POST /report 提交举报 {targetType:'post'|'comment', targetId, reason, detail?, images?} → {reportId}
|
||||
* - GET /report/my 查询我的举报记录 {page, size} → 分页列表
|
||||
* - POST /report 提交举报 {targetType:'post'|'comment', targetId, reason, detail?, images?} → {reportId}
|
||||
* - GET /report/my 查询我的举报记录 {page, size} → 分页列表
|
||||
* - GET /report/:id 查询单条举报记录详情 → 举报详情对象
|
||||
*/
|
||||
import { post, get } from '../utils/request.js'
|
||||
import { REPORT_REASONS } from '../constants/report.js'
|
||||
@@ -29,6 +30,13 @@ export const reportApi = {
|
||||
*/
|
||||
my: (params = {}) => get('/report/my', params, { silent: true }),
|
||||
|
||||
/**
|
||||
* 查询单条举报记录详情
|
||||
* @param {number|string} id 举报记录 ID
|
||||
* @returns {Promise<Object>}
|
||||
*/
|
||||
detail: (id) => get(`/report/${id}`, {}, { silent: true }),
|
||||
|
||||
/** 举报原因默认清单 */
|
||||
reasons: REPORT_REASONS,
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户