【vue】设置isToken: false来阻止拦截器覆盖你的Authorization头后,Authorization的数据还是变了,没有生效
·
标题的问题的解决方法:
// 创建第三方接口专用实例
const thirdPartyRequest = axios.create({
baseURL: 'https://api.third-party.com',
timeout: 10000
});
// 使用专用实例调用接口
export function callThirdPartyAPI(data) {
return thirdPartyRequest({
url: '/endpoint',
method: 'post',
data: data,
headers: {
'Authorization': 'Bearer your-fixed-token-here'
}
});
}
更多推荐


所有评论(0)