牧安云哨-前端
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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 },
|
||||
},
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user