|
|
@@ -119,9 +119,27 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
newimgarr(localIds) {
|
|
|
- this.imgArr = this.imgArr.concat(localIds);
|
|
|
+ if (that.isIOS()) {
|
|
|
+ // 解决ios微信localId无法直接使用的问题,获取base64后再上传
|
|
|
+ that.setIosImg(localIds);
|
|
|
+ } else {
|
|
|
+ this.imgArr = this.imgArr.concat(localIds);
|
|
|
+ }
|
|
|
// this.$emit('upDataDetail');
|
|
|
},
|
|
|
+ isIOS() {
|
|
|
+ return /iPhone|iPad|iPod/i.test(navigator.userAgent);
|
|
|
+ },
|
|
|
+ setIosImg(localIds) {
|
|
|
+ localIds.forEach((localId) => {
|
|
|
+ this.wx.getLocalImgData({
|
|
|
+ localId: localId, // 图片的localID
|
|
|
+ success: (res) => {
|
|
|
+ this.imgArr.push(res.localData);
|
|
|
+ },
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|