优化多个字典数据查询
This commit is contained in:
@@ -19,19 +19,18 @@ export function getData(dictCode) {
|
||||
|
||||
// 根据字典类型查询字典数据信息
|
||||
export function getDicts(dictType) {
|
||||
return request({
|
||||
url: '/system/dict/data/type/' + dictType,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据多个字典类型查询字典数据信息
|
||||
export function getMoreDicts(dictType) {
|
||||
return request({
|
||||
url: '/system/dict/data/types',
|
||||
data: dictType ,
|
||||
method: 'post'
|
||||
})
|
||||
if (typeof (dictType) === "object") {
|
||||
return request({
|
||||
url: '/system/dict/data/types',
|
||||
data: dictType,
|
||||
method: 'post'
|
||||
})
|
||||
} else {
|
||||
return request({
|
||||
url: '/system/dict/data/type/' + dictType,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 新增字典数据
|
||||
|
||||
Reference in New Issue
Block a user