import { http } from "@/http/http"; import type { ApiResult } from '@/api'; import type { CurrentUserResponseData } from './types'; /** 获取当前登录用户详情 */ export async function getCurrentUserApi() { const res: any = await http.get>("users/me"); if (res.data.state === 'ok') { return res.data.data; } return Promise.reject(new Error(res.data.message)); }