/**
 * 工作台
 */

import http from '../http'

export default {
  // page
  page: data => http.post('meter/v1/subcontractor/page', data).then(res => res),
  getById: data => http.get('meter/v1/subcontractor/' + data).then(res => res),
  deleteById: data =>
    http.delete('meter/v1/subcontractor/?ids=' + data).then(res => res),
  // 保存
  save: data => http.post('meter/v1/subcontractor/', data).then(res => res),
  // 编辑
  edit: data =>
    http.put('meter/v1/subcontractor/' + data.id, data.obj).then(res => res)
}
