|
|
|
@ -13,14 +13,10 @@ const request = new Request({
|
|
|
|
|
config.headers['Content-Type'] = config.method === 'get' ?
|
|
|
|
|
'application/x-www-form-urlencoded' :
|
|
|
|
|
'application/json'
|
|
|
|
|
config.headers['Authorization'] = token
|
|
|
|
|
config.headers['tokenC'] = JSON.parse(localStorage.getItem('voteToken') || '{}')?.authorization;
|
|
|
|
|
if (config.isFormData) {
|
|
|
|
|
config.headers['Content-Type'] = 'multipart/form-data';
|
|
|
|
|
config.headers['Authorization'] = token
|
|
|
|
|
config.headers['tokenC'] ='1234567'
|
|
|
|
|
} else {
|
|
|
|
|
config.headers['Authorization'] = token
|
|
|
|
|
console.log('JSON.parse(localStorage.getItem(\'voteToken\'))?.authorization',JSON.parse(localStorage.getItem('voteToken'))?.authorization)
|
|
|
|
|
config.headers['tokenC'] =JSON.parse(localStorage.getItem('voteToken'))?.authorization
|
|
|
|
|
}
|
|
|
|
|
return config;
|
|
|
|
|
},
|
|
|
|
|