agregar idLibros originales
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
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.92d4803c.css rel=preload as=style><link href=css/chunk-vendors.138628b4.css rel=preload as=style><link href=js/app.1ae20d2b.js rel=preload as=script><link href=js/chunk-vendors.8f463115.js rel=preload as=script><link href=css/chunk-vendors.138628b4.css rel=stylesheet><link href=css/app.92d4803c.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.8f463115.js></script><script src=js/app.1ae20d2b.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.a883dea2.css rel=preload as=style><link href=css/chunk-vendors.138628b4.css rel=preload as=style><link href=js/app.90a9b636.js rel=preload as=script><link href=js/chunk-vendors.8f463115.js rel=preload as=script><link href=css/chunk-vendors.138628b4.css rel=stylesheet><link href=css/app.a883dea2.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.8f463115.js></script><script src=js/app.90a9b636.js></script></body></html>
|
||||
Vendored
-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
Vendored
+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
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="divMaster row ">
|
||||
<div class="col-10 offset-1 d-flex flex-wrap justify-content-center mb-5">
|
||||
<div class="divMaster row mb-5">
|
||||
<div class="col-10 offset-1 d-flex flex-wrap justify-content-center">
|
||||
<div
|
||||
class="card m-3"
|
||||
style="width: 12rem;"
|
||||
@@ -49,21 +49,25 @@ export default {
|
||||
//this.Libros[i].title = novedades[i].titulo;
|
||||
let config = {
|
||||
// example url
|
||||
url: `${path}${(i % 3) + 1}`,
|
||||
url: `${path}${novedades[i].idLibro}`,
|
||||
method: "GET",
|
||||
responseType: "blob"
|
||||
};
|
||||
await axios(config).then(response => {
|
||||
let reader = new FileReader();
|
||||
reader.readAsDataURL(response.data);
|
||||
reader.onload = () => {
|
||||
this.Libros.push({
|
||||
id: novedades[i].idLibro,
|
||||
title: novedades[i].titulo,
|
||||
img: reader.result
|
||||
});
|
||||
};
|
||||
});
|
||||
try{
|
||||
await axios(config).then(response => {
|
||||
let reader = new FileReader();
|
||||
reader.readAsDataURL(response.data);
|
||||
reader.onload = () => {
|
||||
this.Libros.push({
|
||||
id: novedades[i].idLibro,
|
||||
title: novedades[i].titulo,
|
||||
img: reader.result
|
||||
});
|
||||
};
|
||||
});
|
||||
} catch (error) {
|
||||
console.log(`No existe esa imagen`);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(`Ocurrio un error ${error}`);
|
||||
|
||||
@@ -135,7 +135,6 @@ export default {
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
this.idLibro = 1;
|
||||
|
||||
try {
|
||||
let config = {
|
||||
@@ -163,22 +162,27 @@ export default {
|
||||
for (let i = 0; i < similares.length; i++) {
|
||||
let config = {
|
||||
// example url
|
||||
url: `${path}/libroImagen?idLibro=${i + 2}`,
|
||||
url: `${path}/libroImagen?idLibro=${similares[i].idLibro}`,
|
||||
method: "GET",
|
||||
responseType: "blob"
|
||||
};
|
||||
await axios(config).then(response => {
|
||||
let reader = new FileReader();
|
||||
reader.readAsDataURL(response.data);
|
||||
reader.onload = () => {
|
||||
this.Libros.push({
|
||||
id: similares[i].idLibro,
|
||||
title: similares[i].titulo,
|
||||
img: reader.result
|
||||
});
|
||||
//this.Libros[i].img = reader.result;
|
||||
};
|
||||
});
|
||||
try{
|
||||
await axios(config).then(response => {
|
||||
let reader = new FileReader();
|
||||
reader.readAsDataURL(response.data);
|
||||
reader.onload = () => {
|
||||
this.Libros.push({
|
||||
id: similares[i].idLibro,
|
||||
title: similares[i].titulo,
|
||||
img: reader.result
|
||||
});
|
||||
//this.Libros[i].img = reader.result;
|
||||
};
|
||||
});
|
||||
}
|
||||
catch(error){
|
||||
console.log(`Este libro no se encuentra: ${error}`);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(`Ocurrio un error ${error}`);
|
||||
|
||||
@@ -52,22 +52,27 @@ export default {
|
||||
for (let i = 0; i < similares.length; i++) {
|
||||
let config = {
|
||||
// example url
|
||||
url: `${path}/libroImagen?idLibro=${(i % 4) + 1}`,
|
||||
url: `${path}/libroImagen?idLibro=${similares[i].idLibro}`,
|
||||
method: "GET",
|
||||
responseType: "blob"
|
||||
};
|
||||
await axios(config).then(response => {
|
||||
let reader = new FileReader();
|
||||
reader.readAsDataURL(response.data);
|
||||
reader.onload = () => {
|
||||
this.Libros.push({
|
||||
id: similares[i].idLibro,
|
||||
title: similares[i].titulo,
|
||||
img: reader.result
|
||||
});
|
||||
//this.Libros[i].img = reader.result;
|
||||
};
|
||||
});
|
||||
try{
|
||||
await axios(config).then(response => {
|
||||
let reader = new FileReader();
|
||||
reader.readAsDataURL(response.data);
|
||||
reader.onload = () => {
|
||||
this.Libros.push({
|
||||
id: similares[i].idLibro,
|
||||
title: similares[i].titulo,
|
||||
img: reader.result
|
||||
});
|
||||
//this.Libros[i].img = reader.result;
|
||||
};
|
||||
});
|
||||
}
|
||||
catch(error){
|
||||
console.log(`Ocurrio un error con la imagen desc: ${error}`);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(`Ocurrio un error ${error}`);
|
||||
|
||||
Reference in New Issue
Block a user