home.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import request from "@/utils/request.js";
  2. /* 首页*/
  3. // 查询轮播数据
  4. export function getAdsList(data) {
  5. return request.get("v1/re/ads/list",data);
  6. }
  7. // 查询首页公告消息
  8. export function getNoticeList(data) {
  9. return request.get("v1/notice-list",data);
  10. }
  11. // 根据一级商品分类查询二级商品分类
  12. export function getCategoryOne(data) {
  13. return request.get("/v1/re/category/list",data);
  14. }
  15. // 根据一级商品分类查询二级商品分类
  16. export function getCategoryTwo(data) {
  17. return request.get("v1/re/category/list",data);
  18. }
  19. // 商品分页查询
  20. export function getGoodsPage(data) {
  21. return request.get("v1/goods-page",data);
  22. }
  23. // 根据用户Id查询首页商品列表
  24. export function getIndexData(data) {
  25. return request.get("v1/index-data",data);
  26. }
  27. // 根据商品列表
  28. export function getGoodsInfo(data) {
  29. return request.get("v1/re/goodsInfo/page",data);
  30. }
  31. /* 商品详情*/
  32. // 商品详情
  33. export function getGoodsDetail(data) {
  34. return request.get("v1/re/goodsInfo/detail",data);
  35. }
  36. // 获取用户收获地址
  37. export function getUserAddressByUserId(data) {
  38. return request.get("v1/userAddress-detailByUserId",data);
  39. }
  40. //
  41. export function getUserAddress(data) {
  42. return request.get("v1/userAddress-detailByIdAndFreight",data);
  43. }
  44. //
  45. export function getAvailableChec(data) {
  46. return request.get("v1/re/order/availableChec",data);
  47. }