import micro_request from '@/utils/micro_request'

const basePath = process.env.VUE_APP_AdminPath
export default {
  // 字典类型
  getDictTypeList(query) {
    return micro_request.postRequest(basePath, 'Dict', 'GetDictTypeList', query)
  },
  getDictTypeEntity(query) {
    return micro_request.postRequest(
      basePath,
      'Dict',
      'GetDictTypeEntity',
      query
    )
  },
  createDictType(query) {
    return micro_request.postRequest(basePath, 'Dict', 'CreateDictType', query)
  },
  updateDictType(query) {
    return micro_request.postRequest(basePath, 'Dict', 'UpdateDictType', query)
  },
  deleteDictTypeByIds(query) {
    return micro_request.postRequest(
      basePath,
      'Dict',
      'DeleteDictTypeByIds',
      query
    )
  },

  // 字典明细
  getDictDataList(query) {
    return micro_request.postRequest(basePath, 'Dict', 'GetDictDataList', query)
  },
  createDictData(query) {
    return micro_request.postRequest(basePath, 'Dict', 'CreateDictData', query)
  },
  updateDictData(query) {
    return micro_request.postRequest(basePath, 'Dict', 'UpdateDictData', query)
  },
  deleteDictDataByIds(query) {
    return micro_request.postRequest(
      basePath,
      'Dict',
      'DeleteDictDataByIds',
      query
    )
  },
}
