chat.js 515 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import request from '@/axios'
  2. /*
  3. * 聊天登录
  4. *
  5. *
  6. */
  7. export function login(data) {
  8. return request({
  9. url: `/im/user/token/get`,
  10. method: 'post',
  11. data: data
  12. })
  13. }
  14. /*
  15. * 发送聊天消息
  16. *
  17. *
  18. */
  19. export function sendSystem(data) {
  20. return request({
  21. url: `/im/message/save`,
  22. method: 'post',
  23. data: data
  24. })
  25. }
  26. /*
  27. * 上传文件
  28. *
  29. *
  30. */
  31. export function uploadImage(data) {
  32. return request({
  33. url: `/im/upload/image`,
  34. method: 'post',
  35. data: data
  36. })
  37. }