// types/api.d.ts // import { ApiResponse } from './request'; /** * 登录接口 - 请求参数类型 */ export interface LoginRequest { code: string; // 小程序登录码(wx.login获取) phone?: string; // 可选:手机号(若需要手机号登录) } /** * 登录接口 - 返回数据类型 */ export interface LoginResponse { token: string; userId: string; userName: string; expires: number; } /** * 获取用户信息接口 - 返回数据类型 */ export interface UserInfoResponse { id: string; name: string; avatar: string; phone: string; }