espacio input
This commit is contained in:
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" type=image/png href=assets/icono.png><title>Portal Editorial Acatlán</title><link href=css/app.8b7905fb.css rel=preload as=style><link href=css/chunk-vendors.138628b4.css rel=preload as=style><link href=js/app.28972bfe.js rel=preload as=script><link href=js/chunk-vendors.38425f87.js rel=preload as=script><link href=css/chunk-vendors.138628b4.css rel=stylesheet><link href=css/app.8b7905fb.css rel=stylesheet></head><body><noscript><strong>We're sorry but portal doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.38425f87.js></script><script src=js/app.28972bfe.js></script></body></html>
|
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" type=image/png href=assets/icono.png><title>Portal Editorial Acatlán</title><link href=css/app.8b7905fb.css rel=preload as=style><link href=css/chunk-vendors.138628b4.css rel=preload as=style><link href=js/app.face5fb9.js rel=preload as=script><link href=js/chunk-vendors.38425f87.js rel=preload as=script><link href=css/chunk-vendors.138628b4.css rel=stylesheet><link href=css/app.8b7905fb.css rel=stylesheet></head><body><noscript><strong>We're sorry but portal doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.38425f87.js></script><script src=js/app.face5fb9.js></script></body></html>
|
||||||
Vendored
-1
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
+38
-45
@@ -16,21 +16,24 @@
|
|||||||
|
|
||||||
<form class="my-5">
|
<form class="my-5">
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
|
<div
|
||||||
<div class="col-12 col-md-12 col-xl-7 col-lg-7 d-flex flex-column justify-content-around ">
|
class="col-12 col-md-12 col-xl-7 col-lg-7 d-flex flex-column justify-content-around "
|
||||||
<div class="form-group row d-flex justify-content-between align-items-center">
|
>
|
||||||
|
<div
|
||||||
|
class="form-group row d-flex justify-content-between align-items-center"
|
||||||
|
>
|
||||||
<label for="formGroupExampleInput">Nombre</label>
|
<label for="formGroupExampleInput">Nombre</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
class="form-control"
|
class="form-control mb-4"
|
||||||
id="formGroupExampleInput"
|
id="formGroupExampleInput"
|
||||||
v-model="nombre"
|
v-model="nombre"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row d-flex my-4 justify-content-between">
|
<div class="form-group row d-flex justify-content-between">
|
||||||
<label for="inputEmail3">Correo electrónico</label>
|
<label for="inputEmail3">Correo electrónico</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input
|
<input
|
||||||
@@ -55,15 +58,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary mt-5" @click="enviar()"
|
<button
|
||||||
v-show="nombre != '' && correo !='' && mensaje !='' "
|
type="submit"
|
||||||
|
class="btn btn-primary mt-5"
|
||||||
|
@click="enviar()"
|
||||||
|
v-show="nombre != '' && correo != '' && mensaje != ''"
|
||||||
>
|
>
|
||||||
Enviar
|
Enviar
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Footer></Footer>
|
<Footer></Footer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -76,9 +82,7 @@ import Footer from "./../components/footer.vue";
|
|||||||
|
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import config from "../config/config.js";
|
import config from "../config/config.js";
|
||||||
import Swal from 'sweetalert2'
|
import Swal from "sweetalert2";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -89,60 +93,49 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
nombre: '',
|
nombre: "",
|
||||||
correo: '',
|
correo: "",
|
||||||
mensaje: ''
|
mensaje: ""
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
async enviar() {
|
async enviar() {
|
||||||
|
if (this.nombre == "") return alert("falta agregar nombre");
|
||||||
|
if (this.mensaje == "") return alert("falta agregar comentario");
|
||||||
|
if (this.correo == "") return alert("falta agregar correo");
|
||||||
|
|
||||||
if (this.nombre == "") return alert("falta agregar nombre")
|
let arroba = 0;
|
||||||
if (this.mensaje == "") return alert("falta agregar comentario")
|
|
||||||
if (this.correo == "") return alert("falta agregar correo")
|
|
||||||
|
|
||||||
let arroba = 0;
|
|
||||||
|
|
||||||
for (let i = 0; i < this.correo.length; i++) {
|
|
||||||
if (`${this.correo[i]}` === `@`) arroba=1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!arroba) return alert("El correo no es valido");
|
|
||||||
|
|
||||||
|
|
||||||
|
for (let i = 0; i < this.correo.length; i++) {
|
||||||
|
if (`${this.correo[i]}` === `@`) arroba = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!arroba) return alert("El correo no es valido");
|
||||||
|
|
||||||
await axios
|
await axios
|
||||||
.post(`${config.api}/email`, {
|
.post(`${config.api}/email`, {
|
||||||
correo: this.correo,
|
correo: this.correo,
|
||||||
mensaje: this.mensaje,
|
mensaje: this.mensaje,
|
||||||
nombre:this.nombre
|
nombre: this.nombre
|
||||||
})
|
})
|
||||||
.then(function(response) {
|
.then(function(response) {
|
||||||
|
Swal.fire({
|
||||||
Swal.fire({
|
icon: "success",
|
||||||
|
title: "Correo enviado correctamente",
|
||||||
icon: 'success',
|
showConfirmButton: false,
|
||||||
title: 'Correo enviado correctamente',
|
timer: 2000
|
||||||
showConfirmButton: false,
|
});
|
||||||
timer: 2000
|
|
||||||
})
|
|
||||||
console.log(response);
|
console.log(response);
|
||||||
})
|
})
|
||||||
.catch(function(error) {
|
.catch(function(error) {
|
||||||
|
Swal.fire({
|
||||||
Swal.fire({
|
icon: "error",
|
||||||
icon: 'error',
|
title: "Oops...",
|
||||||
title: 'Oops...',
|
text: "hubo un error. Intentalo más tarde "
|
||||||
text: 'hubo un error. Intentalo más tarde ',
|
});
|
||||||
|
|
||||||
})
|
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user