/**
 * 工作台
 */

import http from '../http'
import { https } from '../https'

export default {
  // page
  page: data => http.post('meter/v1/aptitude_item/page', data).then(res => res),
  getById: data => http.get('meter/v1/aptitude/' + data).then(res => res),
  // 删除
  deleteById: data =>
    http.delete('meter/v1/aptitude/?ids=' + data).then(res => res),
  deleteItemById: data =>
    http.delete('meter/v1/aptitude_item/?ids=' + data).then(res => res),
  // 保存
  save: data =>
    https
      .post('meter/v1/aptitude/add_aptitude', JSON.stringify(data))
      .then(res => res),
  // 编辑
  edit: data =>
    http.put('meter/v1/aptitude/' + data.id, data.obj).then(res => res)
}
