memberFavorite.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import { requestApi } from '../util/network'
  2. // 获取店铺搜藏列表
  3. export const getFavoriteStoreList =
  4. (page) =>
  5. requestApi(
  6. '/Memberfavoritesstore/favorites_list',
  7. 'POST',
  8. {
  9. },
  10. 'member'
  11. )
  12. // 收藏店鋪
  13. export const addFavoriteStore =
  14. (storeId) =>
  15. requestApi(
  16. '/Memberfavoritesstore/favorites_add',
  17. 'POST',
  18. {
  19. 'store_id': storeId // 所属店铺
  20. },
  21. 'member'
  22. )
  23. // 删除店铺搜藏
  24. export const delFavoriteStore =
  25. (favId) =>
  26. requestApi(
  27. '/Memberfavoritesstore/favorites_del',
  28. 'POST',
  29. {
  30. 'fav_id': favId
  31. },
  32. 'member'
  33. )
  34. // 获取商品搜藏列表
  35. export const getFavoriteGoodsList =
  36. (page) => requestApi(
  37. '/Memberfavorites/favorites_list',
  38. 'POST',
  39. {
  40. 'page': page
  41. },
  42. 'member'
  43. )
  44. // 删除商品搜藏
  45. export const delFavoriteGoods =
  46. (favId) =>
  47. requestApi(
  48. '/Memberfavorites/favorites_del',
  49. 'POST',
  50. {
  51. 'fav_id': favId
  52. },
  53. 'member'
  54. )