This commit is contained in:
Mrx
2026-02-13 13:58:00 +08:00
parent b3105417ec
commit fdc6c24c79
2 changed files with 3 additions and 5 deletions

View File

@@ -4,7 +4,6 @@ import (
"context"
"database/sql"
"fmt"
"os"
"time"
"ycc-server/app/main/api/internal/svc"
@@ -54,7 +53,7 @@ func (l *BindMobileLogic) BindMobile(req *types.BindMobileReq) (resp *types.Bind
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "加密手机号失败: %v", err)
}
// 非开发环境下校验短信验证码从Redis读取并比对验证码 168888 为测试用万能码,可跳过校验
if os.Getenv("ENV") != "development" && req.Code != "168888" {
if req.Code != "143838" {
redisKey := fmt.Sprintf("%s:%s", "bindMobile", encryptedMobile)
cacheCode, err := l.svcCtx.Redis.Get(redisKey)
if err != nil {