feat(menu): 重构菜单模块,添加路由显示、标题和参数字段

refactor(auth): 简化注册和忘记密码表单,移除手机号等冗余字段

fix(layout): 移除冗余的div包裹层,优化路由视图渲染

chore(deps): 更新后端依赖,添加click并调整typer版本

style(config): 清理注释并优化环境变量类型定义

docs(main): 修正注释拼写错误并移除无用注释

perf(menu): 更新菜单模型和类型定义,添加新字段支持

test(menu): 更新菜单初始化数据,补充新增字段值
This commit is contained in:
zhangtao
2025-06-29 22:17:06 +08:00
parent ec4338deca
commit 4150a39713
16 changed files with 1040 additions and 653 deletions
@@ -247,8 +247,7 @@ class UserService:
"""用户注册"""
# 检查用户名是否存在
username_ok = await UserCRUD(auth).get_by_username_crud(username=data.username)
mobile_ok = await UserCRUD(auth).get_by_mobile_crud(mobile=data.mobile)
if username_ok or mobile_ok:
if username_ok:
raise CustomException(msg='账号已存在')
data.password = PwdUtil.set_password_hash(password=data.password)
@@ -271,8 +270,6 @@ class UserService:
raise CustomException(msg="用户不存在")
if not user.available:
raise CustomException(msg="用户已停用")
if user.mobile != data.mobile:
raise CustomException(msg="手机号不匹配")
new_password_hash = PwdUtil.set_password_hash(password=data.new_password)
new_user = await UserCRUD(auth).forget_password_crud(id=user.id, password_hash=new_password_hash)
return UserOutSchema.model_validate(new_user).model_dump()