【issues/777】分类字典翻译不显示问题兼容处理
parent
a0e8627a6f
commit
61cb2dd1f6
|
@ -1,5 +1,7 @@
|
||||||
import { defHttp } from '/@/utils/http/axios';
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
import { getAuthCache } from '/@/utils/auth';
|
||||||
|
import { DB_DICT_DATA_KEY } from '/@/enums/cacheEnum';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从缓存中获取字典配置
|
* 从缓存中获取字典配置
|
||||||
|
@ -12,6 +14,13 @@ export const getDictItemsByCode = (code) => {
|
||||||
if (typeof dictItems === 'object' && dictItems[code]) {
|
if (typeof dictItems === 'object' && dictItems[code]) {
|
||||||
return dictItems[code];
|
return dictItems[code];
|
||||||
}
|
}
|
||||||
|
//update-begin-author:liusq---date:2023-10-13--for: 【issues/777】列表 分类字典不显示
|
||||||
|
//兼容以前的旧写法
|
||||||
|
if (getAuthCache(DB_DICT_DATA_KEY) && getAuthCache(DB_DICT_DATA_KEY)[code]) {
|
||||||
|
return getAuthCache(DB_DICT_DATA_KEY)[code];
|
||||||
|
}
|
||||||
|
//update-end-author:liusq---date:2023-10-13--for:【issues/777】列表 分类字典不显示
|
||||||
|
|
||||||
// update-end--author:liaozhiyang---date:20230908---for:【QQYUN-6417】生产环境字典慢的问题
|
// update-end--author:liaozhiyang---date:20230908---for:【QQYUN-6417】生产环境字典慢的问题
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue