f
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"tydata-server/pkg/lzkit/crypto"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
@@ -44,7 +45,14 @@ 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" {
|
||||
// 开发环境固定验证码为138888
|
||||
env := os.Getenv("ENV")
|
||||
if env == "development" {
|
||||
if req.Code != "138888" {
|
||||
return nil, errors.Wrapf(xerr.NewErrMsg("验证码不正确"), "开发环境验证码应为138888")
|
||||
}
|
||||
logx.Infof("开发环境:验证码验证通过 %s", req.Mobile)
|
||||
} else if req.Mobile != "18889793585" {
|
||||
// 校验验证码
|
||||
redisKey := fmt.Sprintf("%s:%s", "agentApply", encryptedMobile)
|
||||
cacheCode, err := l.svcCtx.Redis.Get(redisKey)
|
||||
|
||||
Reference in New Issue
Block a user