@taole/dev-helper 0.1.1 → 0.1.3

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.
@@ -23,7 +23,7 @@
23
23
  'wxcd28679e4d8c1792': { // 点点狼人
24
24
  app_name: '点点狼人',
25
25
  link_ios: "", // 空缺,后期补充
26
- link_android: "taole://diandainwolf:8888/splash",
26
+ link_android: "diandainwolf://diandain:8888/splash",
27
27
  fallback_link_ios: 'https://apps.apple.com/mo/app/%E7%82%B9%E7%82%B9%E7%8B%BC%E4%BA%BA%E6%9D%80-%E8%AF%AD%E9%9F%B3%E7%A4%BE%E4%BA%A4%E6%8E%A8%E7%90%86%E6%B8%B8%E6%88%8F/id1557616226',
28
28
  fallback_link_android: '',
29
29
  },
@@ -50,7 +50,7 @@
50
50
  "open-diandain-app",
51
51
  class extends HTMLElement {
52
52
  static get observedAttributes() {
53
- return ['appid', 'extinfo', 'debug'];
53
+ return ['appid', 'extinfo', 'debug', 'scene'];
54
54
  }
55
55
  constructor() {
56
56
  super();
@@ -115,14 +115,14 @@
115
115
  this._log('open-diandian: wx-open-launch-app appended');
116
116
  // 监听打开app失败的情况,跳转fallback链接
117
117
  this._openAppTag.addEventListener('error', (e) => {
118
- if (this._isHarmony) {
118
+ if (this._isHarmony || this.getAttribute('scene') === 'link') {
119
119
  this._showOpenInBrowserHint();
120
120
  return;
121
121
  }
122
122
  var tmplnk = document.createElement("a");
123
123
  tmplnk.href = this._alink_fallback;
124
124
  tmplnk.click();
125
- this._log('open-diandian: wx-open-launch-app error', this._alink_fallback);
125
+ this._log('open-diandian: wx-open-launch-app error', e);
126
126
  });
127
127
  } else {
128
128
  this._updateTagAttr();
@@ -18,7 +18,7 @@ const appInfoMap = {
18
18
  'wxcd28679e4d8c1792': { // 点点狼人
19
19
  app_name: '点点狼人',
20
20
  link_ios: "", // 空缺,后期补充
21
- link_android: "taole://diandainwolf:8888/splash",
21
+ link_android: "diandainwolf://diandain:8888/splash",
22
22
  fallback_link_ios: 'https://apps.apple.com/mo/app/%E7%82%B9%E7%82%B9%E7%8B%BC%E4%BA%BA%E6%9D%80-%E8%AF%AD%E9%9F%B3%E7%A4%BE%E4%BA%A4%E6%8E%A8%E7%90%86%E6%B8%B8%E6%88%8F/id1557616226',
23
23
  fallback_link_android: '',
24
24
  },
@@ -45,7 +45,7 @@ function defineTag() {
45
45
  "open-diandain-app",
46
46
  class extends HTMLElement {
47
47
  static get observedAttributes() {
48
- return ['appid', 'extinfo', 'debug'];
48
+ return ['appid', 'extinfo', 'debug', 'scene'];
49
49
  }
50
50
  constructor() {
51
51
  super();
@@ -110,14 +110,14 @@ function defineTag() {
110
110
  this._log('open-diandian: wx-open-launch-app appended');
111
111
  // 监听打开app失败的情况,跳转fallback链接
112
112
  this._openAppTag.addEventListener('error', (e) => {
113
- if (this._isHarmony) {
113
+ if (this._isHarmony || this.getAttribute('scene') === 'link') {
114
114
  this._showOpenInBrowserHint();
115
115
  return;
116
116
  }
117
117
  var tmplnk = document.createElement("a");
118
118
  tmplnk.href = this._alink_fallback;
119
119
  tmplnk.click();
120
- this._log('open-diandian: wx-open-launch-app error', this._alink_fallback);
120
+ this._log('open-diandian: wx-open-launch-app error', e);
121
121
  });
122
122
  } else {
123
123
  this._updateTagAttr();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taole/dev-helper",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "npx -y rimraf dist && rollup -c",