使用previewImage预览图片,第一次打开能加载,关闭后,在打开就转圈圈,在关闭后,在打开就好了就反复出现,偶尔能打开,偶尔不能。
const previewUrls = urls.map(item => item.url).filter(Boolean)
if (previewUrls.length === 0) {
Taro.showToast({
title: '暂无图片可预览',
icon: 'none'
})
return
}
const currentIndex = urls.findIndex(item => item.id === id)
console.log('currentIndex', previewUrls[currentIndex])
Taro.previewImage({
urls: previewUrls,
showmenu: false,
current: currentIndex >= 0 ? previewUrls[currentIndex] : previewUrls[0],
})

你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
图片地址,是请求阿里云OSS获取的地址。访问地址能够下载到图片。