This commit is contained in:
Your Name 2022-08-09 13:35:43 -05:00
parent 6bb11167f1
commit cb720061cf

View File

@ -82,8 +82,11 @@ export default {
} }
}, },
methods: { methods: {
login() { async login() {
if (this.usuario && this.password && !this.error) { const token = await this.$recaptcha.getResponse()
console.log('ReCaptcha token:', token)
if (this.usuario && this.password && !this.error && !token) {
const data = { const data = {
operador: this.usuario, operador: this.usuario,
password: this.password, password: this.password,
@ -172,6 +175,9 @@ export default {
created() { created() {
this.obtenerCatalogoInstitucion() this.obtenerCatalogoInstitucion()
}, },
beforeDestroy() {
this.$recaptcha.destroy()
}
} }
</script> </script>