移动端适配
This commit is contained in:
@@ -75,4 +75,27 @@ export const deleteDemand = async (id) => {
|
||||
console.error('删除需求失败:', error);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* 添加需求回复
|
||||
* @param {number} id - 需求ID
|
||||
* @param {Object} replyData - 回复数据
|
||||
* @param {string} replyData.reply - 回复内容
|
||||
* @returns {Promise<Object>} 返回添加回复的响应数据
|
||||
* 说明:会将回复内容与用户qq拼接在一起,格式qq:内容|qq:内容
|
||||
*/
|
||||
export const addDemandReply = async (id, replyData) => {
|
||||
try {
|
||||
const payload = {
|
||||
id: id,
|
||||
reply: replyData.reply
|
||||
};
|
||||
console.log('添加需求回复的数据:', payload);
|
||||
const response = await axiosInstance.put('/demands/reply', payload);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error('添加需求回复失败:', error);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user