From 6e41ce0ab4300758ebd77ea257c3d9532e3df7e0 Mon Sep 17 00:00:00 2001
From: zhangxiaoxu123456 <zxx19900626>
Date: 星期二, 10 五月 2022 11:58:22 +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