Documentation
¶
Index ¶
- Constants
- func CheckCaptcha(ctx *ginplus.ContextPlus, captchaID, captchaValue string, client string)
- func CheckSmsCode(bizType, tel string, reqCode string) (ok bool, reason string)
- func CheckTelSmsCode(ctx *ginplus.ContextPlus, bizType, tel, code string) (ok bool)
- func GenerateCode(bizType string, length int) string
- func LoginInternal(ctx *ginplus.ContextPlus, userInfo *dao.UserInfo)
- func SendSmsCode(bizType, tel, code string) (ok bool, reason string)
Constants ¶
View Source
const ( TokenNone = 0 //不验证Token TokenUser = 1 //验证客户端登录Token TokenAdmin = 2 //管理后台使用配置的超级Token. UserSexUnknown = int16(0) UserSexMale = int16(1) UserSexFemale = int16(2) UserSexOtherwise = int16(3) // normal user UserTypeNormal = int32(1) // 账号正常. UserStatusOK = int16(1) // 账号被禁用/锁定 UserStatusDisabled = int16(-1) )
Variables ¶
This section is empty.
Functions ¶
func CheckCaptcha ¶
func CheckCaptcha(ctx *ginplus.ContextPlus, captchaID, captchaValue string, client string)
CheckCaptcha 校验Captcha
func CheckSmsCode ¶
CheckSmsCode 检查短信.
func CheckTelSmsCode ¶
func CheckTelSmsCode(ctx *ginplus.ContextPlus, bizType, tel, code string) (ok bool)
func LoginInternal ¶
func LoginInternal(ctx *ginplus.ContextPlus, userInfo *dao.UserInfo)
func SendSmsCode ¶
SendSmsCode 发送短信,并保存到redis.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.