From ed52ecb259cd3e8e553d95863b1003d163f227f3 Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Fri, 1 Jul 2022 15:29:45 +0800 Subject: [PATCH] fix bug --- internal/demo/register/verify.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/demo/register/verify.go b/internal/demo/register/verify.go index ebce69908..7777e6ec7 100644 --- a/internal/demo/register/verify.go +++ b/internal/demo/register/verify.go @@ -37,7 +37,7 @@ func Verify(c *gin.Context) { if params.Email != "" { account = params.Email } else { - account = params.PhoneNumber + account = params.AreaCode + params.PhoneNumber } if params.VerificationCode == config.Config.Demo.SuperCode { @@ -56,9 +56,9 @@ func Verify(c *gin.Context) { var accountKey string switch params.UsedFor { case constant.VerificationCodeForRegister: - accountKey = params.AreaCode + account + "_" + constant.VerificationCodeForRegisterSuffix + accountKey = account + "_" + constant.VerificationCodeForRegisterSuffix case constant.VerificationCodeForReset: - accountKey = params.AreaCode + account + "_" + constant.VerificationCodeForResetSuffix + accountKey = account + "_" + constant.VerificationCodeForResetSuffix } code, err := db.DB.GetAccountCode(accountKey)