12312
This commit is contained in:
parent
e7e493b2c1
commit
5f3277eb24
@ -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;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user