feat:支持身体围度数据展示

This commit is contained in:
richarjiang
2025-09-22 10:58:23 +08:00
parent dbe460a084
commit d082c66b72
11 changed files with 581 additions and 69 deletions

View File

@@ -15,6 +15,12 @@ export type UpdateUserDto = {
activityLevel?: number; // 活动水平 1-4
initialWeight?: number; // 初始体重
targetWeight?: number; // 目标体重
chestCircumference?: number; // 胸围
waistCircumference?: number; // 腰围
upperHipCircumference?: number; // 上臀围
armCircumference?: number; // 臂围
thighCircumference?: number; // 大腿围
calfCircumference?: number; // 小腿围
};
export async function updateUser(dto: UpdateUserDto): Promise<Record<string, any>> {
@@ -28,4 +34,20 @@ export async function uploadImage(formData: FormData): Promise<{ fileKey: string
});
}
export type BodyMeasurementsDto = {
chestCircumference?: number; // 胸围
waistCircumference?: number; // 腰围
upperHipCircumference?: number; // 上臀围
armCircumference?: number; // 臂围
thighCircumference?: number; // 大腿围
calfCircumference?: number; // 小腿围
};
export async function updateBodyMeasurements(dto: BodyMeasurementsDto): Promise<{
code: number;
message: string;
}> {
return await api.put('/users/body-measurements', dto);
}