WeixinJSBridge,只有在微信浏览器中才有,现在能用的方法不多了
1、图片展示 imagePreview
WeixinJSBridge.invoke("imagePreview",{
"urls":[
"http://rescdn.qqmail.com/bizmail/zh_CN/htmledition/images/bizmail/v3/logo1ca3fe.png",
"http://rescdn.qqmail.com/bizmail/zh_CN/htmledition/images/bizmail/v3/icons_features1ca3fe.png",
"http://rescdn.qqmail.com/bizmail/zh_CN/htmledition/images/bizmail/v3/icons_workStyle1ca3fe.png"
],
"current":"http://rescdn.qqmail.com/bizmail/zh_CN/htmledition/images/bizmail/v3/icons_features1ca3fe.png"
})
2、关闭浏览器 closeWindow
WeixinJSBridge.invoke("closeWindow",{},function(e){})
3、获取网络状态 getNetworkType
WeixinJSBridge.invoke("getNetworkType",{},
function(e){
alert(netType[e.err_msg])
})