import { request } from 'umi';
import type { CurrentUser, ListItemDataType } from './data.d';

export async function queryCurrent(): Promise<{ data: CurrentUser }> {
  return request('/api/currentUserDetail');
}

export async function queryFakeList(params: {
  count: number;
}): Promise<{ data: { list: ListItemDataType[] } }> {
  return request('/api/fake_list_Detail', {
    params,
  });
}

/** 查询用户信息 */
export async function queryUserInfo(params: {
  person_id: number;
  identity_id: number;
  u_type: number;
}): Promise<{ data: any }> {
  return request('/dsideal_yy/ypt/userinfo/getUserInfo', {
    params,
  });
}