js控制禁止微信分享

禁止分享:

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();

}

打开分享:

WeixinJSBridge.call("hideOptionMenu");

替换成WeixinJSBridge.call('showOptionMenu');

你可能感兴趣的:(js控制禁止微信分享)