index.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import https from "@/plugins/luch-request_0.0.7/request";
  2. /** *
  3. * 分类及花材数据(库存预警、库存管理共用这个接口)
  4. * @parmas py 花材拼音
  5. * @parmas type 库存预警时,固定为waring,其他情况不传或者传空
  6. */
  7. export const getProductDataApi = data => {
  8. return https.get("/product/index", data);
  9. };
  10. /** *
  11. * 获取所有分类(包括常用、全部)(暂不用)
  12. * @parmas py 花材拼音
  13. * @parmas type 库存预警时,固定为waring,其他情况不传或者传空
  14. */
  15. export const getAllProductDataApi = data => {
  16. return https.get("/product/list", data);
  17. };
  18. /**
  19. * 自动调价
  20. * productId
  21. */
  22. export const autoPriceByIdApi = data => {
  23. return https.post("/product/auto-price", data);
  24. };
  25. /**
  26. * 改价
  27. * productId
  28. * price
  29. */
  30. export const changePriceByIdApi = data => {
  31. return https.post("/product/change-price", data);
  32. };
  33. //添加花材
  34. export const addProduct = data => {
  35. return https.post("/product/add", data);
  36. };
  37. //修改花材
  38. export const updateProduct = data => {
  39. return https.post("/product/update", data);
  40. };
  41. export const getProductDetail = data => {
  42. return https.get("/product/detail", data);
  43. };
  44. //获取拼音首字母缩写 shish 20210707
  45. export const py = data => {
  46. return https.get("/product/py", data);
  47. };