|
@@ -1,6 +1,7 @@
|
|
import Vue from 'vue'
|
|
import Vue from 'vue'
|
|
import axios from 'axios'
|
|
import axios from 'axios'
|
|
import store from '@/store'
|
|
import store from '@/store'
|
|
|
|
+import router from '@/router'
|
|
import notification from 'ant-design-vue/es/notification'
|
|
import notification from 'ant-design-vue/es/notification'
|
|
import modal from 'ant-design-vue/es/modal'
|
|
import modal from 'ant-design-vue/es/modal'
|
|
import { VueAxios } from './axios'
|
|
import { VueAxios } from './axios'
|
|
@@ -87,6 +88,15 @@ service.interceptors.request.use(config => {
|
|
config.headers['access-token'] = token // 让每个请求携带自定义 token 请根据实际情况自行修改
|
|
config.headers['access-token'] = token // 让每个请求携带自定义 token 请根据实际情况自行修改
|
|
config.headers['access-org'] = changeOrg // 当前要切换的账号 sn
|
|
config.headers['access-org'] = changeOrg // 当前要切换的账号 sn
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // 当前页面路径
|
|
|
|
+ const currentPage = router.history.current
|
|
|
|
+ if(currentPage&¤tPage.meta&&config.headers['module']){
|
|
|
|
+ config.headers['module'] = encodeURIComponent(currentPage.meta.title||'') + ',' +config.headers['module']
|
|
|
|
+ }
|
|
|
|
+ console.log(config.url)
|
|
|
|
+ console.log(decodeURIComponent(config.headers['module']))
|
|
|
|
+
|
|
config.retry = 3
|
|
config.retry = 3
|
|
config.retryDelay = 1000
|
|
config.retryDelay = 1000
|
|
store.commit('SET_loadingStatus', true)
|
|
store.commit('SET_loadingStatus', true)
|