// post
export function post (url, data) {
let token = "111"
return new Promise(function (resolve, reject) {
axios(url, {
method: "post",
headers: {
"Content-Type": "application/json",
"Authorization": token //
},
data: JSON.stringify(data)
}).then(response => {
resolve(response.data)
}).catch(error => {
reject(error)
})
})
}
I found that there was an error. Do I need to change something with the cooperation of the back end?