Browse Source

更新

master
huangjiajun 1 month ago
parent
commit
2a75ec96ca
1 changed files with 6 additions and 10 deletions
  1. +6
    -10
      app/hdl/hdl_login.go

+ 6
- 10
app/hdl/hdl_login.go View File

@@ -131,11 +131,11 @@ func Register(c *gin.Context) {
return return
} }
engine := db.DBs[svc.GetMasterId(c)] 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() now := time.Now()
//1、判断当前账号是否已存在 //1、判断当前账号是否已存在
mediumDb := implement.NewMediumDb(engine) mediumDb := implement.NewMediumDb(engine)
@@ -221,11 +221,7 @@ func Register(c *gin.Context) {
//5、判断是否为渠道代理邀请 //5、判断是否为渠道代理邀请
if req.AgentId != "" { if req.AgentId != "" {
agentDb := implement.NewAgentDb(engine) 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 { if agent != nil {
//5.1 新增agent_with_medium记录 //5.1 新增agent_with_medium记录
agentWithMediumDb := implement2.NewAgentWithMediumDb(engine) agentWithMediumDb := implement2.NewAgentWithMediumDb(engine)


Loading…
Cancel
Save