import request from '@/sheep/request';

const RewardApi = {
  // 获得礼物列表
  getGiftList: () => {
    return request({
      url: '/worker/gift/getList',
      method: 'GET',
  	  custom: {
  	    auth: true,
  	    showLoading: false,
  	  },
    });
  },
  // 获得打赏礼物列表
  getRewardGiftList: (params) => {
    return request({
      url: '/worker/reward/getGiftList',
      method: 'GET',
	  params: params,
  	  custom: {
  	    auth: false,
  	    showLoading: false,
  	  },
    });
  },
  // 获得礼物列表
  getTopList: () => {
    return request({
      url: '/worker/reward/getTopList',
      method: 'GET',
  	  custom: {
  	    auth: false,
  	    showLoading: false,
  	  },
    });
  },
  // 创建打赏订单
  createRewardOrder: (data) => {
    return request({
      url: `/worker/reward/createOrder`,
      method: 'POST',
      data,
    });
  },
  // 获得打赏分页
  getRewardPage: (params) => {
    return request({
      url: '/worker/reward/page',
      method: 'GET',
      params,
      custom: {
        auth: true,
        showLoading: false,
      },
    });
  },
};

export default RewardApi;
