|
我之前用api.get(),后来我改用ajax发现file参数后台接收不到,为null
var picurl = ret.destPath;
alert("==="+picurl);
api.ajax({
url:"http://192.168.17.189:7080/supplyChain/control/phopReclate",
method : 'post',
timeout : 30,
dataType : 'json',
async : false,
data: {
files: {
file: picurl, //裁剪后的手机本地地址
}
}
},function(ret, err){
if (ret) {
alert("上传成功");
} else {
alert("上传失败");
}
}); |
|