|
[插件开发]
"statusCode":500,"code":0,发送ajax请求提示这个
[复制链接]
api.ajax({
url: ljurl,
method: 'post',
cache: 'false',
timeout: 30,
dataTpye: 'json',
data: {
values: rlpostitme,
files: {
file: path
}
},
}, function (ret, err) {
//console.log(JSON.stringify(ret));
console.log(JSON.stringify(err));
api.hideProgress();
if (ret.result == 1) {
toast.hide();
api.toast({
msg: "提交成功",
duration: 2000,
location: 'bottom'
});
setTimeout(function () {
api.sendEvent({
name: 'addclose'
})
}, 1000)
}
else if (ret.result == 0) {
toast.hide();
api.toast({
msg: ret.des,
duration: 2000,
location: 'bottom'
});
} else {
toast.hide();
api.toast({
msg: '请求失败'
})
}
})
不加files的访问正常,加上就不能请求后台了
"statusCode":500,"code":0,"headers":
{"Cache-Control":"private","X-Android-Sent-Millis":"1665388459695","X-AspNet-Version":"4.0.30319",
"Content-Type":"text/html","X-Powered-By":**.**","Date":"Mon, 10 Oct 2022 07:54:10 GMT",
"Content-Length":"1141","Server":"Microsoft-IIS/10.0","X-Android-Response-Source":"NETWORK 500","X-Android-Received-Millis":"1665388461301"}
|
|