chatRole.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import request from '@/utils/request'
  2. // 查询聊天角色列表
  3. export function listChatRole(query) {
  4. return request({
  5. url: '/chat/chatRole/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. export function getAllRoleList(query) {
  11. return request({
  12. url: '/chat/chatRole/getAllRoleList',
  13. method: 'get',
  14. params: query
  15. })
  16. }
  17. // 查询聊天角色详细
  18. export function getChatRole(roleId) {
  19. return request({
  20. url: '/chat/chatRole/' + roleId,
  21. method: 'get'
  22. })
  23. }
  24. // 新增聊天角色
  25. export function addChatRole(data) {
  26. return request({
  27. url: '/chat/chatRole',
  28. method: 'post',
  29. data: data
  30. })
  31. }
  32. // 修改聊天角色
  33. export function updateChatRole(data) {
  34. return request({
  35. url: '/chat/chatRole',
  36. method: 'put',
  37. data: data
  38. })
  39. }
  40. // 删除聊天角色
  41. export function delChatRole(roleId) {
  42. return request({
  43. url: '/chat/chatRole/' + roleId,
  44. method: 'delete'
  45. })
  46. }
  47. // 导出聊天角色
  48. export function exportChatRole(query) {
  49. return request({
  50. url: '/chat/chatRole/export',
  51. method: 'get',
  52. params: query
  53. })
  54. }