import request from '@/utils/request'

export function addDict(data) {
  return request({
    url: '/cms/dict',
    method: 'post',
    data
  })
}
export function listDict(data) {
  return request({
    url: '/cms/dictType/list',
    method: 'post',
    data
  })
}
export function updateDict(data) {
  return request({
    url: '/cms/dictType/update',
    method: 'post',
    data
  })
}
export function removeDict(params) {
  return request({
    url: '/cms/dict',
    method: 'delete',
    params
  })
}

export function addDictLabel(data) {
  return request({
    url: '/cms/dict/pushDictLabel',
    method: 'post',
    data
  })
}
export function listDictLabel(data) {
  return request({
    url: '/cms/dict/listDictLabel',
    method: 'post',
    data
  })
}
export function updateDictLabel(data) {
  return request({
    url: '/cms/dict/updateDictLabel',
    method: 'put',
    data
  })
}
export function removeDictLabel(params) {
  return request({
    url: '/cms/dict/deleteDictLabel',
    method: 'delete',
    params
  })
}
export function cleanCache() {
  return request({
    url: '/cms/dict/cleanAppDictLabelCache',
    method: 'get'
  })
}
