/**
 * 工作台
 */

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

export default {
  // page
  page: data => http.post('meter/v1/aptitude/page', data).then(res => res),
  pageBeyond: data =>
    http.post('meter/v1/aptitude/page_beyond', 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),
  // 保存
  save: data =>
    https
      .post('meter/v1/aptitude/add_aptitude', JSON.stringify(data))
      .then(res => res),
  // 保存
  saveBeyond: data =>
    https
      .post('meter/v1/aptitude/add_beyond_aptitude', JSON.stringify(data))
      .then(res => res),
  // 编辑
  edit: data =>
    http.put('meter/v1/aptitude/' + data.id, data.obj).then(res => res)
}
