Newer
Older
h2sFront / src / api / system / dict.js
StephanieGitHub on 12 Aug 2021 767 bytes MOD: vue-cli2代码迁移
/**
 * 字典接口
 */
import request from '@/utils/request'
// 字典查询
export function getDictList(params) {
  return request({
    url: 'dict/listPage',
    method: 'get',
    params
  })
}

// 添加字典
export function addDict(params) {
  return request({
    url: 'dict/add',
    method: 'post',
    params
  })
}
// 修改字典机构
export function updateDict(params) {
  return request({
    url: 'dict/update',
    method: 'post',
    params
  })
}
// 删除字典机构
export function delDict(id) {
  return request({
    url: 'dict/delete',
    method: 'post',
    params: {
      dictId: id
    }
  })
}
// 获取字典值列表
export function getDictByCode(params) {
  return request({
    url: 'dict/code/' + params,
    method: 'get'
  })
}