import axios from '../http'

export default {
  /**
   * 抢红包
   */
  grabPacket (params) {
    return axios.request({
      url: 'redpack/grab',
      method: 'get',
      needLogin: true,
      params
    })
  },
  /**
   * 红包详情
   */
  grabDetail (params) {
    return axios.request({
      url: 'redpack/detail',
      method: 'get',
      needLogin: true,
      params
    })
  },
  /**
   * 发送的红包
   */
  sendList (params) {
    return axios.request({
      url: 'redpack/sendList',
      method: 'get',
      needLogin: true,
      params
    })
  },
  /**
   * 收到的红包
   */
  receiveList (params) {
    return axios.request({
      url: 'redpack/receiveList',
      method: 'get',
      needLogin: true,
      params
    })
  }
}
