problem description
I encapsulated an ajax, call in the relevant page in app.js. I have now written down the passed parameters, but the back-end staff still can"t get the parameters I passed. What"s going on? I hope you can help me answer it. Thank you!
the environmental background of the problems and what methods you have tried
related codes
/ / Please paste the code text below (do not replace the code with pictures)
app.js
owner.ajax_nocicle = function (url, data, cbk,err) {
mui.ajax(url, {
crossDomain: true,
data: data?data:{},
type: "POST",
dataType: "json",
timeout: 10 * 10000,
headers: {
"Authorization": this.getState().token
},
beforeSend: function() {
//plus.nativeUI.showWaiting();
},
complete: function() {
plus.nativeUI.closeWaiting();
},
success: cbk?cbk:function(){},
error: err?err:function(xhr, type) {
plus.nativeUI.closeWaiting();
console.log("xhr:" + xhr);
console.log("type:" + type);
return mui.toast("");
plus.nativeUI.closeWaiting();
}
});
}
page html
app.ajax (" http://61.50.187.156:8341/app/postData/union",{
Url:app.config.zs_url,
id:"10a0e35e-765e-4433-8e94-ddfb4b5a1cb5",
mobile:"123333333",
remark:"",
childUrl:"v1/GhCardPackage/ReadPad",
ServiceType:"2",
MethodName:"Post"
},function(data){
mui.toast(JSON.stringify(data));
});
what result do you expect? What is the error message actually seen?
the message returned now is that the interface has been entered, and the message returned to me is {message:" error"}. This prompt means that the passed parameter is empty. How can this happen
?