import request from '@/utils/request'
import Qs from 'qs'

export function listSysDictData(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.dict',
      _mt: 'list',
      ...query
    }
  })
}

export function createSysDictData(data) {
  return request({
    method: 'post',
    data: Qs.stringify({
      _gp: 'admin.dict',
      _mt: 'create',
      ...data
    })
  })
}

export function updateSysDictData(data) {
  return request({
    method: 'post',
    data: Qs.stringify({
      _gp: 'admin.dict',
      _mt: 'edit',
      ...data
    })
  })
}

export function deleteSysDictData(id) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.dict',
      _mt: 'delete',
      id: id
    }
  })
}
