微信JSSDK禁止右上角分享给朋友,朋友圈
super
2021-03-15 18:21


微信禁止分享给朋友,朋友圈在Html加以下代码:
<script>
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();
}
</script>

如果你是在微信开发者工具中调试:
报错WeixinJSBridge.call 不被支持,请参考 http://mp.weixin.qq.com/wiki/7/aaa137b55fb2e0456bf8dd9148dd613f.html 进行正确调用

不用理会即可,在手机端是没有问题的。
0 条讨论