请教下大佬们WX.SHOWMODAL里面的确定键调用函数分享小程序?
发布于 4 年前 作者 wuwei 10615 次浏览 来自 官方Issues

wx.showModal({  title: ‘提示’,  content: ‘这是一个模态弹窗’,  success (res) {    if (res.confirm) {   如何在这里写函数分享小程序???  

   } else if (res.cancel) {

      console.log('用户点击取消')
    }
  }})

1 回复

貌似不行,需要用户去主动点击 <button open-type=“share” ></button>,自己写一个 modal, 然后把确认按钮用 <button open-type=“share” ></button>

回到顶部