微信公众号去除分享菜单

由于考虑兼容性问题 故要用两种方式去除:

<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script language="JavaScript">
    document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
        // 通过下面这个API隐藏右上角按钮
        WeixinJSBridge.call('hideOptionMenu');
    });

    wx.hideMenuItems({
        menuList: ["menuItem:share:timeline", "menuItem:copyUrl", "menuItem:share:appMessage", "menuItem:share:qq", "menuItem:share:weiboApp", "menuItem:favorite", "menuItem:share:facebook", "menuItem:share:QZone", "menuItem:editTag", "menuItem:delete", "menuItem:copyUrl", "menuItem:originPage", "menuItem:readMode", "menuItem:openWithQQBrowser", "menuItem:openWithSafari", "menuItem:share:email", "menuItem:share:brand"] // 要隐藏的菜单项,只能隐藏“传播类”和“保护类”按钮
    });
</script>

 

posted @ 2018-05-14 14:46  007少侠  阅读(338)  评论(0编辑  收藏  举报
友情链接:便宜vps(CN2GIA线路)
站长统计: