Files
property-manager-side/wuye-manager-uniapp/api/complain.js
2026-07-27 08:09:22 +08:00

87 lines
2.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* @Description: 投诉详情API
* @Author: Zy
* @Date: 2026-05-15 08:50:47
* @LastEditor: Zy
* @LastEditTime: 2026-07-25 16:36:46
*/
import request, {
filterParams,
get,
put,
post
} from "./request.js";
/**
* 获取投诉信息分页列表
* @param {Object} data - 请求参数
* @param {number} data.pageNum - 页码(第几页)
* @param {number} data.pageSize - 每页条数
* @param {number} [data.status] - 投诉状态(可选),不传=全部,0=待处理,2=已完成
* @returns {Promise<{
* code: number,
* msg: string,
* total: number,
* rows: Array<{
* id: string,
* typeId: number,
* typeName: string,
* problemDes: string,
* complaintName: string,
* phone: string,
* villageId: number,
* problemImageUrl: string,
* status: string,
* createTime: string|null,
* handleId: number|null,
* handleName: string|null,
* handleContent: string|null
* }>
* }>} 返回接口响应结果
*/
export const getComplainList = (data) => {
return get('/manage/complain/list', filterParams(data))
}
/**
* 获取 某一个 投诉详情
* @param {string} id 投诉id
*/
export const getComplaniMain = (id) => {
return post('/manage/complain/list', data)
}
/**
* @description: 处理投诉API
* @param {Object} data
* @param {string} data.id 投诉id
* @param {string} data.handleId 处理人员id
* @param {string} data.handleContent 处理描述
*/
export const putComplainProcess = (data) => {
return put('/manage/complain/process', data)
}
/**
* @typedef complainMain 投诉详情内容
* @property {number} typeId
* @property {string} typeName
* @property {string} problemDes
* @property {string} complaintName
* @property {string} phone
* @property {string} villageId
* @property {string} problemImageUrl
* @property {string} status
* @property {string} createTime
* @property {string} handleName
* @property {string} handleContent
*/
/**
* @description: 查询 具体 投诉详情
* @param {string} 投诉 id
* @return {Promise<DataResult<complainMain>>}
*/
export const getComplainMain = (id) => {
return get('/manage/complain/detail?id=' + id)
}