pull/241/head
wangchuxiao 2 years ago
parent 53b0d13342
commit 7823306045

@ -110,7 +110,7 @@ func SendVerificationCode(c *gin.Context) {
// TemplateCode: tea.String(config.Config.Demo.AliSMSVerify.VerificationCodeTemplateCode),
// TemplateParam: tea.String(fmt.Sprintf("{\"code\":\"%d\"}", code)),
//}
response, err := sms.SendSms(code, accountKey)
response, err := sms.SendSms(code, params.AreaCode+params.PhoneNumber)
//response, err := client.SendSms(sendSmsRequest)
if err != nil {
log.NewError(params.OperationID, "sendSms error", account, "err", err.Error(), response)

@ -47,7 +47,7 @@ func SetPassword(c *gin.Context) {
params.Nickname = account
}
if params.VerificationCode != config.Config.Demo.SuperCode {
accountKey := account + "_" + constant.VerificationCodeForRegisterSuffix
accountKey := params.AreaCode + account + "_" + constant.VerificationCodeForRegisterSuffix
v, err := db.DB.GetAccountCode(accountKey)
if err != nil || v != params.VerificationCode {
log.NewError(params.OperationID, "password Verification code error", account, params.VerificationCode)

@ -51,9 +51,9 @@ func Verify(c *gin.Context) {
var accountKey string
switch params.UsedFor {
case constant.VerificationCodeForRegister:
accountKey = account + "_" + constant.VerificationCodeForRegisterSuffix
accountKey = params.AreaCode + account + "_" + constant.VerificationCodeForRegisterSuffix
case constant.VerificationCodeForReset:
accountKey = account + "_" + constant.VerificationCodeForResetSuffix
accountKey = params.AreaCode + account + "_" + constant.VerificationCodeForResetSuffix
}
code, err := db.DB.GetAccountCode(accountKey)

Loading…
Cancel
Save