使用vue+vue-resource发送jsonp请求:
var jsonStr = {
"userId":"",
"type":this.type,
"name":this.searchContent,
"itId" : this.itId,
"regionid" : this.regionid=="0"?"":this.regionid,
"pageNow":this.pageNum,
"sort":"",
"pageCount":"10",
"auditstatus":"2"
};
jsonStr = JSON.stringify(jsonStr);
var sendData = {
marked : "helpList",
jsonStr : jsonStr
};
var that = this;
/* var _fnCallback_needmarket = function(data) {
//window.demo.h5Log(JSON.stringify(data));
that.helpList = that.helpList.concat(data.helpList);
};*/
console.log(sendData);
this.$http.jsonp(Util.url,{
params : sendData
}).then((response) => {
// success callback
that.helpList = that.helpList.concat(response.helpList);
}, (response) => {
// error callback
});
发送之前console.log了一下,sendData的值是
但是发送请求的时候,看请求里,参数不全,如下
没有了mark字段和callback字段。谁能告诉我下为什么?