perf: 首页新增修改密码提示

This commit is contained in:
xiaojunnuo
2024-11-30 22:35:26 +08:00
parent 61d6b06c56
commit 0772d3b3fd
10 changed files with 162 additions and 92 deletions
@@ -16,6 +16,11 @@ export class MineController extends BaseController {
public async info() {
const userId = this.getUserId();
const user = await this.userService.info(userId);
const isWeak = await this.userService.checkPassword('123456', user.password, user.passwordVersion);
if (isWeak) {
//@ts-ignore
user.isWeak = true;
}
user.roleIds = await this.roleService.getRoleIdsByUserId(userId);
delete user.password;
return this.ok(user);