This commit is contained in:
Mrx
2026-02-28 12:18:25 +08:00
parent b3429bad76
commit d630d84718
3 changed files with 34 additions and 7 deletions

View File

@@ -36,10 +36,10 @@ func NewSendSmsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SendSmsLo
}
func (l *SendSmsLogic) SendSms(req *types.SendSmsReq) error {
// 1. 阿里云滑块验证码校验(防盗刷)
// 1. 阿里云滑块验证码校验(防盗刷);微信环境会跳过
cfg := l.svcCtx.Config.Captcha
if cfg.SceneID != "" {
if err := captcha.Verify(captcha.Config{
if err := captcha.Verify(l.ctx, captcha.Config{
AccessKeyID: cfg.AccessKeyID,
AccessKeySecret: cfg.AccessKeySecret,
EndpointURL: cfg.EndpointURL,