木邻有你前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1014 B

  1. import request from "@/api/request";
  2. export default {
  3. // 首页-兑换商品
  4. async buyGoods(data) {
  5. return request({
  6. url: '/goods/buyGoods',
  7. method: 'POST',
  8. data,
  9. showLoading: true
  10. })
  11. },
  12. // 首页- 收藏商品
  13. async collectionGoods(data) {
  14. return request({
  15. url: '/goods/collectionGoods',
  16. method: 'POST',
  17. data,
  18. showLoading: true
  19. })
  20. },
  21. // 首页- 获取商品详情
  22. async queryGoodsById(data) {
  23. return request({
  24. url: '/goods/queryGoodsById',
  25. method: 'GET',
  26. data,
  27. noToken: true
  28. })
  29. },
  30. // 商品收藏- 获取我收藏的商品列表
  31. async queryGoodsCollectionList(data) {
  32. return request({
  33. url: '/goods/queryGoodsCollectionList',
  34. method: 'POST',
  35. data
  36. })
  37. },
  38. // 首页- 获取商品列表
  39. async queryGoodsList(data) {
  40. return request({
  41. url: '/goods/queryGoodsList',
  42. method: 'GET',
  43. data,
  44. noToken: true,
  45. showLoading: true
  46. })
  47. }
  48. }