通过接口获取菜单数据

通过接口获取菜单数据

通过axios 请求拦截器添加token ,保证拥有数据的权限

// axios请求拦截
axios.interceprors.request.use(config =>{
    
    
	// 对请求头对象,添加Token 验证的Authorization字段
	config.headers.Authorization = window.sessionStorage.getItem('token')
	// 在最后必须 return config 
	return config
})

猜你喜欢

转载自blog.csdn.net/weixin_50001396/article/details/113918815
今日推荐