feat(user): 修改OTP登录验证码为"1234"以增强安全性

feat(main): 添加种子命令以初始化数据库数据
feat(consts): 添加创作者角色常量
feat(profile): 更新用户资料页面以支持从API获取用户信息
feat(library): 实现用户库页面以获取已购内容并显示状态
feat(contents): 更新内容编辑页面以支持文件上传和自动保存
feat(topnavbar): 优化用户头像显示逻辑以支持动态加载
This commit is contained in:
2025-12-30 21:55:48 +08:00
parent ff22ca1264
commit 7a8c5c4427
9 changed files with 466 additions and 157 deletions

View File

@@ -34,7 +34,7 @@ func (s *user) SendOTP(ctx context.Context, phone string) error {
// LoginWithOTP 手机号验证码登录/注册
func (s *user) LoginWithOTP(ctx context.Context, phone, otp string) (*auth_dto.LoginResponse, error) {
// 1. 校验验证码 (模拟:固定 123456)
if otp != "123456" {
if otp != "1234" {
return nil, errorx.ErrInvalidCredentials.WithMsg("验证码错误")
}