index.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. import https from '@/plugins/luch-request_0.0.7/request'
  2. /** *
  3. * 商品详情 m
  4. */
  5. export const getDetail = data => {
  6. return https.get('/goods/detail', data)
  7. }
  8. // ===================== B 端 ========================
  9. /** *
  10. * 获取分类的商品 b
  11. */
  12. export const getCategoryGoodsB = data => {
  13. return https.get('/category/goods-list', data)
  14. }
  15. /** *
  16. * 商品-列表 b
  17. */
  18. export const getListB = data => {
  19. return https.get('/goods/list', data)
  20. }
  21. /** *
  22. * 商品-查看 b
  23. */
  24. export const getDetailB = data => {
  25. return https.get('/goods/detail', data)
  26. }
  27. /** *
  28. * 商品-添加 b
  29. */
  30. export const addB = data => {
  31. return https.post('/goods/add', data)
  32. }
  33. /** *
  34. * 商品-删除 b
  35. */
  36. export const delB = data => {
  37. return https.get('/goods/delete', data)
  38. }
  39. /** *
  40. * 商品-修改 b
  41. */
  42. export const updateB = data => {
  43. return https.post('/goods/update', data)
  44. }
  45. /** *
  46. * 商品-上下架 b
  47. */
  48. export const changeStatusB = data => {
  49. return https.get('/goods/change-status', data)
  50. }
  51. /** *
  52. * 商品-查看短链接 b
  53. */
  54. export const shortUrlB = data => {
  55. return https.get('/goods/short-url', data)
  56. }
  57. /** *
  58. * 商品-发送链接 b
  59. */
  60. export const sendShortUrlB = data => {
  61. return https.get('/goods/send-short-url', data)
  62. }
  63. /** *
  64. * 商品用途-列表(无分页) b
  65. */
  66. export const usageListB = data => {
  67. return https.get('/usage/list', data)
  68. }
  69. /** *
  70. * 商品分类-列表(无分页) b
  71. */
  72. export const categoryListB = data => {
  73. return https.get('/category/list', data)
  74. }
  75. /** *
  76. * 商品分类-查看 b
  77. */
  78. export const categoryDetB = data => {
  79. return https.get('/category/detail', data)
  80. }
  81. /** *
  82. * 商品分类-添加 b
  83. */
  84. export const categoryAddB = data => {
  85. return https.post('/category/add', data)
  86. }
  87. /** *
  88. * 商品分类-更新 b
  89. */
  90. export const categoryUpdateB = data => {
  91. return https.post('/category/update', data)
  92. }
  93. /** *
  94. * 商品分类-更新 b
  95. */
  96. export const categoryDelB = data => {
  97. return https.get('/category/delete', data)
  98. }
  99. /** *
  100. * 商品分类-启用停用 b
  101. */
  102. export const categoryStatusB = data => {
  103. return https.get('/category/change-status', data)
  104. }
  105. /** *
  106. * 商品管理-运费设置 b
  107. */
  108. export const freightSet = data => {
  109. return https.get('/merchant/freight-setting', data)
  110. }
  111. /** *
  112. * 商品管理-涨价设置 b
  113. */
  114. export const getRise = data => {
  115. return https.get('/goods/setting', data)
  116. }
  117. /** *
  118. * 商品管理-更新涨价 b
  119. */
  120. export const updateRise = data => {
  121. return https.post('/goods/update-rise', data)
  122. }