This commit is contained in:
suyl
2021-07-15 13:56:00 +08:00
parent 25fea4d861
commit 71419171c8

View File

@@ -4,6 +4,7 @@ import (
"bytes"
"encoding/base64"
"errors"
"fmt"
"regexp"
"strings"
"time"
@@ -212,6 +213,9 @@ func SendVerifyCode(authToken, captchaID, captchaValue, authID string) (verfifyC
if handler := authers[authType]; handler == nil {
err = ErrIllegalAuthType
} else {
if user, _ := dao.GetUserByID(dao.GetDB(), "mobile", authID); user != nil {
return "", authInfo, fmt.Errorf("该用户已存在,请勿重复注册!")
}
verfifyCode, err = handler.SendVerifyCode(authID)
}
}