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