fix: 字典解析优化

property-only-app
wx-jincw 2 months ago
parent 363eb383d7
commit 300d75bc42

@ -233,13 +233,6 @@ export function getQrcode(data) {
* @param array types 字典类型数组
*/
export function sysdicttypeTypesApi(types) {
return request.post('system/dict/types', { types }, { useAdminUrl: true });
return request.post('autogencode/sysdictdata/types', types, { useAdminUrl: true });
}
/**
* 获取单个字典数据
* @param string type 字典类型
*/
export function getDict(type) {
return request.get(`system/dict/${type}`, {}, { useAdminUrl: true });
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -17,6 +17,7 @@ const mutations = {
}
// 同时更新dictData对象方便快速查找
state.dictData[key] = value;
state.dictData = { ...state.dictData };
}
},
REMOVE_DICT: (state, key) => {
@ -76,7 +77,7 @@ const actions = {
// 处理返回的数据
const fetchedDicts = {};
(res || []).forEach(item => {
(res.data || []).forEach(item => {
if (fetchedDicts[item.dictType]) {
fetchedDicts[item.dictType].push(item);
} else {

@ -3,7 +3,6 @@
* 用于在组件中方便地使用字典数据
*/
import store from '../store';
import { getDict, sysdicttypeTypesApi } from '../api/api';
class Dict {
constructor() {

Loading…
Cancel
Save