IOS系统下 dd.previewImage无法预览图片
找了很久都没找到原因,但是想到了个曲线救国的办法 previewImgs(e) { let index = e.currentTarget.dataset.imgIndex const { imageList = [] } = this.data let imgList = [] dd.showLoading({ content: '图片加载中' }) imageList.map(item => { dd.getImageInfo({ src: item, success: (res) => { console.log(res); const { path = '' } = res imgList.push(path) if (imgList.length === imageList.length) { dd.hideLoading() dd.previewImage({ current: index, urls: imgList }); } }, fail: function (e) { dd.hideLoading() dd.showToast({ content: '获取图片失败' }) console.log(e); } }) }) },
赞0
踩1