标签:header 模板 pen enter api ade end cat erro
this.axios.get('/api/v1/***', {
headers: {
'Authorization': 'Bearer '+localStorage.getItem('token')
}
})
.then((res) => {
console.log(res);
})
.catch((error) => {
console.log(error);
});
let data = new FormData();
data.append('enterprise', this.writeFeel.company);
this.axios({
method: 'post',
url: '/api/v1/***',
headers: {
'Content-type': 'multipart/form-data',
'Authorization': 'Bearer '+localStorage.getItem('token')
},
data: data
})
.then((res) => {
console.log(res);
})
.catch((error) => {
console.log(error);
});
标签:header 模板 pen enter api ade end cat erro
原文地址:https://www.cnblogs.com/wulzt/p/10463725.html