category.js 758 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import request from '@/utils/request'
  2. export function listCategory(query) {
  3. return request({
  4. url: '/category/list',
  5. method: 'get',
  6. params: query
  7. })
  8. }
  9. export function listCatL1() {
  10. return request({
  11. url: '/category/l1',
  12. method: 'get'
  13. })
  14. }
  15. export function createCategory(data) {
  16. return request({
  17. url: '/category/create',
  18. method: 'post',
  19. data
  20. })
  21. }
  22. export function readCategory(data) {
  23. return request({
  24. url: '/category/read',
  25. method: 'get',
  26. data
  27. })
  28. }
  29. export function updateCategory(data) {
  30. return request({
  31. url: '/category/update',
  32. method: 'post',
  33. data
  34. })
  35. }
  36. export function deleteCategory(data) {
  37. return request({
  38. url: '/category/delete',
  39. method: 'post',
  40. data
  41. })
  42. }