美文网首页
微信分享设置系统菜单转发功能

微信分享设置系统菜单转发功能

作者: Zszen | 来源:发表于2018-11-01 18:29 被阅读13次

强调几点:

  1. 不能更改菜单”转发“名称
  2. 需要配置是否显示”转发“
  3. 需要配置转发动作是什么

是否显示转发的代码为

wx.showShareMenu({
    withShareTicket: false, success: (res) => {
        DLOG("showShareMenu created");
    }, fail: (res) => {
        DLOG("showShareMenu create fail");
    }, complete: (res) => {
        DLOG("showShareMenu create complete");
    }
});

转发所实现的动作为, 记住需要把作用域带上,否则函数对应的是wx的作用域

let _this = this;
wx.onShareAppMessage(() => {
    DLOG("shareNow with sys menu");
    _this.shareNow.call(_this);
});

相关文章

网友评论

      本文标题:微信分享设置系统菜单转发功能

      本文链接:https://www.haomeiwen.com/subject/zgaxxqtx.html