在页面中只需引用下面代码就可以取掉复制等
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();
}
在非微信浏览器无法访问
var ua = navigator.userAgent.toLowerCase();
var isWeixin = ua.indexOf('micromessenger') != -1;
if (!isWeixin) {
window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=888"
}
版权声明:本文为p358278505原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。