Closed sunmingtao closed 4 years ago
Command line
npm install --save axios
main.js
import axios from 'axios' axios.defaults.baseURL = 'https://age-pension.firebaseio.com'
App.vue
import axios from 'axios' axios.post('/users.json' + '?auth=' + state.idToken, userData) .then(res => console.log(res)) .catch(error => console.log(error)) axios.get('/users.json' + '?auth=' + state.idToken) .then(res => console.log(res)) .catch(error => console.log(error))
Command line
npm install --save axios
main.js
App.vue