memberCart.js 839 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { requestApi } from '../util/network'
  2. // 加入购物车
  3. export const addCart =
  4. (goods_id, quantity) =>
  5. requestApi(
  6. '/Membercart/cart_add',
  7. 'POST',
  8. {
  9. 'goods_id': goods_id,
  10. 'quantity': quantity,
  11. 'client_type': 'wap'
  12. },
  13. 'member'
  14. )
  15. // 编辑购物车
  16. export const editCart =
  17. (cart_id, quantity) =>
  18. requestApi(
  19. '/Membercart/cart_edit_quantity',
  20. 'POST',
  21. {
  22. 'cart_id': cart_id,
  23. 'quantity': quantity,
  24. 'client_type': 'wap'
  25. },
  26. 'member'
  27. )
  28. // 删除购物车
  29. export const delCart =
  30. (cart_id) =>
  31. requestApi(
  32. '/Membercart/cart_del',
  33. 'POST',
  34. {
  35. 'cart_id': cart_id,
  36. 'client_type': 'wap'
  37. },
  38. 'member'
  39. )