@taole/dev-helper 0.0.29 → 0.0.30
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.
- package/dist/open-diandian.umd.js +10 -12
- package/open-diandian/index.js +7 -6
- package/package.json +1 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
(function (
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
1
|
+
(function (factory) {
|
|
3
2
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
|
-
|
|
5
|
-
})(
|
|
3
|
+
factory();
|
|
4
|
+
})((function () { 'use strict';
|
|
6
5
|
|
|
7
|
-
const name = 'open-diandian';
|
|
6
|
+
// const name = 'open-diandian';
|
|
8
7
|
// 测试使用open-diandain-app标签
|
|
9
8
|
// TODO: 后期可以考虑优化为根据域名自动选择appid
|
|
10
9
|
function defineTag() {
|
|
@@ -26,7 +25,8 @@
|
|
|
26
25
|
this._isWechat = /MicroMessenger/i.test(navigator.userAgent);
|
|
27
26
|
this._isAndroid = /Android/i.test(navigator.userAgent);
|
|
28
27
|
this._isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
29
|
-
this.
|
|
28
|
+
this._isHarmony = /Harmony/i.test(navigator.userAgent);
|
|
29
|
+
this._isMobile = this._isAndroid || this._isIOS || this._isHarmony;
|
|
30
30
|
}
|
|
31
31
|
attributeChangedCallback() {
|
|
32
32
|
this._updateTagAttr();
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
this._alink.href = "intent://diandain:8888/splash#Intent;scheme=taole;package=" + packageName + ";S.browser_fallback_url=" + this._alink_fallback + ";end";
|
|
149
149
|
}
|
|
150
150
|
} else if (isTxc) {
|
|
151
|
-
if (this._isAndroid) {
|
|
151
|
+
if (this._isAndroid || this._isHarmony) {
|
|
152
152
|
this._alink.href = "tuxiaochan://diandain:8888/splash";
|
|
153
153
|
} else if (this._isIOS) { // ios 跳转appstore
|
|
154
154
|
this._alink.href = 'https://apps.apple.com/us/app/%E5%85%94%E5%B0%8F%E9%93%B2/id6745920939';
|
|
@@ -172,10 +172,8 @@
|
|
|
172
172
|
|
|
173
173
|
registerTdiv();
|
|
174
174
|
|
|
175
|
-
|
|
176
|
-
name
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
return index;
|
|
175
|
+
// export default {
|
|
176
|
+
// name
|
|
177
|
+
// }
|
|
180
178
|
|
|
181
179
|
}));
|
package/open-diandian/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const name = 'open-diandian';
|
|
1
|
+
// const name = 'open-diandian';
|
|
2
2
|
// 测试使用open-diandain-app标签
|
|
3
3
|
// TODO: 后期可以考虑优化为根据域名自动选择appid
|
|
4
4
|
function defineTag() {
|
|
@@ -20,7 +20,8 @@ function defineTag() {
|
|
|
20
20
|
this._isWechat = /MicroMessenger/i.test(navigator.userAgent);
|
|
21
21
|
this._isAndroid = /Android/i.test(navigator.userAgent);
|
|
22
22
|
this._isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
23
|
-
this.
|
|
23
|
+
this._isHarmony = /Harmony/i.test(navigator.userAgent);
|
|
24
|
+
this._isMobile = this._isAndroid || this._isIOS || this._isHarmony;
|
|
24
25
|
}
|
|
25
26
|
attributeChangedCallback() {
|
|
26
27
|
this._updateTagAttr();
|
|
@@ -142,7 +143,7 @@ function defineTag() {
|
|
|
142
143
|
this._alink.href = "intent://diandain:8888/splash#Intent;scheme=taole;package=" + packageName + ";S.browser_fallback_url=" + this._alink_fallback + ";end";
|
|
143
144
|
}
|
|
144
145
|
} else if (isTxc) {
|
|
145
|
-
if (this._isAndroid) {
|
|
146
|
+
if (this._isAndroid || this._isHarmony) {
|
|
146
147
|
this._alink.href = "tuxiaochan://diandain:8888/splash";
|
|
147
148
|
} else if (this._isIOS) { // ios 跳转appstore
|
|
148
149
|
this._alink.href = 'https://apps.apple.com/us/app/%E5%85%94%E5%B0%8F%E9%93%B2/id6745920939';
|
|
@@ -166,6 +167,6 @@ function registerTdiv() {
|
|
|
166
167
|
|
|
167
168
|
registerTdiv();
|
|
168
169
|
|
|
169
|
-
export default {
|
|
170
|
-
name
|
|
171
|
-
}
|
|
170
|
+
// export default {
|
|
171
|
+
// name
|
|
172
|
+
// }
|