【草稿】Google reCAPTCHA

未匹配的标注
<script src="https://www.recaptcha.net/recaptcha/api.js?render=%REACT_APP_RECAPTCHA%"></script>
<script>
  grecaptcha.ready(function () {
    grecaptcha.execute('%REACT_APP_RECAPTCHA%', { action: 'homepage' })
      .then(function (token) {
        fetch('%REACT_APP_API_URL%' + 'recaptcha', {
          method: 'post', body: JSON.stringify({
            token: token,
          }),
        }).then(function (response) {
          console.log(response)
        })
      })
  })
</script>

本文章首发在 LearnKu.com 网站上。

上一篇 下一篇
讨论数量: 0
发起讨论 只看当前版本


暂无话题~