diff --git a/app/hdl/hdl_login.go b/app/hdl/hdl_login.go index 70b4db4..bd8b55b 100644 --- a/app/hdl/hdl_login.go +++ b/app/hdl/hdl_login.go @@ -131,11 +131,11 @@ func Register(c *gin.Context) { return } engine := db.DBs[svc.GetMasterId(c)] - //check, err := svc.SmsCheck(c, req.UserName, req.Captcha) - //if check == false { - // e.OutErr(c, 400, e.NewErr(400, err.Error())) - // return - //} + check, err := svc.SmsCheck(c, req.UserName, req.Captcha) + if check == false { + e.OutErr(c, 400, e.NewErr(400, err.Error())) + return + } now := time.Now() //1、判断当前账号是否已存在 mediumDb := implement.NewMediumDb(engine) @@ -221,11 +221,7 @@ func Register(c *gin.Context) { //5、判断是否为渠道代理邀请 if req.AgentId != "" { agentDb := implement.NewAgentDb(engine) - agent, err1 := agentDb.GetAgent(utils.StrToInt(req.AgentId)) - if err1 != nil { - e.OutErr(c, e.ERR_DB_ORM, err1.Error()) - return - } + agent := agentDb.GetSuperAdmin(utils.StrToInt(req.AgentId)) if agent != nil { //5.1 新增agent_with_medium记录 agentWithMediumDb := implement2.NewAgentWithMediumDb(engine)