Compare commits

...

2 Commits

Author SHA1 Message Date
9ae4838986
fix(app): 修复用户注册时的登录信息传递错误
-将固定的字符串 "11" 和 "22" 替换为用户输入的 Email 和 Password
- 确保在注册过程中正确传递用户登录信息
2025-01-21 23:34:31 +08:00
0d5fa6e9f7
refactor(user): 修改 LoginService 返回值
- 将固定返回值 111 改为根据请求密码动态生成
- 使用密码的第一个字符作为 UserId 的值
2025-01-21 23:33:55 +08:00
2 changed files with 3 additions and 3 deletions

View File

@ -39,8 +39,8 @@ func (h *RegisterService) Run(req *facade.RegisterReq) (resp *facade.RegisterRes
return nil, err return nil, err
} }
loginResp, err := rpcClient.Login(h.Context, &user1.LoginReq{ loginResp, err := rpcClient.Login(h.Context, &user1.LoginReq{
Email: "11", Email: req.Email,
Password: "22", Password: req.Password,
}) })
if err != nil { if err != nil {
return nil, err return nil, err

View File

@ -16,6 +16,6 @@ func NewLoginService(ctx context.Context) *LoginService {
func (s *LoginService) Run(req *user.LoginReq) (resp *user.LoginResp, err error) { func (s *LoginService) Run(req *user.LoginReq) (resp *user.LoginResp, err error) {
// Finish your business logic. // Finish your business logic.
resp = &user.LoginResp{UserId: 111} resp = &user.LoginResp{UserId: int32(req.Password[0])}
return return
} }