小程序image无法打开的url,wx.previewImage却能加载出来

小程序 文章 2022-03-30 10:40 0 全屏看文

小程序image无法打开的url,wx.previewImage却能加载出来The url that the applet image cannot open, but wx.previewImage can be loaded

小程序image无法打开的url,wx.previewImage却能加载出来
框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug image、wx.previewImage 微信安卓客户端 8.019 2.23.2

<image style='width: 200rpx; height: 200rpx' src="/uploads/cj/article/2022/03/30/3bb83fcad6ede47822fbd4e37309dfb4.jpg"window.open('/community/middlepage/href?href=https%3A%2F%2Fyz-1258329060.cos.ap-chengdu.myqcloud.com%2Ftmp_e138f8b1a2a1efa30c21347134619302c12c7b5db8bb0aa7.jpg', '_blank').location; return false;" href="/uploads/cj/article/2022/03/30/8739f03118bbecf135234ac810135073.jpg" rel="noopener noreferrer" target="_blank">/uploads/cj/article/2022/03/30/8739f03118bbecf135234ac810135073.jpg" @click="handleTest"></image>


handleTest(){

wx.previewImage({

  current: '/uploads/cj/article/2022/03/30/3bb83fcad6ede47822fbd4e37309dfb4.jpg"window.open('/community/middlepage/href?href=https%3A%2F%2Fyz-1258329060.cos.ap-chengdu.myqcloud.com%2Ftmp_e138f8b1a2a1efa30c21347134619302c12c7b5db8bb0aa7.jpg', '_blank').location; return false;" href="/uploads/cj/article/2022/03/30/8739f03118bbecf135234ac810135073.jpg" rel="noopener noreferrer" target="_blank">/uploads/cj/article/2022/03/30/8739f03118bbecf135234ac810135073.jpg',

  urls: ['/uploads/cj/article/2022/03/30/3bb83fcad6ede47822fbd4e37309dfb4.jpg"window.open('/community/middlepage/href?href=https%3A%2F%2Fyz-1258329060.cos.ap-chengdu.myqcloud.com%2Ftmp_e138f8b1a2a1efa30c21347134619302c12c7b5db8bb0aa7.jpg', '_blank').location; return false;" href="/uploads/cj/article/2022/03/30/8739f03118bbecf135234ac810135073.jpg" rel="noopener noreferrer" target="_blank">/uploads/cj/article/2022/03/30/8739f03118bbecf135234ac810135073.jpg'] /

})

}

框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本 小程序 Bug image、wx.previewImage 微信安卓客户端 8.019 2.23.2 handleTest(){ wx.previewImage({ current: '/uploads/cj/article/2022/03/30/8739f03118bbecf135234ac810135073.jpg', urls: ['/uploads/cj/article/2022/03/30/8739f03118bbecf135234ac810135073.jpg'] / }) }

回答:

肖荣豪:

换一张图片正常吗?

NANA:换一张浏览器能打开的图,就正常。
destiny:

我浏览器都加载不出来

NANA:浏览器是加载不出来,所以image加载不出来
destiny:so,你的需求是啥?
NANA:

只有真机中wx.previewImage能查看,开发者工具中wx.previewImage加载不出来

-EOF-