<!DOCTYPE html>
<html>
<head>
<title>微信WeixinJSBridge API</title>
<meta charset="utf-8" />
<script type="text/javascript">
(function(){
var a=document.getElementsByTagName("html")[0];
window.Session={appDomain:a.getAttribute("data-app-domain")||"",staticDomain:a.getAttribute("data-static-domain")||""}
})();
window.registNS=function(fullNS,isIgnorSelf){
var reg=/^[_$a-z]+[_$a-z0-9]*/i;var nsArray=fullNS.split(".");
var sEval="";
var sNS="";
var n=isIgnorSelf?nsArray.length-1:nsArray.length;
for(var i=0;i<n;i++){
if(!reg.test(nsArray[i])){throw new Error("Invalid namespace:"+nsArray[i]+"");
return
}
if(i!=0){sNS+="."}
sNS+=nsArray[i];
sEval+="if(typeof("+sNS+")=='undefined') "+sNS+"=new Object();
else "+sNS+";"
}
if(sEval!=""){
return eval(sEval)
}
return{}
};
</script>
</head>
<body>
<section class="mod-page-body">
<div class="mod-page-main wordwrap clearfix">
<div class="mod-pageheader"></div>
<div class="mod-pagecontent">
<div class="mod-weixinjsapi">
<div class="x-desc">
微信客户端自带的Js Api:WeixinJSBridge
</div>
<div id="WeixinJsApi">
<input type="button" id="imagePreview" value="图片预览" />
<input type="button" id="profile" value="查看profile" />
<a href="weixin://profile/gh_412d74fbb474">企业微信小助手</a>
<input type="button" id="shareWeibo" value="分享微博" />
<input type="button" id="shareFB" value="分享facebook" />
<input type="button" id="addContact" value="添加联系人" />
<input type="button" id="scanQRCode" value="扫描二维码" />
<input type="button" id="jumpToBizProfile" value="跳转到指定公众账号页面" />
<input type="button" id="toggleMenuBtn" value="隐藏右上角按钮" />
<input type="button" id="toggleToolbar" value="隐藏底部导航栏" />
<input type="button" id="getNetType" value="获取网络状态" />
<input type="button" id="closeWindow" value="关闭" />
<input type="button" id="getBrandWCPayRequest" value="发起公众号微信支付" />
<input type="button" id="setPageState" value="设置页面状态" />
<input type="button" id="sendEmail" value="发邮件" />
<input type="button" id="openSpecificView" value="微信团队打开webView,跳到指定页面" />
<input type="button" id="getCanIAPPay" value="getCanIAPPay" />
<input type="button" id="getBrandIAPPayRequest" value="发起公众号IAP支付" />
<input type="button" id="openUrlByExtBrowser" value="用safari打开指定链接" />
<input type="button" id="openProductView" value="跳转微信商品页" />
<input type="button" id="openLocation" value="查看地理位置" />
<input type="button" id="timelineCheckIn" value="朋友圈签到" />
<input type="button" id="getBrandWCPayCreateCreditCardRequest" value="开通微信信用卡" />
<input type="button" id="geoLocation" value="获取地理位置" />
<input type="button" id="g
微信WeixinJSBridge API使用实例
最新推荐文章于 2023-02-16 08:40:40 发布