wx.chooseImage({
sourceType: ['album'],
sizeType: ['compressed'],
count: 9 ,
success: function (res) {
console.log(res)
for (var k = 0; k < res.tempFilePaths.length; k++) {
(function (cavIndex) {
console.log("*****8888")
console.log(cavIndex)
var fil = 'file11' + cavIndex
new AV.File(fil, {
blob: {
uri: res.tempFilePaths[cavIndex],
},
}).save().then(
file => console.log(file.url())
).catch(console.error);
})(k)
}
},
complete: function complete(e) {
console.log(e.errMsg);
console.log("complete")
}
})
在安卓的真机上会只上传第一张,模拟器和ios正常,请大神来看看呗,急急急!