perf: 添加用户资料编辑功能

- 新增用户资料编辑对话框组件
- 添加后端更新用户资料接口
- 在用户信息页面添加编辑按钮
- 新增中英文翻译字段
- 实现头像上传和昵称修改功能
This commit is contained in:
xiaojunnuo
2025-07-01 16:30:07 +08:00
parent c1bccb970f
commit 7c0f43c8a3
9 changed files with 161 additions and 4 deletions

View File

@@ -32,4 +32,15 @@ export class MineController extends BaseController {
await this.userService.changePassword(userId, body);
return this.ok({});
}
@Post('/updateProfile', { summary: Constants.per.authOnly })
public async updateProfile(@Body(ALL) body: any) {
const userId = this.getUserId();
await this.userService.updateProfile(userId, {
avatar: body.avatar,
nickName: body.nickName,
});
return this.ok({});
}
}