移动端适配

This commit is contained in:
2025-06-29 18:06:37 +08:00
parent afc39cc066
commit 0e73e24b4d
4 changed files with 157 additions and 68 deletions

View File

@@ -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;
}
};