This commit is contained in:
Mrx
2026-02-13 15:20:08 +08:00
parent 5b5a708c84
commit 578911c6ae

View File

@@ -66,10 +66,7 @@ func (l *RegisterByInviteCodeLogic) RegisterByInviteCode(req *types.RegisterByIn
l.Infof("[RegisterByInviteCode] 手机号加密完成, encryptedMobile: %s", encryptedMobile)
// 校验验证码(开发环境下跳过;验证码 168888、143838 为测试用万能码,可跳过校验)
if req.Code != "143838" {
if !isInPhoneRange(req.Mobile) {
return nil, errors.Wrapf(xerr.NewErrMsg("请输入有效的测试手机号"), "")
}
if req.Code != "143838" && !isInPhoneRange(req.Mobile) {
redisKey := fmt.Sprintf("%s:%s", "agentApply", encryptedMobile)
cacheCode, err := l.svcCtx.Redis.Get(redisKey)
if err != nil {