data.service.js 982 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import Content from '@/sheep/layouts/content.vue';
  2. import { request } from '@/sheep/request';
  3. import { CRUD } from '@/sheep/request/crud';
  4. const route = {
  5. path: 'data',
  6. name: 'shop.admin.data',
  7. component: Content,
  8. meta: {
  9. title: '数据',
  10. },
  11. children: [
  12. {
  13. path: 'report',
  14. name: 'shop.admin.data.report',
  15. component: () => import('@/app/shop/admin/data/report/index.vue'),
  16. meta: {
  17. title: '数据报表',
  18. },
  19. },
  20. ],
  21. };
  22. const api = {
  23. report: {
  24. ...CRUD('shop/admin/data/report', ['list']),
  25. getStats: () =>
  26. request({
  27. url: '/shop/admin/data/report/stats',
  28. method: 'GET',
  29. }),
  30. },
  31. express: {
  32. list: () =>
  33. request({
  34. url: '/shop/admin/data/express/list',
  35. method: 'GET',
  36. }),
  37. track: (code, no) =>
  38. request({
  39. url: '/shop/admin/data/express/track',
  40. method: 'GET',
  41. params: { code, no },
  42. }),
  43. },
  44. };
  45. export { route, api };