Need to use the qs plugin to serialize the parameters
1, install
npm install qs --save
2. Introduce in main.js
import Qs from 'qs'
Vue.prototype.qs = Qs
3. Use
var this=_this
let data = {
batchNum: _this.pcNumnow };//要传给后端的参数
_this.$http.post('/index/grade/', _this.$qs.stringify(data)).then(function(res) {
console.log('这是返回的数据');
console.log(res.data);
});