/**
* 微信webview中关闭浏览器-兼容安卓及苹果
*/
function CloseBrowser() {
//判断谷歌火狐安卓和linux关闭当前页面及浏览器
var userAgent = navigator.userAgent;
if (userAgent.indexOf('Android') > -1 || userAgent.indexOf('Linux') > -1) {
WeixinJSBridge.call('closeWindow');
} else {
//针对苹果不能关闭当前页面
setTimeout(function() {
WeixinJSBridge.invoke("closeWindow", {}, function(e) {})
}, 100)
}
}