msg.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. import request from '@/utils/request'
  2. // 查询聊天消息管理;列表
  3. export function listMsg(query) {
  4. return request({
  5. url: '/chat/msg/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询聊天消息管理;详细
  11. export function getMsg(msgId) {
  12. return request({
  13. url: '/chat/msg/' + msgId,
  14. method: 'get'
  15. })
  16. }
  17. // 新增聊天消息管理;
  18. export function addMsg(data) {
  19. return request({
  20. url: '/chat/msg',
  21. method: 'post',
  22. data: data
  23. })
  24. }
  25. // 修改聊天消息管理;
  26. export function updateMsg(data) {
  27. return request({
  28. url: '/chat/msg',
  29. method: 'put',
  30. data: data
  31. })
  32. }
  33. // 获得聊天消息管理;
  34. export function msgFriend(msgId) {
  35. return request({
  36. url: '/chat/msg/friend',
  37. method: 'get'
  38. })
  39. }
  40. // 删除聊天消息管理;
  41. export function delMsg(msgId) {
  42. return request({
  43. url: '/chat/msg/'+msgId,
  44. method: 'delete'
  45. })
  46. }
  47. //树获取用户信息
  48. export function userTree() {
  49. return request({
  50. url: '/system/user/tree',
  51. method: 'get'
  52. })
  53. }
  54. //选择树时得到用户个人的详细信息,包含头像等
  55. export function userInfo(data) {
  56. return request({
  57. url: '/system/user/info/'+data,
  58. method: 'get'
  59. })
  60. }
  61. //发送消息
  62. export function msgSend(data) {
  63. return request({
  64. url: "/chat/msg/send",
  65. method: "post",
  66. data
  67. })
  68. }
  69. //获取聊天记录
  70. export function msgRecord(data,query) {
  71. return request({
  72. url: '/chat/msg/record/'+data,
  73. method: 'get',
  74. params: query
  75. })
  76. }
  77. // 获取文件树,用于选择目录发送
  78. export function dirTree(data) {
  79. return request({
  80. url: '/biz/dir/dir-tree/'+data,
  81. method: 'get'
  82. })
  83. }
  84. // 获取文件树,用于选择文件发送
  85. export function fileTree(data) {
  86. return request({
  87. url: '/biz/dir/file-tree/'+data,
  88. method: 'get'
  89. })
  90. }
  91. //获取文件的详细信息,以便于在聊天中展示
  92. export function getConfigKeys(docId) {
  93. return request({
  94. url: '/biz/info/' + docId,
  95. method: 'get'
  96. })
  97. }
  98. // 新建目录
  99. export function builtDir(data) {
  100. return request({
  101. url: '/biz/dir',
  102. method: 'post',
  103. data: data
  104. })
  105. }
  106. export function fileCopy(data) {
  107. return request({
  108. url: `/biz/info/copy`,
  109. method: "get",
  110. params: data
  111. })
  112. }
  113. export function spaceInfo(type) {
  114. return request({
  115. url: `/biz/space/info/${type}`,
  116. method: "get",
  117. })
  118. }
  119. // 文件下载
  120. export function fileDownload(data){
  121. return request({
  122. url:`/biz/info/download/${data}`,
  123. method:"get"
  124. })
  125. }
  126. //测试
  127. export function uploadFileMany(data) {
  128. return request({
  129. url: `/biz/info/uploadFiles`,
  130. method: "post",
  131. data,
  132. })
  133. }