决了我问题,但发现get 也会出现这样的问题,
用这种方式:
axios.get('path',{params:{phone:'15761653364',password:'123'},headers:{'Content-type': 'application/json'}});
就不会出现问题,具体原因不知道,没深入研究,我还是改后台吧,
后来感觉麻烦试了一下,
return request({
url: '/login',
method: 'post',
params: {phone: phone, password: password}, headers: {'Content-type': 'application/x-www-form-urlencoded'}
})
get,post都没问题,
我试过用网上说的拦截里设置,没用