在axios向后端傳參時需要設置請求頭,確保請求參數的格式為JSON字符串(此時用JSON.stringify(obj)無效時)
this.$axios({
method:'',
url:'',
headers: {
'Content-Type': 'application/json',//設置請求頭請求格式為JSON
'access_token': this.token //設置token 其中K名要和后端協調好
},
params:{}
}).then((response)=>{})