conexion a api preview libro
This commit is contained in:
@@ -116,7 +116,8 @@ export default {
|
|||||||
isModalVisible: false,
|
isModalVisible: false,
|
||||||
//PDF: "http://www.ataun.eus/bibliotecagratuita/Cl%C3%A1sicos%20en%20Espa%C3%B1ol/Nicol%C3%A1s%20Maquiavelo/El%20pr%C3%ADncipe.pdf#toolbar=0&navpanes=0&scrollbar=0&zoom=80"
|
//PDF: "http://www.ataun.eus/bibliotecagratuita/Cl%C3%A1sicos%20en%20Espa%C3%B1ol/Nicol%C3%A1s%20Maquiavelo/El%20pr%C3%ADncipe.pdf#toolbar=0&navpanes=0&scrollbar=0&zoom=80"
|
||||||
PDF:
|
PDF:
|
||||||
"https://www.imprentanacional.go.cr/editorialdigital/libros/literatura%20infantil/el_principito_edincr.pdf"
|
"RUTA.pdf" //nombre del archivo de previsualizacion del libro
|
||||||
|
// "https://www.imprentanacional.go.cr/editorialdigital/libros/literatura%20infantil/el_principito_edincr.pdf"
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
>
|
>
|
||||||
<section class="modal-body rounded" id="modalDescription">
|
<section class="modal-body rounded" id="modalDescription">
|
||||||
<iframe
|
<iframe
|
||||||
:src="pdfPre"
|
:src="PDF"
|
||||||
width="100%"
|
width="100%"
|
||||||
height="100%"
|
height="100%"
|
||||||
frameborder="0"
|
frameborder="0"
|
||||||
@@ -21,13 +21,44 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
//import axios from "axios";
|
||||||
|
import config from "../config/config.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ["pdfPre"],
|
props: ["pdfPre"], //RUTA.pdf
|
||||||
name: "modal",
|
name: "modal",
|
||||||
methods: {
|
methods: {
|
||||||
close() {
|
close() {
|
||||||
this.$emit("close");
|
this.$emit("close");
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
PDF:''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
try {
|
||||||
|
let path = `${config.api}/PDFget/${this.pdfPre}`;
|
||||||
|
this.PDF = path
|
||||||
|
/*let PDF = await axios.get(`${config.api}/PDFget/${this.pdfPre}`, {
|
||||||
|
|
||||||
|
responseType: 'blob', //
|
||||||
|
})
|
||||||
|
|
||||||
|
.then(response => {
|
||||||
|
|
||||||
|
this.PDF = PDF
|
||||||
|
// this.user = response.data;
|
||||||
|
console.log("si se pudo", response.data)
|
||||||
|
}).catch(e => {
|
||||||
|
console.log(e);
|
||||||
|
})*/
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.log(`Ocurrio un error msj: ${error}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ const config = {
|
|||||||
//api: "https://f8d86328e778.ngrok.io"
|
//api: "https://f8d86328e778.ngrok.io"
|
||||||
|
|
||||||
//Local
|
//Local
|
||||||
//api: "http://localhost:3001"
|
api: "http://localhost:3001"
|
||||||
|
|
||||||
//Pruebas
|
//Pruebas
|
||||||
api: "https://venus.acatlan.unam.mx/portal"
|
//api: "https://venus.acatlan.unam.mx/portal"
|
||||||
};
|
};
|
||||||
module.exports = config;
|
module.exports = config;
|
||||||
|
|||||||
Reference in New Issue
Block a user