feat: 新增体重记录功能,优化用户资料更新及图片组件缓存

This commit is contained in:
richarjiang
2025-08-27 19:18:54 +08:00
parent aaa462d476
commit ba2d829e02
10 changed files with 767 additions and 32 deletions

View File

@@ -3,7 +3,6 @@ import { api } from '@/services/api';
export type Gender = 'male' | 'female';
export type UpdateUserDto = {
userId: string;
name?: string;
avatar?: string; // base64 字符串
gender?: Gender;
@@ -14,6 +13,8 @@ export type UpdateUserDto = {
weight?: number;
height?: number;
activityLevel?: number; // 活动水平 1-4
initialWeight?: number; // 初始体重
targetWeight?: number; // 目标体重
};
export async function updateUser(dto: UpdateUserDto): Promise<Record<string, any>> {