@conecli/cone-render 0.10.1-shop3.9 → 0.10.1-shop3.91

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.
Files changed (114) hide show
  1. package/README.md +1 -1
  2. package/dist/api/index.ts +1 -1
  3. package/dist/common/accessibility.h5.ts +1 -0
  4. package/dist/common/accessibility.ts +0 -0
  5. package/dist/common/const.ts +1 -1
  6. package/dist/common/index.h5.ts +1 -1
  7. package/dist/common/index.jd.ts +1 -1
  8. package/dist/common/index.ts +1 -1
  9. package/dist/common/index.weapp.ts +1 -1
  10. package/dist/common/jdplayerSdk.weapp.tsx +1 -0
  11. package/dist/common/jssdk.ts +1 -1
  12. package/dist/common/jssdk.weapp.ts +1 -0
  13. package/dist/common/pageType.ts +1 -1
  14. package/dist/common/token/index.h5.ts +1 -1
  15. package/dist/common/token/token.jd.ts +1 -1
  16. package/dist/common/wxappApi.ascf.ts +1 -0
  17. package/dist/common/wxappApi.ts +1 -1
  18. package/dist/components/ErrorBoundary.tsx +1 -1
  19. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  20. package/dist/components/base/CountDown/index.tsx +1 -1
  21. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  22. package/dist/components/base/CustomVideo/index.tsx +1 -1
  23. package/dist/components/base/CustomVideo/index.weapp.tsx +1 -0
  24. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  25. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  26. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  27. package/dist/components/base/InOrOutViewObserver/index.weapp.tsx +1 -0
  28. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  29. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  30. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  31. package/dist/components/base/MobileCommonHeader/index.tsx +1 -1
  32. package/dist/components/base/MobileCommonHeader/index.weapp.tsx +1 -0
  33. package/dist/components/base/NetworkDataError/const.ts +1 -1
  34. package/dist/components/base/NetworkDataError/index.module.scss +118 -72
  35. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  36. package/dist/components/base/Price/Base/index.module.scss +12 -0
  37. package/dist/components/base/Price/Base/index.tsx +1 -1
  38. package/dist/components/base/Price/Double/index.module.scss +25 -1
  39. package/dist/components/base/Price/Double/index.tsx +1 -1
  40. package/dist/components/base/ShopLeGaoTag/index.h5.module.scss +35 -0
  41. package/dist/components/base/ShopLeGaoTag/index.h5.tsx +1 -0
  42. package/dist/components/base/ShopLeGaoTag/index.module.scss +33 -0
  43. package/dist/components/base/ShopLeGaoTag/index.tsx +1 -0
  44. package/dist/components/debug/DebugLayout/index.module.scss +2 -2
  45. package/dist/components/floorItem.tsx +1 -1
  46. package/dist/components/isv/Floor/index.tsx +1 -1
  47. package/dist/components/remoteFloorItem.tsx +1 -1
  48. package/dist/config/env.ts +1 -1
  49. package/dist/interface/common.ts +1 -1
  50. package/dist/interface/component.ts +1 -1
  51. package/dist/interface/jumpEventReport.ts +1 -1
  52. package/dist/interface/service.ts +1 -1
  53. package/dist/jumpEventReport/base.ts +1 -1
  54. package/dist/jumpEventReport/const.ts +1 -1
  55. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  56. package/dist/jumpEventReport/index.h5.ts +1 -1
  57. package/dist/jumpEventReport/index.jd.ts +1 -1
  58. package/dist/jumpEventReport/index.weapp.ts +1 -1
  59. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  60. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  61. package/dist/jumpEventReport/logEventConfig.h5.ts +1 -0
  62. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  63. package/dist/jumpEventReport/web/report.ts +1 -1
  64. package/dist/jumpEventReport/web.base.ts +1 -1
  65. package/dist/jumpEventReport/web.jd.ts +1 -1
  66. package/dist/jumpEventReport/web.pc.ts +1 -1
  67. package/dist/jumpEventReport/web.tjm.ts +1 -1
  68. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  69. package/dist/language/en_US.json +309 -0
  70. package/dist/language/zh_CN.json +309 -0
  71. package/dist/language/zh_HK.json +309 -0
  72. package/dist/libs/openShopBridge.js +161 -0
  73. package/dist/libs/openShopBridge.min.js +1 -0
  74. package/dist/libs/taroAppReport.js +2 -2
  75. package/dist/modules/ContainerFloorList/index.h5.module.scss +16 -2
  76. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  77. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  78. package/dist/modules/DecorateContainerFloorList/index.weapp.tsx +1 -0
  79. package/dist/open/api/environment.ts +1 -1
  80. package/dist/open/api/shopMember.ts +1 -1
  81. package/dist/open/api/shopMember.weapp.ts +1 -0
  82. package/dist/open/api/track.ts +1 -1
  83. package/dist/open/api/util.ts +1 -1
  84. package/dist/open/components/index.ts +1 -1
  85. package/dist/open/index.ts +1 -1
  86. package/dist/sass/app.h5.scss +27 -1
  87. package/dist/sass/base.scss +8 -4
  88. package/dist/service/fetchGateway.ts +1 -1
  89. package/dist/service/fetchGateway.weapp.ts +1 -1
  90. package/dist/service/fetchJsonp.weapp.ts +1 -0
  91. package/dist/service/http/const.ts +1 -1
  92. package/dist/service/http/h5Http.ts +1 -1
  93. package/dist/service/http/httpInterceptors.weapp.ts +1 -0
  94. package/dist/service/requestServer.h5.ts +1 -1
  95. package/dist/service/requestServer.ts +1 -1
  96. package/dist/service/requestServer.weapp.ts +1 -1
  97. package/dist/utils/connectNativeJsBridge.ts +1 -1
  98. package/dist/utils/h5Utils.ts +1 -1
  99. package/dist/utils/harmonyCallRouter.h5.ts +1 -0
  100. package/dist/utils/harmonyCallRouter.ts +0 -0
  101. package/dist/utils/index.h5.ts +1 -1
  102. package/dist/utils/index.ts +1 -1
  103. package/dist/utils/index.weapp.ts +1 -1
  104. package/dist/utils/jumpExtMapUtil.ts +1 -0
  105. package/dist/utils/log.ts +1 -0
  106. package/dist/utils/{sColor.js → sColor.ts} +1 -1
  107. package/dist/utils/sColor.weapp.ts +1 -0
  108. package/dist/utils/utils.ts +1 -1
  109. package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
  110. package/dist/wxapp/common/user_info.js +1 -1
  111. package/package.json +162 -141
  112. package/dist/jumpEventReport/web/wqshop.report.ts +0 -1
  113. package/dist/utils/priceUtils.js +0 -1
  114. /package/dist/utils/{jumpExtMapUtil.js → jumpExtMapUtil.h5.ts} +0 -0
