shop.ts 1012 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /***************************************************** 店铺管理 ****************************************************/
  2. /**
  3. * 获取店铺列表
  4. */
  5. export function getShopList(params: Record<string, any>) {
  6. return request.get(`shop/web/shop`, params)
  7. }
  8. /**
  9. * 获取店铺分类
  10. */
  11. export function getShopCategory() {
  12. return request.get(`shop/web/shop_category`)
  13. }
  14. /**
  15. * 获取店铺详情
  16. */
  17. export function getShopInfo(id: number) {
  18. return request.get(`shop/web/shop/${ id }`)
  19. }
  20. /**
  21. * 收藏取消店铺
  22. * @param params
  23. */
  24. export function editShopCollect(params: Record<string, any>) {
  25. return request.put(`shop/web/shop/${ params.site_id }/${ params.is_follow }`)
  26. }
  27. /**
  28. * 获取店铺收藏列表
  29. */
  30. export function getShopFollowList(params: Record<string, any>) {
  31. return request.get(`shop/web/follow`, params)
  32. }
  33. /**
  34. * 获取店铺商品分类
  35. */
  36. export function getStoreCategory(params: Record<string, any>) {
  37. return request.get(`mall/goods/category/tree`, params)
  38. }