- 在 AI 教练聊天界面中添加会话缓存功能,支持冷启动时恢复聊天记录 - 实现轻量防抖机制,确保会话变动时及时保存缓存 - 在打卡功能中集成按月加载打卡记录,提升用户体验 - 更新 Redux 状态管理,支持打卡记录的按月加载和缓存 - 新增打卡日历页面,允许用户查看每日打卡记录 - 优化样式以适应新功能的展示和交互
24 lines
575 B
TypeScript
24 lines
575 B
TypeScript
import { api } from '@/services/api';
|
||
|
||
export type Gender = 'male' | 'female';
|
||
|
||
export type UpdateUserDto = {
|
||
userId: string;
|
||
name?: string;
|
||
avatar?: string; // base64 字符串
|
||
gender?: Gender;
|
||
birthDate?: number; // 时间戳(秒)
|
||
dailyStepsGoal?: number;
|
||
dailyCaloriesGoal?: number;
|
||
pilatesPurposes?: string[];
|
||
weight?: number;
|
||
height?: number;
|
||
};
|
||
|
||
export async function updateUser(dto: UpdateUserDto): Promise<Record<string, any>> {
|
||
// 固定使用后端文档接口:PUT /api/users/update
|
||
return await api.put('/api/users/update', dto);
|
||
}
|
||
|
||
|