@2890594972
2018-05-22T01:18:48.000000Z
字数 467
阅读 959
1511c



为了迎合后台接参数方式,修改如何
在axios头部
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
在vue组件中
var params = new URLSearchParams();params.append('vcode', this.vcode); //你要传给后台的参数值 key/valueparams.append('cellphone', this.cellphone);params.append('password', this.password);reg(params).then(res=>{console.log(res);})
