commit
This commit is contained in:
parent
ac2b171420
commit
6a28ffef08
|
@ -13,7 +13,7 @@ const service = axios.create({
|
|||
service.interceptors.request.use(config => {
|
||||
// if (store.getters.token) {
|
||||
// config.headers['X-Token'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
// }
|
||||
// };
|
||||
if (store.getters.token) {
|
||||
config.headers.Authorization = `Bearer ${getToken()}`;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue