在发送POST请求时带上请求头一般就行了
axios({
url: "/api/student/schedule",
method: "POST",
data: {
sonId: this.$route.query.sonId,
sonassemble: this.$route.query.sonassemble,
videoId: this.$route.query.videoId
},
//这样就能发送请求咯
headers: {
"Content-Type": "multipart/form-data"
}
})
.then(res => {
console.log(res);
})
.catch(error => {
console.log(error);
});