谷歌机器人验证主要是翻墙的问题,
首先你要申请一个一个谷歌账号
然后去https://www.google.com/recaptcha/intro/v3.html申请密钥
下载然后下载 vue-recaptcha 插件(所对应https://github.com/DanSnow/vue-recaptcha)
npm install --save vue-recaptcha
然后在组件中引入
import VueGrecaptcha from 'vue-recaptcha'
代码如下
效果:
就是这么简单