image-base64的真机上不能预览
发布于 6 年前 作者 gzhong 3587 次浏览 来自 问答

数据为base64的image,可以展现,但是不能预览出来:

urls: “data:image/png;base64,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”

wx.previewImage({
current: e.currentTarget.id, // 当前显示图片的http链接
   urls: this.data.attaches // 需要预览的图片http链接列表
})
5 回复

安卓可以,苹果显示不出来

你好,请问把预览的问题解决了吗,我现在是在开发工具上能看到,但是真机上都看不到

android 无法预览啊

数据有空格,去掉就可以了,已解决

你好,请问你解决了吗

回到顶部