@taole/dev-helper 0.0.18 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -92,7 +92,8 @@
|
|
|
92
92
|
window.removeEventListener("visibilitychange", this._pagehideCallback);
|
|
93
93
|
setTimeout(() => {
|
|
94
94
|
// console.log("3s到了22", isPageHide, Date.now() - nowTs);
|
|
95
|
-
|
|
95
|
+
// console.log("document.hasFocus()", document.hasFocus());
|
|
96
|
+
if (isPageHide || document.hasFocus()) return;
|
|
96
97
|
this._alink_click_timer = null;
|
|
97
98
|
// window.location.href = this._alink_fallback; // 直接重定向的话ios上没法去到appstore
|
|
98
99
|
var tmplnk = document.createElement("a");
|
|
@@ -124,7 +125,7 @@
|
|
|
124
125
|
} else if (this._alink) {
|
|
125
126
|
// TODO: 如果设置了点点以外的appid,这里其实是有问题的,待后续更新优化
|
|
126
127
|
if (this._isIOS) {
|
|
127
|
-
this._alink.href = "com.tuwan.diandian://openPage
|
|
128
|
+
this._alink.href = "com.tuwan.diandian://openPage";
|
|
128
129
|
this._alink_fallback = "https://apps.apple.com/cn/app/%E7%82%B9%E7%82%B9-%E8%AF%AD%E9%9F%B3%E5%BC%80%E9%BB%91/id1449564746";
|
|
129
130
|
} else {
|
|
130
131
|
var packageName = "com.tuwan.yw";
|
package/open-diandian/index.js
CHANGED
|
@@ -86,7 +86,8 @@ function defineTag() {
|
|
|
86
86
|
window.removeEventListener("visibilitychange", this._pagehideCallback);
|
|
87
87
|
setTimeout(() => {
|
|
88
88
|
// console.log("3s到了22", isPageHide, Date.now() - nowTs);
|
|
89
|
-
|
|
89
|
+
// console.log("document.hasFocus()", document.hasFocus());
|
|
90
|
+
if (isPageHide || document.hasFocus()) return;
|
|
90
91
|
this._alink_click_timer = null;
|
|
91
92
|
// window.location.href = this._alink_fallback; // 直接重定向的话ios上没法去到appstore
|
|
92
93
|
var tmplnk = document.createElement("a");
|
|
@@ -118,7 +119,7 @@ function defineTag() {
|
|
|
118
119
|
} else if (this._alink) {
|
|
119
120
|
// TODO: 如果设置了点点以外的appid,这里其实是有问题的,待后续更新优化
|
|
120
121
|
if (this._isIOS) {
|
|
121
|
-
this._alink.href = "com.tuwan.diandian://openPage
|
|
122
|
+
this._alink.href = "com.tuwan.diandian://openPage";
|
|
122
123
|
this._alink_fallback = "https://apps.apple.com/cn/app/%E7%82%B9%E7%82%B9-%E8%AF%AD%E9%9F%B3%E5%BC%80%E9%BB%91/id1449564746";
|
|
123
124
|
} else {
|
|
124
125
|
var packageName = "com.tuwan.yw";
|