修改客服request
This commit is contained in:
@ -2,6 +2,7 @@ import axios from 'axios';
|
||||
import { WITH_REQUEST_BODY_METHODS } from './constants/http';
|
||||
import { HTTP_STATUS_CODE_MAP } from './constants/http';
|
||||
import { notification, message } from 'antd'
|
||||
import { getSessionRoleData, getUserToken } from '@/utils/session';
|
||||
|
||||
// Axios全局配置项
|
||||
axios.defaults.withCredentials = true //允许带cookie
|
||||
@ -11,9 +12,9 @@ axios.defaults.headers['Authorization'] = '';
|
||||
|
||||
// Axios请求拦截器
|
||||
axios.interceptors.request.use(function (config) {
|
||||
config.headers['Authorization'] = window.sessionStorage.getItem('token') ? 'Bearer ' +/* '04152390-74f6-4eed-bd7d-f7110cdae419' */ window.sessionStorage.getItem('token') : null;
|
||||
config.headers['clientId']='bVS46ElU';
|
||||
config.headers['scope']=sessionStorage.getItem('scope')?JSON.parse(sessionStorage.getItem('scope')):'';
|
||||
config.headers['Authorization'] = getUserToken() == null ? null : getUserToken();
|
||||
//config.headers['clientId']='bVS46ElU';
|
||||
//config.headers['scope']=sessionStorage.getItem('scope')?JSON.parse(sessionStorage.getItem('scope')):'';
|
||||
return config;
|
||||
}, function (error) {
|
||||
return Promise.reject(error);
|
||||
|
Reference in New Issue
Block a user