const pArr = []
uni.chooseImage({
count,
sizeType: 'original',
success: (path) => {
uni.showLoading({
title: '上传中...',
mask: true,
icon: 'none'
})
path.tempFilePaths.map((item, index) => {
// compressImage(item).then(comPath => {
pArr.push(
new Promise((resolve, reject) => {
ossUpload.call(_self, item, path.tempFiles[index].name, function(res) {
_self.imgArr.push(res)
resolve(res)
})
})
)
// })
})
Promise.all(pArr).then(res => {
uni.hideLoading()
})
}
})

没网的苦恼_ico