previewImage上不显示showToast
发布于 5 年前 作者 na11 9397 次浏览 来自 问答

 

 模拟器上可以在预览图上显示toast

真机上toast闪一下就不显示了

怎么解决呢?

代码如下

wx.previewImage({
      current: url, // 当前显示图片的http链接  
      urls: [url], // 需要预览的图片http链接列表
      success:function(){
        wx.showToast({
          title: ‘长按扫码,进入小程序’,
          icon: ‘none’,
          duration: 3000
        })
      }
    })

1 回复

你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)

回到顶部