wx.uploadfile 使用for循环发生异步提交怎么解决?
var zhi = that.data.inputlist.length - 1;
for(var j=0; j<zhi; j++){
debugger
var pics = that.data.inputlist[j].img;
wx.uploadFile({
url: bbsUrl + ‘?op=-1&mid=’ + wx.getStorageSync(‘mid’),
filePath: pics[j],
name: ‘fileData’,
dataType: ‘json’,
formData: null,
method: ‘POST’,
success: function (resp) {
console.log(“1234567897899” + resp);
}
});
}
