木邻有你前端代码仓库
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.

54 lines
1.0 KiB

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