@taole/dev-helper 0.1.18 → 0.1.20
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 +28 -18
- package/open-diandian/index.js +28 -18
- package/package.json +1 -1
|
@@ -10,10 +10,11 @@
|
|
|
10
10
|
app_name: '点点开黑',
|
|
11
11
|
link_ios: "com.tuwan.diandian://openPage",
|
|
12
12
|
link_android: "intent://diandain:8888/splash#Intent;scheme=taole;package=com.tuwan.yw;S.browser_fallback_url=https://sj.qq.com/myapp/detail.htm?apkName=com.tuwan.yw;end",
|
|
13
|
-
link_harmony: "taole://diandain:8888/splash",
|
|
14
|
-
fallback_link_ios: "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",
|
|
15
|
-
fallback_link_android: 'https://m.malink.cn/s/3iQziy',
|
|
16
|
-
|
|
13
|
+
link_harmony: "taole://diandain:8888/splash",
|
|
14
|
+
fallback_link_ios: "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",
|
|
15
|
+
fallback_link_android: 'https://m.malink.cn/s/3iQziy',
|
|
16
|
+
fallback_link_harmony: 'hiapplink://com.huawei.appmarket?appId=C100212407',
|
|
17
|
+
fallback_fin_5s: 'https://sj.qq.com/appdetail/com.tuwan.yw', // 5秒后跳转的链接(仅安卓)
|
|
17
18
|
},
|
|
18
19
|
'wx0e4a6eed634134ce': { // 兔小铲
|
|
19
20
|
app_name: '兔小铲',
|
|
@@ -129,7 +130,7 @@
|
|
|
129
130
|
bubbles: true,
|
|
130
131
|
composed: true,
|
|
131
132
|
}));
|
|
132
|
-
if (this._isHarmony || this.
|
|
133
|
+
if (this._isHarmony || this._isSceneLink()) {
|
|
133
134
|
this._showOpenInBrowserHint();
|
|
134
135
|
return;
|
|
135
136
|
}
|
|
@@ -311,6 +312,16 @@
|
|
|
311
312
|
}
|
|
312
313
|
}
|
|
313
314
|
}
|
|
315
|
+
_isSceneLink() {
|
|
316
|
+
var sceneAttr = this.getAttribute('scene');
|
|
317
|
+
if (sceneAttr === 'link') {
|
|
318
|
+
return true;
|
|
319
|
+
}
|
|
320
|
+
if (sceneAttr != null && sceneAttr !== '') {
|
|
321
|
+
return false;
|
|
322
|
+
}
|
|
323
|
+
return window.location.href.indexOf('scene=link') !== -1;
|
|
324
|
+
}
|
|
314
325
|
_showOpenInBrowserHint() { // 提示用户在浏览器中打开
|
|
315
326
|
this._log('open-diandian: showOpenInBrowserHint');
|
|
316
327
|
let _hHintDiv = document.getElementById('open-diandian-h-hint-div');
|
|
@@ -365,14 +376,17 @@
|
|
|
365
376
|
this._alink_fallback = this._appInfo.fallback_link_ios;
|
|
366
377
|
this._alink_link = this._appInfo.link_ios || this._alink_fallback;
|
|
367
378
|
this._alink_fin_5s = '';
|
|
368
|
-
} else {
|
|
369
|
-
this._alink_fallback = this._appInfo.fallback_link_android;
|
|
370
|
-
this._alink_link = this._appInfo.link_android || this._alink_fallback;
|
|
371
|
-
if(this._isHarmony && this._appInfo.link_harmony){
|
|
372
|
-
this._alink_link = this._appInfo.link_harmony;
|
|
373
|
-
}
|
|
374
|
-
this.
|
|
375
|
-
|
|
379
|
+
} else {
|
|
380
|
+
this._alink_fallback = this._appInfo.fallback_link_android;
|
|
381
|
+
this._alink_link = this._appInfo.link_android || this._alink_fallback;
|
|
382
|
+
if(this._isHarmony && this._appInfo.link_harmony){
|
|
383
|
+
this._alink_link = this._appInfo.link_harmony;
|
|
384
|
+
}
|
|
385
|
+
if(this._isHarmony && this._appInfo.fallback_link_harmony){
|
|
386
|
+
this._alink_fallback = this._appInfo.fallback_link_harmony;
|
|
387
|
+
}
|
|
388
|
+
this._alink_fin_5s = this._appInfo.fallback_fin_5s || '';
|
|
389
|
+
}
|
|
376
390
|
if (this._openAppTag) {
|
|
377
391
|
this._openAppTag.setAttribute('appid', this._appid);
|
|
378
392
|
this._openAppTag.setAttribute('extinfo', this.getAttribute('extinfo') || "");
|
|
@@ -399,10 +413,6 @@
|
|
|
399
413
|
}
|
|
400
414
|
}
|
|
401
415
|
|
|
402
|
-
registerTdiv();
|
|
403
|
-
|
|
404
|
-
// export default {
|
|
405
|
-
// name
|
|
406
|
-
// }
|
|
416
|
+
registerTdiv();
|
|
407
417
|
|
|
408
418
|
}));
|
package/open-diandian/index.js
CHANGED
|
@@ -5,10 +5,11 @@ const appInfoMap = {
|
|
|
5
5
|
app_name: '点点开黑',
|
|
6
6
|
link_ios: "com.tuwan.diandian://openPage",
|
|
7
7
|
link_android: "intent://diandain:8888/splash#Intent;scheme=taole;package=com.tuwan.yw;S.browser_fallback_url=https://sj.qq.com/myapp/detail.htm?apkName=com.tuwan.yw;end",
|
|
8
|
-
link_harmony: "taole://diandain:8888/splash",
|
|
9
|
-
fallback_link_ios: "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",
|
|
10
|
-
fallback_link_android: 'https://m.malink.cn/s/3iQziy',
|
|
11
|
-
|
|
8
|
+
link_harmony: "taole://diandain:8888/splash",
|
|
9
|
+
fallback_link_ios: "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",
|
|
10
|
+
fallback_link_android: 'https://m.malink.cn/s/3iQziy',
|
|
11
|
+
fallback_link_harmony: 'hiapplink://com.huawei.appmarket?appId=C100212407',
|
|
12
|
+
fallback_fin_5s: 'https://sj.qq.com/appdetail/com.tuwan.yw', // 5秒后跳转的链接(仅安卓)
|
|
12
13
|
},
|
|
13
14
|
'wx0e4a6eed634134ce': { // 兔小铲
|
|
14
15
|
app_name: '兔小铲',
|
|
@@ -124,7 +125,7 @@ function createOpenDiandianElementClass() {
|
|
|
124
125
|
bubbles: true,
|
|
125
126
|
composed: true,
|
|
126
127
|
}));
|
|
127
|
-
if (this._isHarmony || this.
|
|
128
|
+
if (this._isHarmony || this._isSceneLink()) {
|
|
128
129
|
this._showOpenInBrowserHint();
|
|
129
130
|
return;
|
|
130
131
|
}
|
|
@@ -306,6 +307,16 @@ function createOpenDiandianElementClass() {
|
|
|
306
307
|
}
|
|
307
308
|
}
|
|
308
309
|
}
|
|
310
|
+
_isSceneLink() {
|
|
311
|
+
var sceneAttr = this.getAttribute('scene');
|
|
312
|
+
if (sceneAttr === 'link') {
|
|
313
|
+
return true;
|
|
314
|
+
}
|
|
315
|
+
if (sceneAttr != null && sceneAttr !== '') {
|
|
316
|
+
return false;
|
|
317
|
+
}
|
|
318
|
+
return window.location.href.indexOf('scene=link') !== -1;
|
|
319
|
+
}
|
|
309
320
|
_showOpenInBrowserHint() { // 提示用户在浏览器中打开
|
|
310
321
|
this._log('open-diandian: showOpenInBrowserHint');
|
|
311
322
|
let _hHintDiv = document.getElementById('open-diandian-h-hint-div');
|
|
@@ -360,14 +371,17 @@ function createOpenDiandianElementClass() {
|
|
|
360
371
|
this._alink_fallback = this._appInfo.fallback_link_ios;
|
|
361
372
|
this._alink_link = this._appInfo.link_ios || this._alink_fallback;
|
|
362
373
|
this._alink_fin_5s = '';
|
|
363
|
-
} else {
|
|
364
|
-
this._alink_fallback = this._appInfo.fallback_link_android;
|
|
365
|
-
this._alink_link = this._appInfo.link_android || this._alink_fallback;
|
|
366
|
-
if(this._isHarmony && this._appInfo.link_harmony){
|
|
367
|
-
this._alink_link = this._appInfo.link_harmony;
|
|
368
|
-
}
|
|
369
|
-
this.
|
|
370
|
-
|
|
374
|
+
} else {
|
|
375
|
+
this._alink_fallback = this._appInfo.fallback_link_android;
|
|
376
|
+
this._alink_link = this._appInfo.link_android || this._alink_fallback;
|
|
377
|
+
if(this._isHarmony && this._appInfo.link_harmony){
|
|
378
|
+
this._alink_link = this._appInfo.link_harmony;
|
|
379
|
+
}
|
|
380
|
+
if(this._isHarmony && this._appInfo.fallback_link_harmony){
|
|
381
|
+
this._alink_fallback = this._appInfo.fallback_link_harmony;
|
|
382
|
+
}
|
|
383
|
+
this._alink_fin_5s = this._appInfo.fallback_fin_5s || '';
|
|
384
|
+
}
|
|
371
385
|
if (this._openAppTag) {
|
|
372
386
|
this._openAppTag.setAttribute('appid', this._appid);
|
|
373
387
|
this._openAppTag.setAttribute('extinfo', this.getAttribute('extinfo') || "");
|
|
@@ -394,8 +408,4 @@ function registerTdiv() {
|
|
|
394
408
|
}
|
|
395
409
|
}
|
|
396
410
|
|
|
397
|
-
registerTdiv();
|
|
398
|
-
|
|
399
|
-
// export default {
|
|
400
|
-
// name
|
|
401
|
-
// }
|
|
411
|
+
registerTdiv();
|