token问题修复6
This commit is contained in:
@ -13,8 +13,6 @@ const service = axios.create({
|
|||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
let token = urlParams.get('token') ;
|
let token = urlParams.get('token') ;
|
||||||
localStorage.setItem('token', token);
|
localStorage.setItem('token', token);
|
||||||
const token1 = localStorage.getItem('token');
|
|
||||||
this.$toast("token" + token1)
|
|
||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
config => {
|
config => {
|
||||||
config.data = config.contentType ? config.data : qs.stringify(config.data)
|
config.data = config.contentType ? config.data : qs.stringify(config.data)
|
||||||
|
@ -58,9 +58,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// const urlParams = new URLSearchParams(window.location.search);
|
// this.$toast('window.location'+window.location)
|
||||||
// this.token = urlParams.get('token')
|
|
||||||
this.$toast('window.location'+window.location)
|
|
||||||
this.getVehicleList();
|
this.getVehicleList();
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
Reference in New Issue
Block a user