axios post请求非json传参设置
let data = new URLSearchParams() data.append('accountName',xxxx) data.append('accountType','XXXX') data.append('password',xxxxx) data.append('verifyType',x) this.$axios.post('/api/account_login.rm',data,{headers: {'Accept':'*/*','Content-Type': 'application/x-www-form-urlencoded'}}).then(function (res) { console.log(res) }).catch(function (error) { console.log(error) })
圈红的为设置内容