// import request from "@/api/request";
import http from "@/api/http";

export default {
  // 首页-兑换商品
  async buyGoods(data) {
    return http({
      url: '/goods/buyGoods',
      method: 'POST',
      data,
      showLoading: true
    })
  },

  // 首页- 收藏商品
  async collectionGoods(data) {
    return http({
      url: '/goods/collectionGoods',
      method: 'POST',
      data,
      showLoading: true
    })
  },

  // 首页- 获取商品详情
  async queryGoodsById(data) {
    return http({
      url: '/goods/queryGoodsById',
      method: 'GET',
      data,
      noToken: true
    })
  },

  // 商品收藏- 获取我收藏的商品列表
  async queryGoodsCollectionList(data) {
    return http({
      url: '/goods/queryGoodsCollectionList',
      method: 'POST',
      data
    })
  },

  // 首页- 获取商品列表
  async queryGoodsList(data) {
    return http({
      url: '/goods/queryGoodsList',
      method: 'GET',
      data,
      noToken: true,
      debounce: 200,
      // showLoading: true
    })
  }
}