26 lines
550 B
TypeScript
26 lines
550 B
TypeScript
import { pyRequestClient } from '#/api/request';
|
|
// system/dict.ts 或 system/dictDetail.ts
|
|
|
|
export namespace SystemDictApi {
|
|
export interface DictDetail {
|
|
id: string;
|
|
value: string;
|
|
label: string;
|
|
sort: number;
|
|
pid?: string | null;
|
|
remark?: string;
|
|
created_at?: string;
|
|
}
|
|
}
|
|
/**
|
|
* 根据字典 key 获取字典详情列表
|
|
*/
|
|
export async function getDictDetailList(key: string) {
|
|
return pyRequestClient.get<Array<SystemDictApi.DictDetail>>(
|
|
'/system/dict/getValue',
|
|
{
|
|
params: { key },
|
|
},
|
|
);
|
|
}
|