im.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. import request from '@/utils/request'
  2. export function getContacts(deviceId) {
  3. return request({
  4. url: '/qw/contact/list/'+deviceId,
  5. method: 'get'
  6. })
  7. }
  8. export function getContactsByUser(userId) {
  9. return request({
  10. url: '/qw/contact/listByUser/'+userId,
  11. method: 'get'
  12. })
  13. }
  14. export function getConversations(userId) {
  15. return request({
  16. url: '/qw/qwMsg/conversationList/'+userId,
  17. method: 'get'
  18. })
  19. }
  20. export function getConversation(query) {
  21. return request({
  22. url: '/qw/qwMsg/getSession',
  23. method: 'get',
  24. params:query
  25. })
  26. }
  27. export function getMessageList(query) {
  28. return request({
  29. url: '/qw/qwMsg/getQwMessageListBySession',
  30. method: 'get',
  31. params: query
  32. })
  33. }
  34. export function getQwUserList() {
  35. return request({
  36. url: '/qw/qwMsg/qwUserList',
  37. method: 'get',
  38. })
  39. }
  40. // 发送文本消息
  41. export function sendMsg(data) {
  42. return request({
  43. url: '/qw/qwMsg/sendMsg',
  44. method: 'post',
  45. data: data
  46. })
  47. }
  48. // 发送文本消息
  49. export function sendImageMsg(data) {
  50. return request({
  51. url: '/qw/message/image',
  52. method: 'post',
  53. data: data
  54. })
  55. }
  56. export function getRoomInfo(roomId) {
  57. return request({
  58. url: '/qw/room/roomDetail/'+roomId,
  59. method: 'get'
  60. })
  61. }
  62. //导出消息
  63. export function exportMessage(query) {
  64. return request({
  65. url: '/qw/message/export/',
  66. method: 'get',
  67. params: query
  68. })
  69. }
  70. // 获取外部联系人详情
  71. export function getQwExternalContactDetails(query) {
  72. return request({
  73. url: '/qw/qwMsg/getQwExternalContactDetails',
  74. method: 'get',
  75. params: query
  76. })
  77. }
  78. // 获取用户信息
  79. export function getQwUserInfo(query) {
  80. return request({
  81. url: '/qw/qwMsg/getQwUserInfo',
  82. method: 'get',
  83. params: query
  84. })
  85. }
  86. // 修改用户信息
  87. export function updateQwUserInfo(data) {
  88. return request({
  89. url: '/qw/qwMsg/updateQwUserInfo',
  90. method: 'post',
  91. data: data
  92. })
  93. }
  94. // 获取看课记录
  95. export function queryCourseWatchStatistics(data) {
  96. return request({
  97. url: '/qw/qwMsg/course/watch',
  98. method: 'post',
  99. data: data
  100. })
  101. }
  102. // 获取课程列表
  103. export function getFsCourseListBySidebar(data) {
  104. return request({
  105. url: '/qw/qwMsg/getFsCourseListBySidebar',
  106. method: 'post',
  107. data: data
  108. })
  109. }
  110. // 获取课程小节列表
  111. export function getFsCourseVideoListBySidebar(data) {
  112. return request({
  113. url: '/qw/qwMsg/getFsCourseVideoListBySidebar',
  114. method: 'post',
  115. data: data
  116. })
  117. }