微信公众号去除分享菜单

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

<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>

 

微信公众号去除分享菜单

上一篇:苹果或被欧盟追缴80亿美元税款 最终调查结果3月出炉


下一篇:探秘小程序(6):微信支付