feat:完善信息

This commit is contained in:
henry
2021-10-12 16:53:49 +08:00
parent cf3bc8ffb4
commit eccd71809d
14 changed files with 88 additions and 69 deletions

View File

@ -33,10 +33,12 @@ func (c *RegisterParams) checkUserExist(mUserInstance *model2.UserInstance) (boo
}
return count > 0, nil
}
func (c *RegisterParams) checkCaptcha() (bool, error) {
return handle.NewCaptcha().Validate(&handle.CaptchaSms{Captcha: c.Captcha, Mobile: c.Mobile})
}
// Launch 发起注册
func (c *Register) Launch(params *RegisterParams) (*InstanceLoginReturn, error) {
if params.checkPassword() {
return nil, errors.New("两次密码不一致")