previewImage上不显示showToast

发布于 6 年前作者 na119580 次浏览最后编辑 6 年前来自 ask

 

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

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

怎么解决呢?

代码如下

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

1 回复
hcheng
hcheng1 楼5 年前

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