c.JSON(http.StatusOK,gin.H{"errCode":constant.SmsSendCodeErr,"errMsg":"Enter the superCode directly in the verification code box, SuperCode can be configured in config.xml"})
c.JSON(http.StatusOK,gin.H{"errCode":constant.IntentionalError,"errMsg":"Enter the superCode directly in the verification code box, SuperCode can be configured in config.xml"})
c.JSON(http.StatusOK,gin.H{"errCode":constant.SmsSendCodeErr,"errMsg":"Enter the superCode directly in the verification code box, SuperCode can be configured in config.xml"})
c.JSON(http.StatusOK,gin.H{"errCode":constant.IntentionalError,"errMsg":"Enter the superCode directly in the verification code box, SuperCode can be configured in config.xml"})
c.JSON(http.StatusOK,gin.H{"errCode":constant.SmsSendCodeErr,"errMsg":"Enter the superCode directly in the verification code box, SuperCode can be configured in config.xml"})
c.JSON(http.StatusOK,gin.H{"errCode":constant.IntentionalError,"errMsg":"Enter the superCode directly in the verification code box, SuperCode can be configured in config.xml"})
c.JSON(http.StatusOK,gin.H{"errCode":constant.SmsSendCodeErr,"errMsg":"Enter the superCode directly in the verification code box, SuperCode can be configured in config.xml"})
return
}
}
log.InfoByKv("begin store redis",account)
v,err:=redis.Int(db.DB.Exec("TTL",account))
iferr!=nil{
log.ErrorByKv("get account from redis error",account,"err",err.Error())
c.JSON(http.StatusOK,gin.H{"errCode":constant.IntentionalError,"errMsg":"Enter the superCode directly in the verification code box, SuperCode can be configured in config.xml"})
c.JSON(http.StatusOK,gin.H{"errCode":constant.IntentionalError,"errMsg":"Enter the superCode directly in the verification code box, SuperCode can be configured in config.xml"})
return
}
data:=make(map[string]interface{})
data["account"]=account
c.JSON(http.StatusOK,gin.H{"errCode":constant.NoError,"errMsg":"Verification code sent successfully!","data":data})
log.InfoByKv("send new verification code",account)
c.JSON(http.StatusOK,gin.H{"errCode":constant.IntentionalError,"errMsg":"Enterthe superCode directly in the verification code box, SuperCode can be configured in config.xml"})
return
}
data:=make(map[string]interface{})
data["account"]=account
c.JSON(http.StatusOK,gin.H{"errCode":constant.NoError,"errMsg":"Verification code has been reset!","data":data})
log.InfoByKv("Reset verification code",account)
return
}
data:=make(map[string]interface{})
data["account"]=account
c.JSON(http.StatusOK,gin.H{"errCode":constant.NoError,"errMsg":"Verification code has been set!","data":data})