修改main.js文件,在headers中增加Content-Type请求头。
Vue.prototype.$http=axios.create({
baseURL: 'http://localhost:8088',
headers:{
'Content-Type': 'application/json'
}
})
Vue.prototype.$http=axios.create({
baseURL: 'http://localhost:8088',
headers:{
'Content-Type': 'application/json'
}
})