love_php/public/download.html
2026-04-02 09:20:51 +08:00

32 lines
1.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<body>
<div id="btn">
<!-- <button onclick="submitFn()">打开app</button> -->
<a href="安卓配置" class="a-btn" style="display: none">安卓</a>
<a href="苹果URL scheme://" class="i-btn" style="display: none">苹果</a>
</div>
</body>
<script src="http://m-cdn.saclub.com.cn/app/2.4/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript">
var ua = navigator.userAgent.toLowerCase();
var isWeixin = ua.indexOf('micromessenger') != -1;
var isAndroid = ua.indexOf('android') != -1;
var isIos = (ua.indexOf('iphone') != -1) || (ua.indexOf('ipad') != -1);
var d = new Date();
var t0 = d.getTime();
openApp("https://apps.apple.com/cn/app/id1483551530");
function openApp(src) {
// 通过iframe的方式试图打开APP如果能正常打开会直接切换到APP并自动阻止a标签的默认行为
// 否则打开a标签的href链接
var delay = setInterval(function(){
var d = new Date();
var t1 = d.getTime();
if( t1-t0<3000 && t1-t0>2000){
window.location.href =src;
}
if(t1-t0>=3000){
clearInterval(delay);
}
},2000);
}
</script>