storePromotion.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. import request from '@/utils/request'
  2. export function listStorePromotion(query) {
  3. return request({
  4. url: '/store/storePromotion/list',
  5. method: 'get',
  6. params: query
  7. })
  8. }
  9. export function getStorePromotion(id) {
  10. return request({
  11. url: '/store/storePromotion/' + id,
  12. method: 'get'
  13. })
  14. }
  15. export function addStorePromotion(data) {
  16. return request({
  17. url: '/store/storePromotion',
  18. method: 'post',
  19. data: data
  20. })
  21. }
  22. export function updateStorePromotion(data) {
  23. return request({
  24. url: '/store/storePromotion',
  25. method: 'put',
  26. data: data
  27. })
  28. }
  29. export function delStorePromotion(id) {
  30. return request({
  31. url: '/store/storePromotion/' + id,
  32. method: 'delete'
  33. })
  34. }
  35. export function enableStorePromotion(id) {
  36. return request({
  37. url: '/store/storePromotion/' + id + '/enable',
  38. method: 'put'
  39. })
  40. }
  41. export function disableStorePromotion(id) {
  42. return request({
  43. url: '/store/storePromotion/' + id + '/disable',
  44. method: 'put'
  45. })
  46. }
  47. export function exportStorePromotion(query) {
  48. return request({
  49. url: '/store/storePromotion/export',
  50. method: 'get',
  51. params: query
  52. })
  53. }
  54. export function getOrderPromotionDetail(orderId) {
  55. return request({
  56. url: '/store/storePromotion/order/' + orderId,
  57. method: 'get'
  58. })
  59. }
  60. export function getPromotionReportStats(query) {
  61. return request({
  62. url: '/store/storePromotion/report/stats',
  63. method: 'get',
  64. params: query
  65. })
  66. }
  67. export function listPromotionReportOrders(query) {
  68. return request({
  69. url: '/store/storePromotion/report/orders',
  70. method: 'get',
  71. params: query
  72. })
  73. }