Commit 42573d97 by 和金晶

OA审批流程页面相关请求头配置

parent 59e70f8e
...@@ -8,13 +8,16 @@ const CancelToken = axios.CancelToken; ...@@ -8,13 +8,16 @@ const CancelToken = axios.CancelToken;
const baseURL = '/api/'; const baseURL = '/api/';
// const debugEnv = 1458134081; // const debugEnv = 1458134081;
const debugEnv = ''; const debugEnv = '';
const cookie = LocalStorage.get('cookie')
const instance = axios.create({ const instance = axios.create({
baseURL, baseURL,
timeout: 40000, timeout: 40000,
headers: { headers: {
//'X-Custom-Header': 'rest', //'X-Custom-Header': 'rest',
'Cache-Control': 'no-cache,no-store,must-revalidate,max-age=-1,private' 'Cache-Control': 'no-cache,no-store,must-revalidate,max-age=-1,private',
'Authorization': cookie
}, },
responseType: 'json', // default responseType: 'json', // default
validateStatus: (status) => { validateStatus: (status) => {
...@@ -27,7 +30,9 @@ const textplain = axios.create({ ...@@ -27,7 +30,9 @@ const textplain = axios.create({
timeout: 40000, timeout: 40000,
headers: { headers: {
//'X-Custom-Header': 'rest', //'X-Custom-Header': 'rest',
'Cache-Control': 'no-cache,no-store,must-revalidate,max-age=-1,private' 'Cache-Control': 'no-cache,no-store,must-revalidate,max-age=-1,private',
'Authorization': cookie
}, },
transformResponse: [(data) => { transformResponse: [(data) => {
return data; return data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment