Commit 42573d97 by 和金晶

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

parent 59e70f8e
......@@ -8,13 +8,16 @@ const CancelToken = axios.CancelToken;
const baseURL = '/api/';
// const debugEnv = 1458134081;
const debugEnv = '';
const cookie = LocalStorage.get('cookie')
const instance = axios.create({
baseURL,
timeout: 40000,
headers: {
//'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
validateStatus: (status) => {
......@@ -27,7 +30,9 @@ const textplain = axios.create({
timeout: 40000,
headers: {
//'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) => {
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