This commit is contained in:
Mrx
2026-01-30 11:39:28 +08:00
parent c64b22ab05
commit 76784c3c1b
19 changed files with 717 additions and 46 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"database/sql"
"fmt"
"os"
"time"
"tyc-server/app/main/model"
"tyc-server/common/ctxdata"
@@ -44,8 +45,8 @@ func (l *ApplyForAgentLogic) ApplyForAgent(req *types.AgentApplyReq) (resp *type
if err != nil {
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "加密手机号失败: %v", err)
}
if req.Mobile != "18889793585" {
// 校验验证码
// 开发环境可跳过验证码校验
if os.Getenv("ENV") != "development" {
redisKey := fmt.Sprintf("%s:%s", "agentApply", encryptedMobile)
cacheCode, err := l.svcCtx.Redis.Get(redisKey)
if err != nil {