platformProduct.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. import request from "@/utils/request";
  2. // 商品分类管理
  3. // /platformProductClassify/getAll 商品类别管理查询
  4. export const getAllClass = (data) =>
  5. request({
  6. url: "/platformProductClassify/getAll",
  7. method: "POST",
  8. data,
  9. });
  10. // /platformProductClassify/save 添加商品类别
  11. export const createdShopClass = (data) =>
  12. request({
  13. url: "/platformProductClassify/save",
  14. method: "POST",
  15. data,
  16. });
  17. // /platformProductClassify/update 修改商品类别
  18. export const updateClass = (data) =>
  19. request({
  20. url: "/platformProductClassify/update",
  21. method: "POST",
  22. data,
  23. });
  24. // /platformProductClassify/delete 删除商品类别
  25. export const deleteClass = (data) =>
  26. request({
  27. url: "/platformProductClassify/delete",
  28. method: "POST",
  29. data,
  30. });
  31. // /platformProductClassify/getById 商品类别编辑/查询
  32. export const getClassDetails = (data) =>
  33. request({
  34. url: "/platformProductClassify/getById",
  35. method: "POST",
  36. data,
  37. });
  38. // 选品管理
  39. // 选品管理查询
  40. export function getClassifyGetAll(data) {
  41. return request({
  42. url: "/platformProduct/getAll",
  43. method: "POST",
  44. data,
  45. });
  46. }
  47. // /platformProduct/save 新增选品商品
  48. export function getClassifyAdd(data) {
  49. return request({
  50. url: "/platformProduct/save",
  51. method: "POST",
  52. data,
  53. });
  54. }
  55. // /platformProduct/update 修改选品商品
  56. export function getClassifyUpdate(data) {
  57. return request({
  58. url: "/platformProduct/update",
  59. method: "POST",
  60. data,
  61. });
  62. }
  63. // /platformProduct/delete 删除商品
  64. export function getClassifyDelete(data) {
  65. return request({
  66. url: "/platformProduct/delete",
  67. method: "POST",
  68. data,
  69. });
  70. }
  71. // /platformProduct/start 商品上下架
  72. export function getClassifyStart(data) {
  73. return request({
  74. url: "/platformProduct/start",
  75. method: "POST",
  76. data,
  77. });
  78. }
  79. // 获取品牌列表
  80. export function getBrandList() {
  81. return request({
  82. url: "/platformProduct/getBrandList",
  83. method: "POST",
  84. });
  85. }
  86. // 商品分类
  87. export function getClassify(data) {
  88. return request({
  89. url: "/platformProduct/getClassify",
  90. method: "POST",
  91. data,
  92. });
  93. }
  94. // /voucher/getAll 获取可选择的代金卷
  95. export function getVoucher(data) {
  96. return request({
  97. url: "/voucher/getAll",
  98. method: "POST",
  99. data,
  100. });
  101. }
  102. // // 修改商品
  103. export function getClassifyGetById(data) {
  104. return request({
  105. url: "/platformProduct/getById",
  106. method: "post",
  107. data,
  108. });
  109. }
  110. // // 导出商品信息
  111. // export function productExport(data) {
  112. // return request({
  113. // url: '/product/exportProduct',
  114. // method: 'post',
  115. // data,
  116. // responseType: 'blob'
  117. // })
  118. // }
  119. // 新增定价管理
  120. export function addFixed(data) {
  121. return request({
  122. url: "/priceControl/save",
  123. method: "post",
  124. data,
  125. });
  126. }
  127. // 删除定价方案
  128. export function delFixed(params) {
  129. return request({
  130. url: "/priceControl/delete",
  131. method: "delete",
  132. params,
  133. });
  134. }
  135. // 获取单个定价方案
  136. export function getFixedOne(id) {
  137. return request({
  138. url: `/priceControl/${id}`,
  139. method: "get",
  140. });
  141. }
  142. // 更新定价方案
  143. export function updateFixed(data) {
  144. return request({
  145. url: "/priceControl/update",
  146. method: "put",
  147. data,
  148. });
  149. }
  150. // 获取定价方案
  151. export function getFixed(data) {
  152. return request({
  153. url: "/priceControl/page",
  154. method: "post",
  155. data,
  156. });
  157. }
  158. // 获取我的选品列表
  159. export function getMyProduct(data) {
  160. return request({
  161. url: "canvas/getAll",
  162. method: "post",
  163. data,
  164. });
  165. }
  166. // 获取选品商家
  167. export function getProductMerchant(data) {
  168. return request({
  169. url: "/selection/getShopAll",
  170. method: "post",
  171. data,
  172. });
  173. }
  174. // 获取选品商家当前下的选品列表
  175. export function getProductMerchantList(data) {
  176. return request({
  177. url: "/selection/getProductAll",
  178. method: "post",
  179. data,
  180. });
  181. }
  182. // 加入选品库
  183. export function addProduct(data) {
  184. return request({
  185. url: "/selection/addSelectionLibrary",
  186. method: "post",
  187. data,
  188. });
  189. }
  190. // 获取商品详情
  191. export function getProductDetail(data) {
  192. return request({
  193. url: "/selection/getProductDetails",
  194. method: "post",
  195. data,
  196. });
  197. }