import { api } from './request' export interface LoginResp { bound: boolean openid: string token?: { access_token: string refresh_token: string expires_in: number user: { id: string; username: string; display_name?: string; phone?: string; avatar_url?: string } } } export interface PatientInfo { id: string name: string gender?: string birth_date?: string relation: string } export async function wechatLogin(code: string): Promise { return api.post('/auth/wechat/login', { code }) } export async function wechatBindPhone(openid: string, encryptedData: string, iv: string) { return api.post('/auth/wechat/bind-phone', { openid, encrypted_data: encryptedData, iv, }) } export async function getPatients() { return api.get('/health/patients') }