2
(VUEJS) You can access the information that is sent by query on the router before injecting the services of an application?
For example:
import Vue from 'vue';
import App from './App.vue';
import router from './router';
import init from '@/services/Services';
const baseURL = 'https://api.exemplo.com.br';
let token = router.currentRoute.query.token;
const services = init(baseURL, token);
Vue.config.productionTip = false;
new Vue({
render: h => h(App),
router,
provide() {
return services;
},
}).$mount('#app');
And when you access the address: localhost:8080/teste?token=123 he can capture the token before mounting everything?