import {
  splicingParam,
  get,
  post,
  postform
} from '../utils/request'

// 增加模型
const addModel = (params) => {
  return postform(systemConfig.dataUrl + '/model/addModel', params)
}

// 删除模型
const delModel = (params) => {
  return post(systemConfig.dataUrl + '/model/deleteModel?' + splicingParam(params))
}

// 修改模型
const updateModel = (params) => {
  return postform(systemConfig.dataUrl + '/model/updateModel', params)
}

// 获取menu
const getMenu = () => {
  return get(systemConfig.dataUrl + '/general/getMenuData')
}

// 查询模型详细信息
const getDetailModelInfo = (params) => {
  return post(systemConfig.dataUrl + '/model/selectById?' + splicingParam(params))
}

// 获取点标注图片
const getMarkImage = () => {
  return post(systemConfig.markUrl + '/getMarkIcon')
}


export default {
  getMenu,
  addModel,
  delModel,
  updateModel,
  getDetailModelInfo,
  getMarkImage
}
