conversation.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. import request from '../utils/request'
  2. //查询会话记录列表
  3. export function getList(data) {
  4. return request({
  5. url: `/core/conversation/list`,
  6. method: 'post',
  7. data
  8. })
  9. }
  10. //发送
  11. export function sendMsg(data) {
  12. return request({
  13. url: `/core/conversation/sendMsg`,
  14. method: 'post',
  15. data
  16. })
  17. }
  18. //订单页面 点击沟通 获取会话记录详细信息
  19. export function getOrderConversationInfo(data) {
  20. return request({
  21. url: `/core/conversation/getOrderConversationInfo`,
  22. method: 'post',
  23. data
  24. })
  25. }
  26. //消息列表页面 点击会话 获取会话记录详细信息
  27. export function getListConversationInfo(params) {
  28. return request({
  29. url: `/core/conversation/getListConversationInfo`,
  30. method: 'get',
  31. params
  32. })
  33. }
  34. //帮助与客服,获取与客服会话记录和详细信息
  35. export function getHelpConversation(data) {
  36. return request({
  37. url: `/core/conversation/getHelpConversation`,
  38. method: 'post',
  39. data
  40. })
  41. }
  42. //打开会话框时,设置已读
  43. export function setRead(data) {
  44. return request({
  45. url: `/core/conversation/setRead`,
  46. method: 'post',
  47. data
  48. })
  49. }
  50. //删除会话记录
  51. export function conversationRemove(data) {
  52. return request({
  53. url: `/core/conversation/remove`,
  54. method: 'post',
  55. data
  56. })
  57. }
  58. //获取历史聊天记录,目前设置为获取10条
  59. export function getHistoryMsg(data) {
  60. return request({
  61. url: `/core/conversation/getHistoryMsg`,
  62. method: 'post',
  63. data
  64. })
  65. }