@@ -0,0 +1 @@
1
+ export const hasBgAudio = () => {
2
  return Promise.reject({
1
3
  code: -1,
2
4
  message: '小程序不支持',
3
5
  })
4
6
  return Promise.reject({
5
7
  code: -1,
6
8
  message: '小程序不支持',
7
9
  })
8
10
  return Promise.reject({
9
11
  code: -1,
10
12
  message: '小程序不支持',
11
13
  })
12
14
  return Promise.reject({
13
15
  code: -1,
14
16
  message: '小程序不支持',
15
17
  })
@@ -1 +1 @@
1
- import ready from '../utils/ready'
2
1
  return new Promise((resolve, reject) => {
3
2
  ready('jmfe', timeout)
4
3
  .then(() => {
5
4
  registerCode(JSSDK_APP_WEBVIEW_CODE)
6
5
  resolve(window['jmfe'])
7
6
  })
8
7
  .catch(() => {
9
8
  console.log('window.jmfe不存在')
10
9
  reject(null)
11
10
  })
12
11
  })
13
12
  if (window['jmfe']) {
14
13
  console.log('registerCode:', code)
15
14
  window['jmfe'].registerCode(code)
16
15
  } else {
17
16
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js')
18
17
  }
18
+ import ready from '../utils/ready';
19
19
  return new Promise((resolve, reject) => {
20
20
  ready('jmfe', timeout)
21
21
  .then(() => {
22
22
  registerCode(JSSDK_APP_WEBVIEW_CODE);
23
23
  resolve(window['jmfe']);
24
24
  })
25
25
  .catch(() => {
26
26
  console.log('window.jmfe不存在');
27
27
  reject(null);
28
28
  });
29
29
  });
30
30
  if (window['jmfe']) {
31
31
  console.log('registerCode:', code);
32
32
  window['jmfe'].registerCode(code);
33
33
  } else {
34
34
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js');
35
35
  }
@@ -0,0 +1 @@
1
+ export const getJmfe = () => {
2
  console.info('小程序不存在jmfe对象')
1
3
  return Promise.reject(null)
2
4
  console.info('小程序不存在jmfe对象');
@@ -1 +1 @@
1
- export const getPageType = () => {
2
1
  return process.env.BUILD_TYPE || ''
3
2
 
4
3
  M_DECORATE = 'm-decorate',
5
4
  M_RENDER_MODULE = 'm-render-module',
6
5
  M_PREVIEW = 'm-preview',
7
6
  M_ISV_PREVIEW = 'm-isv-preview',
8
7
  MARKETING_PREVIEW = 'marketing-preview',
9
8
 
10
9
  APP_VIEW = 'app-view',
11
10
  APP_MEMBER = 'app-member',
12
11
  APP_INTRODUCE = 'app-introduce',
13
12
  APP_PROMOTION = 'app-promotion',
14
13
  APP_CLASSIFY = 'app-classify',
15
14
  APP_PRODUCT = 'app-product',
16
15
  MEMBER_HOME = 'member-home',
17
16
 
18
17
 
19
18
  PC_VIEW = 'pc-view',
20
19
  PC_VIEW1 = 'pc-view1',
21
20
  PC_VIEW2 = 'pc-view2',
22
21
  M_VIEW = 'm-view',
23
22
  M_BSC_VIEW = 'm-bsc-view',
24
23
  SALE_VIEW = 'sale-view',
25
24
  VIP_VIEW = 'vip-view',
26
25
  M_SEARCH = 'm-search',
27
26
  M_INTRODUCE = 'm-introduce',
28
27
 
29
28
  MEMBER_SHOPCARD = 'member-shopcard',
30
29
  M_MEMBER = 'm-member',
31
30
  M_MEMBER_SAM_BIND_CARD = 'm-member-sam-bind-card',
32
31
  M_MEMBER_WATSONS_BIND_CARD = 'm-member-watsons-bind-card',
33
32
  M_SAM_CARD = 'm-sam-card',
34
33
  M_SAM_CENTER = 'm-sam-center',
35
34
  M_WATSONS_CARD = 'm-watsons-card',
36
35
 
37
36
  M_LOTTERY = 'm-lottery',
38
37
  M_COUPON = 'm-coupon',
39
38
  M_WARES = 'm-wares',
40
39
  M_FAST_SHOPPING = 'm-fast-shopping',
41
40
  M_SPECIAL_SECKILL = 'm-special-seckill',
42
41
  WEAPP_SHOP = 'weapp-shop',
43
42
  WEAPP_PROMOTION = 'weapp-promotion',
44
43
  M_VIDEOS = 'm-videos',
44
+ export const getPageType = () => {
45
45
  return process.env.BUILD_TYPE || '';
46
46
 
47
47
  M_DECORATE = 'm-decorate',
48
48
  M_RENDER_MODULE = 'm-render-module',
49
49
  M_PREVIEW = 'm-preview',
50
50
  M_ISV_PREVIEW = 'm-isv-preview',
51
51
  MARKETING_PREVIEW = 'marketing-preview',
52
52
 
53
53
  APP_VIEW = 'app-view',
54
54
  APP_MEMBER = 'app-member',
55
55
  APP_INTRODUCE = 'app-introduce',
56
56
  APP_PROMOTION = 'app-promotion',
57
57
  APP_CLASSIFY = 'app-classify',
58
58
  APP_PRODUCT = 'app-product',
59
59
  MEMBER_HOME = 'member-home',
60
60
 
61
61
 
62
62
  PC_VIEW = 'pc-view',
63
63
  PC_VIEW1 = 'pc-view1',
64
64
  PC_VIEW2 = 'pc-view2',
65
65
  M_VIEW = 'm-view',
66
66
  M_BSC_VIEW = 'm-bsc-view',
67
67
  SALE_VIEW = 'sale-view',
68
68
  VIP_VIEW = 'vip-view',
69
69
  M_SEARCH = 'm-search',
70
70
  M_INTRODUCE = 'm-introduce',
71
71
 
72
72
  MEMBER_SHOPCARD = 'member-shopcard',
73
73
  M_MEMBER = 'm-member',
74
74
  M_MEMBER_SAM_BIND_CARD = 'm-member-sam-bind-card',
75
75
  M_MEMBER_WATSONS_BIND_CARD = 'm-member-watsons-bind-card',
76
76
  M_SAM_CARD = 'm-sam-card',
77
77
  M_SAM_CENTER = 'm-sam-center',
78
78
  M_WATSONS_CARD = 'm-watsons-card',
79
79
 
80
80
  M_LOTTERY = 'm-lottery',
81
81
  M_COUPON = 'm-coupon',
82
82
  M_WARES = 'm-wares',
83
83
  M_FAST_SHOPPING = 'm-fast-shopping',
84
84
  M_SPECIAL_SECKILL = 'm-special-seckill',
85
85
  WEAPP_SHOP = 'weapp-shop',
86
86
  WEAPP_PROMOTION = 'weapp-promotion',
87
87
  M_VIDEOS = 'm-videos',
@@ -1 +1 @@
1
- import { isApp } from '../../utils/jm-common'
2
1
  return new Promise((resolve, reject) => {
3
2
  let platform: string = getPlatform()
4
3
  if (platform === TokenPlatform.TYPE_JDAPP) {
5
4
  ready('jmfe', 3000)
6
5
  .then(() => {
7
6
  console.log('window.jmfe已经存在:', window['jmfe'])
8
7
  import('./token.jd')
9
8
  .then((data) => {
10
9
  console.log('data:', data)
11
10
  resolve(data)
12
11
  })
13
12
  .catch((err) => {
14
13
  reject(err)
15
14
  })
16
15
  })
17
16
  .catch((e) => {
18
17
  console.log('window.jmfe不存在')
19
18
  reject(e)
20
19
  })
21
20
  }
22
21
  else if (platform === TokenPlatform.TYPE_WQ) {
23
22
  import('./token.wxapp')
24
23
  .then((data) => {
25
24
  console.log('data:', data)
26
25
  resolve(data)
27
26
  })
28
27
  .catch((err) => {
29
28
  reject(err)
30
29
  })
31
30
  } else {
32
31
  import('./token')
33
32
  .then((data) => {
34
33
  console.log('data:', data)
35
34
  resolve(data)
36
35
  })
37
36
  .catch((err) => {
38
37
  reject(err)
39
38
  })
40
39
  }
41
40
  })
42
41
  console.log(e)
43
42
  return {}
44
43
  return new Promise((resolve) => {
45
44
  loadTokenPromise
46
45
  .then((proxy: any) => {
47
46
  if (proxy?.isLogin) {
48
47
  proxy?.isLogin().then((data: boolean) => {
49
48
  resolve(data)
50
49
  })
51
50
  } else {
52
51
  resolve(false)
53
52
  }
54
53
  })
55
54
  .catch((err) => {
56
55
  resolve(false)
57
56
  })
58
57
  })
59
58
  return new Promise((resolve) => {
60
59
  loadTokenPromise
61
60
  .then((proxy: any) => {
62
61
  if (proxy?.getIsvToken) {
63
62
  proxy?.getIsvToken().then((data: string) => {
64
63
  resolve(data)
65
64
  })
66
65
  } else {
67
66
  resolve('')
68
67
  }
69
68
  })
70
69
  .catch((err) => {
71
70
  resolve('')
72
71
  })
73
72
  })
74
73
  return new Promise((resolve) => {
75
74
  loadTokenPromise
76
75
  .then((proxy: any) => {
77
76
  if (proxy?.toLogin) {
78
77
  proxy?.toLogin(options)
79
78
  resolve(true)
80
79
  } else {
81
80
  resolve(false)
82
81
  }
83
82
  })
84
83
  .catch((err) => {
85
84
  resolve(false)
86
85
  })
87
86
  })
88
87
  let platform = TokenPlatform.TYPE_M
89
88
  if (isApp('jd')) {
90
89
  platform = TokenPlatform.TYPE_JDAPP
91
90
  }
92
91
  else if (isApp('wx') && isApp('mp')) {
93
92
  platform = TokenPlatform.TYPE_WQ
94
93
  }
95
94
  return platform
96
95
  let platform = getPlatform()
97
96
  let source = platform
98
97
  if (platform === TokenPlatform.TYPE_M || platform === TokenPlatform.TYPE_WQ) {
99
98
  source = TokenPlatform.TYPE_JDAPP
100
99
  }
101
100
  return source
102
101
  return window?.page_data?.pageChannel || ''
102
+ import { isAscfApp } from '../../utils';
103
103
  return new Promise((resolve, reject) => {
104
104
  let platform: string = getPlatform();
105
105
  if (platform === TokenPlatform.TYPE_JDAPP) {
106
106
  global
107
107
  .jmfeReayPromise()
108
108
  .then(() => {
109
109
  console.log(
110
110
  'loadTokenAsync window.jmfe已经存在:',
111
111
  window?.jmfe,
112
112
  '当前版本',
113
113
  window?.jmfe?.VERSION,
114
114
  );
115
115
  import('./token.jd')
116
116
  .then((data) => {
117
117
  console.log('data:', data);
118
118
  resolve(data);
119
119
  })
120
120
  .catch((err) => {
121
121
  reject(err);
122
122
  });
123
123
  })
124
124
  .catch((e) => {
125
125
  console.log('window.jmfe不存在');
126
126
  reject(e);
127
127
  });
128
128
  }
129
129
  else if (platform === TokenPlatform.TYPE_WQ) {
130
130
  import('./token.wxapp')
131
131
  .then((data) => {
132
132
  console.log('data:', data);
133
133
  resolve(data);
134
134
  })
135
135
  .catch((err) => {
136
136
  reject(err);
137
137
  });
138
138
  } else {
139
139
  import('./token')
140
140
  .then((data) => {
141
141
  console.log('data:', data);
142
142
  resolve(data);
143
143
  })
144
144
  .catch((err) => {
145
145
  reject(err);
146
146
  });
147
147
  }
148
148
  });
149
149
  console.log(e);
150
150
  return {};
151
151
  return new Promise((resolve) => {
152
152
  loadTokenPromise
153
153
  .then((proxy: any) => {
154
154
  if (proxy?.isLogin) {
155
155
  proxy?.isLogin().then((data: boolean) => {
156
156
  resolve(data);
157
157
  });
158
158
  } else {
159
159
  resolve(false);
160
160
  }
161
161
  })
162
162
  .catch((err) => {
163
163
  console.log(err);
164
164
  resolve(false);
165
165
  });
166
166
  });
167
167
  return new Promise((resolve) => {
168
168
  loadTokenPromise
169
169
  .then((proxy: any) => {
170
170
  if (proxy?.getIsvToken) {
171
171
  proxy?.getIsvToken().then((data: string) => {
172
172
  resolve(data);
173
173
  });
174
174
  } else {
175
175
  resolve('');
176
176
  }
177
177
  })
178
178
  .catch((err) => {
179
179
  console.log(err);
180
180
  resolve('');
181
181
  });
182
182
  });
183
183
  return new Promise((resolve) => {
184
184
  loadTokenPromise
185
185
  .then((proxy: any) => {
186
186
  if (proxy?.toLogin) {
187
187
  proxy?.toLogin(options);
188
188
  resolve(true);
189
189
  } else {
190
190
  resolve(false);
191
191
  }
192
192
  })
193
193
  .catch((err) => {
194
194
  console.log(err);
195
195
  resolve(false);
196
196
  });
197
197
  });
198
198
  let platform = TokenPlatform.TYPE_M;
199
199
  if (isApp('jd')) {
200
200
  platform = TokenPlatform.TYPE_JDAPP;
201
201
  }
202
202
  else if ((isApp('wx') && isApp('mp')) || isAscfApp) {
203
203
  platform = TokenPlatform.TYPE_WQ;
204
204
  }
205
205
  return platform;
206
206
  let platform = getPlatform();
207
207
  let source = platform;
208
208
  if (platform === TokenPlatform.TYPE_M || platform === TokenPlatform.TYPE_WQ) {
209
209
  source = TokenPlatform.TYPE_JDAPP;
210
210
  }
211
211
  return source;
212
212
  return window?.page_data?.pageChannel || '';
@@ -1 +1 @@
1
- console.log('load token.jd')
2
1
  return new Promise((resolve) => {
3
2
  if (window['jmfe']) {
4
3
  window['jmfe'].isJDAppLogin().then(({ data }) => {
5
4
  if (data === '1') {
6
5
  resolve(true)
7
6
  } else if (data === '0') {
8
7
  resolve(false)
9
8
  }
10
9
  })
11
10
  } else {
12
11
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js')
13
12
  resolve(false)
14
13
  }
15
14
  })
16
15
  return requestIsvToken(window.location.href)
17
16
  if (window['jmfe']) {
18
17
  window['jmfe'].toLogin(options)
19
18
  } else {
20
19
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js')
21
20
  }
22
21
  if (window['jmfe']) {
23
22
  console.log('registerCode:', code)
24
23
  window['jmfe'].registerCode(code)
25
24
  } else {
26
25
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js')
27
26
  }
28
27
  return new Promise((resolve) => {
29
28
  console.log('requestIsvToken:', url)
30
29
  if (window['jmfe']) {
31
30
  window['jmfe']
32
31
  .requestIsvToken(url)
33
32
  .then((result: any) => {
34
33
  console.log('requestIsvToken result:' + JSON.stringify(result))
35
34
  const { status, data, msg } = result
36
35
  if (status === '0') {
37
36
  resolve(data || '')
38
37
  } else {
39
38
  resolve('')
40
39
  }
41
40
  })
42
41
  .catch((e: any) => {
43
42
  console.log('requestIsvToken error:' + JSON.stringify(e))
44
43
  resolve('')
45
44
  })
46
45
  } else {
47
46
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js')
48
47
  resolve('')
49
48
  }
50
49
  })
50
+ import { isJdAndHarmonyDevice, draBusinessCustomReport } from '../../utils/h5Utils';
51
51
  draBusinessCustomReport({
52
52
  eventName: 'business',
53
53
  errorName,
54
54
  errorMessage,
55
55
  extraData: JSON.stringify(data),
56
56
  });
57
57
  return new Promise((resolve) => {
58
58
  if (window['jmfe']) {
59
59
  window['jmfe'].isJDAppLogin().then(({ data }) => {
60
60
  if (data === '1') {
61
61
  resolve(true);
62
62
  } else if (data === '0') {
63
63
  resolve(false);
64
64
  }
65
65
  });
66
66
  } else {
67
67
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js');
68
68
  resolve(false);
69
69
  }
70
70
  });
71
71
  return requestIsvToken(window.location.href);
72
72
  if (window['jmfe']) {
73
73
  window['jmfe'].toLogin(options);
74
74
  } else {
75
75
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js');
76
76
  }
77
77
  if (window['jmfe']) {
78
78
  console.log('registerCode:', code);
79
79
  window['jmfe'].registerCode(code);
80
80
  } else {
81
81
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js');
82
82
  }
83
83
  const plugin = 'JDHybridLoginPlugin';
84
84
  const action = 'requestIsvToken';
85
85
  const params = { url };
86
86
  return jmfe.callNative(plugin, action, params);
87
87
  return new Promise((resolve) => {
88
88
  console.log('requestIsvToken:', url);
89
89
  if (window['jmfe']) {
90
90
  const jmfeVersion = window['jmfe'].VERSION || 'unknow';
91
91
  try {
92
92
  (isJdAndHarmonyDevice
93
93
  ? requestIsvTokenHarmony(url)
94
94
  : window['jmfe'].requestIsvToken(url)
95
95
  ).then((result: any) => {
96
96
  console.log('requestIsvToken result:' + JSON.stringify(result));
97
97
  const { status, data } = result;
98
98
  if (status === '0') {
99
99
  resolve(data || '');
100
100
  } else {
101
101
  resolve('');
102
102
  }
103
103
  if (!data) {
104
104
  exceptionReport({
105
105
  data: {
106
106
  desc: '调用API有返回,但token值为空',
107
107
  jmfeVersion,
108
108
  originResult: result,
109
109
  url,
110
110
  },
111
111
  });
112
112
  }
113
113
  });
114
114
  } catch (error) {
115
115
  resolve('');
116
116
  const errorInfo = {
117
117
  name: error?.name,
118
118
  message: error?.message,
119
119
  stack: error?.stack,
120
120
  };
121
121
  exceptionReport({
122
122
  data: {
123
123
  desc: '调用API发生异常',
124
124
  jmfeVersion,
125
125
  error: errorInfo,
126
126
  url,
127
127
  },
128
128
  });
129
129
  }
130
130
  } else {
131
131
  resolve('');
132
132
  exceptionReport({
133
133
  data: {
134
134
  desc: '前置依赖window.jmfe不存在',
135
135
  },
136
136
  });
137
137
  }
138
138
  });
@@ -0,0 +1 @@
1
+ import * as WXAPP_LOGIN from '../wxapp/common/login/login.js';
2
  delayShow: () => {},
1
3
  guide2Setting: () => {},
2
4
  hide: () => {},
3
5
  WXAPP_LOGIN,
4
6
  WXAPP_BIZ,
5
7
  WXAPP_USER_INFO,
6
8
  WXAPP_NAVIGATOR,
7
9
  WXAPP_REPORT_GDT,
8
10
  WXAPP_PARAMS_SIGN,
9
11
  WXAPP_FINGER_REPORT,
10
12
  WXAPP_REPORT_MANAGE,
11
13
  WXAPP_SUBS_GUIDER,
12
14
  WXAPP_ADDRESS_V2_API,
@@ -1 +1 @@
1
- import * as WXAPP_LOGIN from '../wxapp/common/login/login.js'
1
+ import * as WXAPP_LOGIN from '../wxapp/common/login/login.js';
2
2
  WXAPP_LOGIN,
3
3
  WXAPP_BIZ,
4
4
  WXAPP_USER_INFO,
5
5
  WXAPP_NAVIGATOR,
6
6
  WXAPP_REPORT_GDT,
7
7
  WXAPP_PARAMS_SIGN,
8
8
  WXAPP_FINGER_REPORT,
9
9
  WXAPP_REPORT_MANAGE,
10
10
  WXAPP_SUBS_GUIDER,
11
11
  WXAPP_ADDRESS_V2_API,
@@ -1 +1 @@
1
- import React from 'react'
2
1
  getBundleUrl,
3
2
  formatPackResult,
4
3
  getTaroVersion
5
4
  const floorLoadWay = floorData?.floorExtInfo?.floorLoadWay
6
5
  const floorKind = floorData?.floorExtInfo?.floorKind
7
6
  const isRemoteLoadFloor = floorLoadWay === 2
8
7
  const modularPackResult = floorData?.floorExtInfo?.modularPackResult
9
8
  const modularPackResultObj = formatPackResult(modularPackResult)
10
9
  const bundleUrl = getBundleUrl(modularPackResultObj)
11
10
  const taroVersion = getTaroVersion(modularPackResultObj)
12
11
  msg: `店铺h5楼层隐藏不显示。原因:模块js执行异常,楼层过滤。`,
13
12
  floorIdx: floorData?.floorIdx,
14
13
  moduleDesignerType: floorData?.floorExtInfo?.moduleDesignerType,
15
14
  floorLoadWay,
16
15
  floorKind,
17
16
  modularPackResult: {
18
17
  bundleUrl,
19
18
  taroVersion
20
19
  },
21
20
  }
22
21
  const sgmCode = isRemoteLoadFloor ? (floorKind === FLOOR_KIND.PDC_SYSTEM_MODULE ? SgmCustomCode.SYSTEMPDCMODULE_JS : SgmCustomCode.REMOTEMODULE_JS) : SgmCustomCode.SYSTEMMODULE_JS
23
22
  code: getSgmCustomCode(handleSgmCodeTaroVersion(sgmCode)),
24
23
  msg: opt,
25
24
  })
26
25
  if(this.props.customErrorIsvFloorModule){
27
26
  return this.props.customErrorIsvFloorModule
28
27
  }
28
+ import React from 'react'
29
29
  getBundleUrl,
30
30
  formatPackResult,
31
31
  getTaroVersion
32
32
  console.error("楼层组件渲染异常,异常信息:", error)
33
33
  const floorLoadWay = floorData?.floorExtInfo?.floorLoadWay
34
34
  const floorKind = floorData?.floorExtInfo?.floorKind
35
35
  const isRemoteLoadFloor = floorLoadWay === 2
36
36
  const modularPackResult = floorData?.floorExtInfo?.modularPackResult
37
37
  const modularPackResultObj = formatPackResult(modularPackResult)
38
38
  const bundleUrl = getBundleUrl(modularPackResultObj)
39
39
  const taroVersion = getTaroVersion(modularPackResultObj)
40
40
  msg: `店铺h5楼层隐藏不显示。原因:模块js执行异常,楼层过滤。`,
41
41
  floorIdx: floorData?.floorIdx,
42
42
  moduleDesignerType: floorData?.floorExtInfo?.moduleDesignerType,
43
43
  floorLoadWay,
44
44
  floorKind,
45
45
  modularPackResult: {
46
46
  bundleUrl,
47
47
  taroVersion
48
48
  },
49
49
  }
50
50
  const sgmCode = isRemoteLoadFloor ? (floorKind === FLOOR_KIND.PDC_SYSTEM_MODULE ? SgmCustomCode.SYSTEMPDCMODULE_JS : SgmCustomCode.REMOTEMODULE_JS) : SgmCustomCode.SYSTEMMODULE_JS
51
51
  errorName: getSgmCustomCode(handleSgmCodeTaroVersion(sgmCode)),
52
52
  console.info(`楼层id为${floorData?.uid}的组件渲染异常`, "楼层数据为",floorData, "是否执行过滤", updateContainerFloorListDataFn)
53
53
  if(this.props.customErrorIsvFloorModule){
54
54
  return this.props.customErrorIsvFloorModule
55
55
  }