Carrusel incompleto
This commit is contained in:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user