Wechat sharing is disabled on page A, jumping from page A to page B, and sharing on page B is also disabled.

I want to disable sharing on one page and not on others. So I used the following code:

function onBridgeReady() {
    WeixinJSBridge.call("hideOptionMenu");
}

if (typeof WeixinJSBridge == "undefined") {
    if (document.addEventListener) {
        document.addEventListener("WeixinJSBridgeReady", onBridgeReady, false);
    } else if (document.attachEvent) {
        document.attachEvent("WeixinJSBridgeReady", onBridgeReady);
        document.attachEvent("onWeixinJSBridgeReady", onBridgeReady);
    }
} else {
    onBridgeReady();
}

I used this code on page A, then jumped from page A to page B, and sharing on page B was disabled. Pages that have no jump relationship with page An are fine. Could you tell me how to solve this?
Thank you!


use debugging tools to see if the b page contains code that forbids sharing

Menu