点击 在APP内打开触发的事件
//在APP内打开
$(".openapp").live('click',function(){
alert(window.location.href);
var appUrl = "touzizhanapp://" + window.location.href;
window.location.href = appUrl;
});
在index.html中调试,是否获取到对应的URL
<script>
window.handleOpenURL = function(url){
setTimeout(function(){
alert(url);
},0);
}
</script>
参考文献:
1.https://github.com/EddyVerbruggen/Custom-URL-scheme
2.http://www.jianshu.com/p/0180e3ee8108
3.http://blog.youkuaiyun.com/lovelyelfpop/article/details/48368923