解决方案:前端引入Axios qs。
把要发送的参数对象使用QS.stringify({user:"xxx"}) 转换格式
再发送axios请求
login:function(){
let u = Qs.stringify({user:this.user});
if(this.user==""){
this.tips("账号不能为空")
return
}
axios.post("http://localhost:8080/wws/login",u).
then(function(resp){
console.log(resp)
})
}
来源:oschina
链接:https://my.oschina.net/u/3702441/blog/4330029