import request from '@/utils/request'
import qs from 'qs'

const PushApi = {
  getList: function getList(params) {
    return request({
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
      },
      url: '/push/log/list',
      method: 'post',
      data: qs.stringify(params)
    })
  },
  del: function del(params) {
    return request({
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
      },
      url: '/push/log/delete',
      method: 'post',
      data: qs.stringify(params)
    })
  },
  download: function download(params) {
    console.log(params)
    return request({
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
      },
      url: '/push/log/download',
      responseType: 'blob',
      method: 'post',
      data: qs.stringify(params)
    })
  },
  deleteIds: function(params) {
    return request({
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
      },
      url: '/push/log/delete/ids',
      method: 'post',
      data: qs.stringify(params)
    })
  }
}
export default PushApi

