盲改通知中心与下载中心的左侧菜单字典

This commit is contained in:
linxd
2025-07-03 11:29:53 +08:00
parent 1f753cce50
commit 1642b5ad81
3 changed files with 83 additions and 24 deletions

45
src/servers/api/dict.ts Normal file
View File

@ -0,0 +1,45 @@
import request from '@/utils/request';
// 定义接口返回数据类型
export type DictResponse = {
code: number;
data: DictItem[];
message: string;
success: boolean;
[property: string]: any;
}
export type DictItem = {
basePageRequest: null;
code: string;
createBy: null;
createDate: null;
defaultFlag: null;
deleteFlag: null;
description: string;
dicName: string;
dictTypeCode: null | string;
dictTypeName: null | string;
id: string;
lastUpdateTime: null;
orderFlag: string;
parentCode: string;
parentType: string;
tenantId: null;
tenantName: null;
updateBy: null;
updateDate: null;
useFlag: string;
[property: string]: any;
}
/**
* 获取字典列表
* @param code 字典编码
* @returns 字典列表
*/
export async function getDictList(code: string): Promise<DictResponse> {
return request(`/cosco/dictProject/getAllList/${code}`, {
method: 'GET',
});
}