From bc1417d555b6e78627e04b3b854ccacca87eed17 Mon Sep 17 00:00:00 2001 From: 付延余 <f-yanyu@outlook.com> Date: 星期三, 27 四月 2022 11:19:39 +0800 Subject: [PATCH] 首页数据 --- src/libs/axios.js | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/axios.js b/src/libs/axios.js index c5747d3..0cfab68 100644 --- a/src/libs/axios.js +++ b/src/libs/axios.js @@ -10,7 +10,7 @@ axios.interceptors.request.use(config => { let token = store.getters.token if(token) { - config.headers['Authorization'] = token + config.headers['token'] = token } return config },error => { @@ -18,6 +18,7 @@ }) axios.interceptors.response.use(config => { + // console.log(config,'config---config') const status = Number(config.status) const message = config.data.error if( status !== 200) { @@ -26,7 +27,7 @@ } return config },(error) => { - console.log(error,'error') + // console.log(error,'error') const { status, data } = error.response const { error : message } = data if(status === 503) { -- Gitblit v1.9.1