import request from "../utils/request";
import config from "@/config";
const { yxmGateway } = config;

export const getCouponList = params => {
  return request.get(`${yxmGateway}/api/kdsp/coupon/user-coupons`, params, {
    hideLoading: true
  });
};

// // 我的礼品卡
export const getGiftCardList = function(data) {
  return request.post(`${yxmGateway}/api/kdsp/card/list`, data, {
    hideLoading: true
  });
};
export const exchange = params => {
  return request.post(`${yxmGateway}/api/kdsp/coupon/pickup-code`, params, {
    reportDeviceId: true
  });
};
export const getCouponDesc = () => {
  return request.get(`${yxmGateway}/api/kdsp/coupon/getDescriptionOfExchangeCode`);
};
