se añade paquete axios, y pequeño ejemplo para trabajar con la api
This commit is contained in:
Generated
+27
-2
@@ -356,6 +356,32 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"axios": {
|
||||
"version": "0.19.2",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz",
|
||||
"integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==",
|
||||
"requires": {
|
||||
"follow-redirects": "1.5.10"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
||||
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"follow-redirects": {
|
||||
"version": "1.5.10",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
|
||||
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
|
||||
"requires": {
|
||||
"debug": "=3.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"babel-code-frame": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
|
||||
@@ -4151,8 +4177,7 @@
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
|
||||
"dev": true
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
||||
},
|
||||
"multicast-dns": {
|
||||
"version": "6.2.3",
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
"@fortawesome/free-regular-svg-icons": "^5.14.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.14.0",
|
||||
"@fortawesome/vue-fontawesome": "^0.1.10",
|
||||
"axios": "^0.19.2",
|
||||
"bootstrap": "^4.5.0",
|
||||
"bootstrap-vue": "^2.16.0",
|
||||
"vue": "^2.5.11",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//const config = {
|
||||
//api: 'https://venus.acatlan.unam.mx/censo-pruebas/',
|
||||
//api: 'http://localhost:3000/',
|
||||
//api: 'http://localhost:3000',
|
||||
//}
|
||||
|
||||
//module.exports = config
|
||||
|
||||
+24
-11
@@ -51,18 +51,31 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import config from "../config/config";
|
||||
// import axios from "axios";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
user: '',
|
||||
password: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
}
|
||||
// export default {
|
||||
// data() {
|
||||
// return {};
|
||||
// },
|
||||
// methods: {
|
||||
// pruebaAxios() {
|
||||
// axios
|
||||
// .post(`${config.api}/login`)
|
||||
// .then((res) => {
|
||||
// /* eslint-disable no-console */
|
||||
// console.log(res.data);
|
||||
// })
|
||||
// .catch(err => {
|
||||
// /* eslint-disable no-console */
|
||||
// console.log(err.data);
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
// created() {
|
||||
// this.pruebaAxios();
|
||||
// }
|
||||
// };
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user