自己最近忙于找房 发现 自如 的在微信中可以进行跳转 附上地址
http://m.ziroom.com/BJ/room/60735247.html 仿照他们的写并没有用
function openApp(url){
var unEncodeUrl = url;
var base = new Base64();
var EncodeUrl = base.encode(unEncodeUrl);
if(isAndroid()){
//android
//此操作会调起 app 并阻止接下来的 js 执行
$('body').append("<iframe src='ziroom://
ziroom.app/openApp?p="+encodeURIComponent(EncodeUrl)+"' style='display:none' target='' ></iframe>");
//没有安装应用会执行下面的语句
setTimeout(function(){window.location.href='
https://static8.ziroom.com/card_clean'},2000);
}else{
//ios
window.location = '
https://static8.ziroom.com/openApp?p='+ encodeURIComponent(EncodeUrl);
// console.log('
https://static8.ziroom.com/openApp?p='+ encodeURIComponent(EncodeUrl));
}
}