优化代码

This commit is contained in:
java110 2020-07-27 22:02:21 +08:00
parent 3250b676fa
commit 70694e7ee2

View File

@ -90,9 +90,12 @@
sizeType: ['original', 'compressed'], //
sourceType: ['album','camera'], //
success: function (res) {
//JSON.stringify(res.tempFilePaths);
let _photos = factory.base64.urlTobase64(res.tempFilePaths);
_that.uploadOwnerPhoto(_photos);
let _photosPromise = factory.base64.urlTobase64(res.tempFilePaths[0]);
_photosPromise.then((photo) => {
_that.uploadOwnerPhoto(photo);
}, (e) => {
console.log(e);
})
}
});
},