category.js 965 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import request from '@/utils/request'
  2. // 查询投诉分类列表
  3. export function listCategory(query) {
  4. return request({
  5. url: '/complaint/category/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询投诉分类详细
  11. export function getCategory(id) {
  12. return request({
  13. url: '/complaint/category/' + id,
  14. method: 'get'
  15. })
  16. }
  17. // 新增投诉分类
  18. export function addCategory(data) {
  19. return request({
  20. url: '/complaint/category',
  21. method: 'post',
  22. data: data
  23. })
  24. }
  25. // 修改投诉分类
  26. export function updateCategory(data) {
  27. return request({
  28. url: '/complaint/category',
  29. method: 'put',
  30. data: data
  31. })
  32. }
  33. // 删除投诉分类
  34. export function delCategory(ids) {
  35. return request({
  36. url: '/complaint/category/' + ids,
  37. method: 'delete'
  38. })
  39. }
  40. // 修改投诉分类状态
  41. export function changeStatus(data) {
  42. return request({
  43. url: '/complaint/category/status',
  44. method: 'put',
  45. data: data
  46. })
  47. }