|
|
@@ -390,8 +390,7 @@
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- /*
|
|
|
- document.getElementById('appBtn').addEventListener('click', function () {
|
|
|
+ function jumpToAppDownload() {
|
|
|
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
|
|
|
|
|
// Android 检测
|
|
|
@@ -408,6 +407,11 @@
|
|
|
console.log('无法确定操作系统,或者为桌面操作系统');
|
|
|
window.open('https://pcoloring.com/anc/', '_blank');
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ /*
|
|
|
+ document.getElementById('appBtn').addEventListener('click', function () {
|
|
|
+ jumpToAppDownload()
|
|
|
});
|
|
|
*/
|
|
|
|
|
|
@@ -430,6 +434,7 @@
|
|
|
// 此时可以判断是否需要跳转到App Store/Google Play
|
|
|
if (!document.hidden) { // 检查页面是否仍然可见,表示App未被拉起
|
|
|
console.log("App not opened, redirecting to store or showing smart banner.");
|
|
|
+ jumpToAppDownload();
|
|
|
// 在这里可以实现 Deferred Deep Link 逻辑
|
|
|
// 1. 显示一个智能 App 横幅 (Smart App Banner) 引导用户下载
|
|
|
// 2. 直接重定向到App Store/Google Play
|