import { request } from './http'; import { resourceApi } from './resource'; /** 平台角色、菜单、账号和工作台接口。 */ export type PlatformRole = { identity: string; role_code: string; name: string; data_scope: string; is_system: boolean; status: string }; export type PlatformMenu = { id: number; identity: string; parent_id: number; menu_code: string; name: string; icon: string; path: string; sort_no: number }; export const platformApi = { overview: () => request>('/dashboard/overview'), listAccount: () => request<{ total: number; list: Record[] }>('/platform/platfrom_account'), listRole: () => resourceApi.list('/platform/platform_role'), createRole: (data: Record) => resourceApi.create('/platform/platform_role', data), listMenu: () => request<{ total: number; list: PlatformMenu[] }>('/platform/platform_menu'), };