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

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

