盲改通知中心与下载中心的左侧菜单字典
This commit is contained in:
45
src/servers/api/dict.ts
Normal file
45
src/servers/api/dict.ts
Normal 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',
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user