/*
 * @Author: PoJun
 * @Date: 2023-09-13 17:12:51
 * @LastEditors: PoJun
 * @LastEditTime: 2024-01-03 16:57:01
 * @Message: 待办相关
 */
const { http } = uni.$uv;
/** 获取待办事务列表 */
export const getWaitdoList = (params, config = {}) => http.get("/affairs/waitdo_list", params, config);

/** 获取已办事务列表 */
export const getDoneList = (params, config = {}) => http.get(`/affairs/done_list`, params, config);

// 获取某事务信息
export const getAffairInfo = (affairId, config) => http.get(`/affairs/${affairId}/info`, config);

// 获取某事务信息（看自己的处理结果）
export const getAffairSelfInfo = (affairId, config) => http.get(`/affairs/${affairId}/self_info`, config);

/** 拒绝某事务 */
export const refuseAffairs = affairId => http.post(`/affairs/${affairId}/refuse`);

/** 同意某事务 */
export const agreeAffairs = (affairId, params) => http.post(`/affairs/${affairId}/agree`, params);
