axios 使用post方式传递参数,后端接受不到。请求体不显示请求的参数
在main.js 里面引入 设置
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
Vue.prototype.$ajax = axios;
在其他组件使用:
在main.js 里面引入 设置
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
Vue.prototype.$ajax = axios;
在其他组件使用: