This commit is contained in:
Mrx
2026-02-28 14:15:07 +08:00
parent 1ea5ff1d88
commit a083fdca46
3 changed files with 91 additions and 18 deletions

View File

@@ -25,8 +25,10 @@ func SendSmsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
}
// 获取客户端真实 IP
clientIP := getClientIP(r)
// 获取 User-Agent 用于判断微信环境
userAgent := r.Header.Get("User-Agent")
l := auth.NewSendSmsLogic(r.Context(), svcCtx)
err := l.SendSms(&req, clientIP)
err := l.SendSms(&req, clientIP, userAgent)
result.HttpResult(r, w, nil, err)
}
}