Carrusel incompleto

This commit is contained in:
2020-08-13 23:38:51 -05:00
parent cecfa871d0
commit c085df460d
3 changed files with 68 additions and 64 deletions
+18 -27
View File
@@ -103,24 +103,18 @@ export default {
Libros: [
{
id: 0,
title:
"Some quick example text to build on the card title and make up the bulk of the cards content.",
img:
"https://edit.org/img/blog/xwdn-editar-portadas-de-libros-gratis.jpg.pagespeed.ic.PmNhyGc59r.jpg"
title: "",
img: ""
},
{
id: 1,
title:
"Some quick example text to build on the card title and make up the bulk of the cards content.",
img:
"https://edit.org/img/blog/xwdn-editar-portadas-de-libros-gratis.jpg.pagespeed.ic.PmNhyGc59r.jpg"
title: "",
img: ""
},
{
id: 1,
title:
"Some quick example text to build on the card title and make up the bulk of the cards content.",
img:
"https://edit.org/img/blog/xwdn-editar-portadas-de-libros-gratis.jpg.pagespeed.ic.PmNhyGc59r.jpg"
title: "",
img: ""
}
]
};
@@ -176,22 +170,19 @@ export default {
console.log(`${similares}`);
for (let i = 0; i < similares.length; i++) {
this.Libros[i].title = similares[i].titulo;
let config = {
// example url
url: `http://localhost:3000/libroImagen?idLibro=${i+2}`,
method: "GET",
responseType: "blob"
};
await axios(config).then(response => {
let reader = new FileReader();
reader.readAsDataURL(response.data);
reader.onload = () => {
this.Libros[i].img = reader.result;
let config = {
// example url
url: `http://localhost:3000/libroImagen?idLibro=${i + 2}`,
method: "GET",
responseType: "blob"
};
});
await axios(config).then(response => {
let reader = new FileReader();
reader.readAsDataURL(response.data);
reader.onload = () => {
this.Libros[i].img = reader.result;
};
});
}
} catch (error) {
console.log(`Ocurrio un error ${error}`);