@conecli/cone-render 0.10.1-shop3.3 → 0.10.1-shop3.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.
Files changed (82) hide show
  1. package/README.md +1 -1
  2. package/dist/api/index.ts +1 -1
  3. package/dist/common/const.ts +1 -1
  4. package/dist/common/index.h5.ts +1 -1
  5. package/dist/common/index.jd.ts +1 -1
  6. package/dist/common/index.ts +1 -1
  7. package/dist/common/index.weapp.ts +1 -1
  8. package/dist/common/jssdk.ts +1 -1
  9. package/dist/common/token/index.h5.ts +1 -1
  10. package/dist/common/token/token.jd.ts +1 -1
  11. package/dist/common/wxappApi.ts +1 -1
  12. package/dist/components/base/CommonFloorHead/index.module.scss +126 -111
  13. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  14. package/dist/components/base/CountDown/index.tsx +1 -1
  15. package/dist/components/base/CustomScrollView/index-back.tsx +1 -0
  16. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  17. package/dist/components/base/Dialog/index.module.scss +11 -0
  18. package/dist/components/base/ExposureSmart/index.h5.module.scss +12 -2
  19. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  20. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  21. package/dist/components/base/InViewRender/index.tsx +1 -1
  22. package/dist/components/base/ItemViewExposureSmart/index.module.scss +2 -2
  23. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  24. package/dist/components/base/NetworkDataError/const.ts +1 -1
  25. package/dist/components/base/NetworkDataError/index.module.scss +117 -71
  26. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  27. package/dist/components/base/Price/Base/index.module.scss +12 -0
  28. package/dist/components/base/Price/Base/index.tsx +1 -1
  29. package/dist/components/base/Price/Double/index.module.scss +6 -0
  30. package/dist/components/base/Price/Double/index.tsx +1 -1
  31. package/dist/components/debug/DebugLayout/index.module.scss +2 -2
  32. package/dist/components/floorItem.weapp.tsx +1 -1
  33. package/dist/interface/common.ts +1 -1
  34. package/dist/interface/component.ts +1 -1
  35. package/dist/interface/jumpEventReport.ts +1 -1
  36. package/dist/interface/service.ts +1 -1
  37. package/dist/jumpEventReport/base.ts +1 -1
  38. package/dist/jumpEventReport/const.ts +1 -1
  39. package/dist/jumpEventReport/index.h5.ts +1 -1
  40. package/dist/jumpEventReport/index.jd.ts +1 -1
  41. package/dist/jumpEventReport/index.weapp.ts +1 -1
  42. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  43. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  44. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  45. package/dist/jumpEventReport/web/report.ts +1 -1
  46. package/dist/jumpEventReport/web.base.ts +1 -1
  47. package/dist/jumpEventReport/web.jd.ts +1 -1
  48. package/dist/jumpEventReport/web.pc.ts +1 -1
  49. package/dist/jumpEventReport/web.tjm.ts +1 -1
  50. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  51. package/dist/language/en_US.json +176 -0
  52. package/dist/language/zh_CN.json +176 -0
  53. package/dist/language/zh_HK.json +176 -0
  54. package/dist/libs/taroAppReport.js +2 -2
  55. package/dist/modules/ContainerFloorList/index.h5.module.scss +66 -53
  56. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  57. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  58. package/dist/open/api/environment.ts +1 -1
  59. package/dist/open/api/shopMember.ts +1 -1
  60. package/dist/open/api/util.ts +1 -1
  61. package/dist/sass/app.h5.scss +273 -224
  62. package/dist/service/fetchGateway.ts +1 -1
  63. package/dist/service/fetchGateway.weapp.ts +1 -0
  64. package/dist/service/http/colorSign.ts +1 -1
  65. package/dist/service/http/const.ts +1 -1
  66. package/dist/service/http/h5Http.ts +1 -1
  67. package/dist/service/requestServer.h5.ts +1 -1
  68. package/dist/service/requestServer.ts +1 -1
  69. package/dist/service/requestServer.weapp.ts +1 -0
  70. package/dist/utils/connectNativeJsBridge.ts +1 -1
  71. package/dist/utils/h5Utils.ts +1 -1
  72. package/dist/utils/index.h5.ts +1 -1
  73. package/dist/utils/index.ts +1 -1
  74. package/dist/utils/index.weapp.ts +1 -1
  75. package/dist/utils/jumpExtMapUtil.h5.ts +1 -0
  76. package/dist/utils/jumpExtMapUtil.ts +1 -0
  77. package/dist/utils/log.ts +1 -0
  78. package/dist/utils/sColor.js +1 -0
  79. package/dist/utils/utils.ts +1 -1
  80. package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
  81. package/dist/wxapp/common/user_info.js +1 -1
  82. package/package.json +158 -141
@@ -1 +1 @@
1
- import {
2
1
  isMin,
3
2
  isJdMinAndHarmony,
4
3
  isChartH5,
5
4
  isH5AndJdShopViewH5Scroll,
6
5
  isH5AndJdShopH5CustomScrollView,
7
6
  getAvifSupport,
8
7
  getWebpSupport,
9
8
  isMemberPage,
10
9
  sgmCustomReport,
11
10
  draCustomReport,
12
11
  remoteCustomReport,
13
12
  draInterfaceCustomReport,
14
13
  draBusinessCustomReport,
15
14
  isOpenJdAppUrl,
16
15
  jdOpenAppParams,
17
16
  createJdOpenAppUrl,
18
17
  isEmpty,
19
18
  getJdAppReportPageSource,
20
19
  isPc,
21
20
  ipLoc_djd,
22
21
  dealJdOpenAppData,
23
22
  jdAppVersionCompare,
24
23
  dealNativePixelToCssPixel,
25
24
  isAppStowShop,
26
25
  isImageOptimizeEnable,
27
26
  isIpadDevice,
28
27
  getBorderStyle,
29
28
  isLanguageForEn,
30
29
  console.warn("🚗 ~~ file: index.ts:93 ~~ 通用的isInGrayscale还没有实现,不应该被调用!")
31
30
  return false
32
31
  isJdAndHarmonyDevice,
33
32
  isJdAndroidX5Core,
34
33
  isMin,
35
34
  isJdMinAndHarmony,
36
35
  isChartH5,
37
36
  isH5AndJdShopViewH5Scroll,
38
37
  isH5AndJdShopH5CustomScrollView,
39
38
  isH5AndJingGouMini,
40
39
  urlCookie,
41
40
  stopNativeScrollEvent,
42
41
  getAvifSupport,
43
42
  getWebpSupport,
44
43
  isMemberPage,
45
44
  sgmCustomReport,
46
45
  draCustomReport,
47
46
  remoteCustomReport,
48
47
  draInterfaceCustomReport,
49
48
  draBusinessCustomReport,
50
49
  isOpenJdAppUrl,
51
50
  jdOpenAppParams,
52
51
  createJdOpenAppUrl,
53
52
  isEmpty,
54
53
  isAppHomeForMarketPage,
55
54
  getJdAppReportPageSource,
56
55
  isImageOptimizeEnable,
57
56
  isPc,
58
57
  ipLoc_djd,
59
58
  isTjM,
60
59
  isTjJxM,
61
60
  isTjScence,
62
61
  isH5AdnJxMini,
63
62
  isTJApp,
64
63
  isH5AdnHaoWuJie,
65
64
  tjChannel,
66
65
  dealJdOpenAppData,
67
66
  jdAppVersionCompare,
68
67
  dealNativePixelToCssPixel,
69
68
  isAppStowShop,
70
69
  getSgmCustomCode,
71
70
  handleSgmCodeTaroVersion,
72
71
  isInGrayscale,
73
72
  isIpadDevice,
74
73
  getBorderStyle,
75
74
  isLanguageForEn,
75
+ import {
76
76
  isJdApp,
77
77
  isWxApp,
78
78
  isIosDevice,
79
79
  isAndroidDevice,
80
80
  isJdAndIosDevice,
81
81
  isJdAndAndroidDevice,
82
82
  isWxMin,
83
83
  isMin,
84
84
  isJdMinAndHarmony,
85
85
  isWxMinAndWxapp,
86
86
  isJdMin,
87
87
  isH5,
88
88
  isH5AndJdShopView,
89
89
  isChartH5,
90
90
  isH5AndJdShopViewNativeScroll,
91
91
  isH5AndJdShopViewH5Scroll,
92
92
  isH5AndJdShopH5CustomScrollView,
93
93
  isWxMiniH5View,
94
94
  sliceArrToChunkList,
95
95
  dealAddress,
96
96
  objectToUrlEncode,
97
97
  setLowSmallPicUrl,
98
98
  parseQueryUrlString,
99
99
  countStringify,
100
100
  setTaroStorage,
101
101
  getTaroStorageKeyValue,
102
102
  removeTaroStorageKey,
103
103
  clearTaroStorageKey,
104
104
  getQualityImage,
105
105
  getSystemInfos,
106
106
  getWxAppCookieStr,
107
107
  pxTransformFromData,
108
108
  dealShopContentData,
109
109
  dateFormat,
110
110
  throttle,
111
111
  lodashThrottle,
112
112
  debounce,
113
113
  addHttps,
114
114
  showSuccessToast,
115
115
  showFailToast,
116
116
  showNormalToast,
117
117
  showShopLoading,
118
118
  hideShopLoading,
119
119
  getAppChannelType,
120
120
  formatTabActiveMenuType,
121
121
  getAvifSupport,
122
122
  getWebpSupport,
123
123
  filterUrlQueryData,
124
124
  isMemberPage,
125
125
  sgmCustomReport,
126
126
  draCustomReport,
127
127
  remoteCustomReport,
128
128
  draInterfaceCustomReport,
129
129
  draBusinessCustomReport,
130
130
  draBusinessCustomLogReport,
131
131
  isOpenJdAppUrl,
132
132
  jdOpenAppParams,
133
133
  createJdOpenAppUrl,
134
134
  isEmpty,
135
135
  getJdAppReportPageSource,
136
136
  isAppClassifyPage,
137
137
  isPc,
138
138
  ipLoc_djd,
139
139
  dealJdOpenAppData,
140
140
  jdAppVersionCompare,
141
141
  dealNativePixelToCssPixel,
142
142
  isAppStowShop,
143
143
  isImageOptimizeEnable,
144
144
  isIpadDevice,
145
145
  getBorderStyle,
146
146
  isLanguageForEn,
147
147
  sColor,
148
148
  draInterfaceDSMCustomReport,
149
149
  isTabletDevice,
150
150
  isLanguageForHk,
151
151
  languageNowType,
152
152
  console.warn('暂未实现', code);
153
153
  console.warn('暂未实现', code);
154
154
  console.warn('暂未实现');
155
155
  console.warn('🚗 ~~ file: index.ts:93 ~~ 通用的isInGrayscale还没有实现,不应该被调用!');
156
156
  return false;
157
157
  isJdApp,
158
158
  isWxApp,
159
159
  isIosDevice,
160
160
  isAndroidDevice,
161
161
  isHarmonyDevice,
162
162
  isJdAndIosDevice,
163
163
  isJdAndAndroidDevice,
164
164
  isJdAndHarmonyDevice,
165
165
  isNewHarmonyShop,
166
166
  isJdAndroidX5Core,
167
167
  isWxMin,
168
168
  isMin,
169
169
  isJdMinAndHarmony,
170
170
  isWxMinAndWxapp,
171
171
  isJdMin,
172
172
  isH5,
173
173
  isH5AndJdShopView,
174
174
  isChartH5,
175
175
  isH5AndJdShopViewNativeScroll,
176
176
  isH5AndJdShopViewH5Scroll,
177
177
  isH5AndJdShopH5CustomScrollView,
178
178
  isH5AndJingGouMini,
179
179
  isWxMiniH5View,
180
180
  urlCookie,
181
181
  sliceArrToChunkList,
182
182
  dealAddress,
183
183
  objectToUrlEncode,
184
184
  parseQueryUrlString,
185
185
  setLowSmallPicUrl,
186
186
  countStringify,
187
187
  setTaroStorage,
188
188
  getTaroStorageKeyValue,
189
189
  removeTaroStorageKey,
190
190
  clearTaroStorageKey,
191
191
  getQualityImage,
192
192
  getSystemInfos,
193
193
  getWxAppCookieStr,
194
194
  pxTransformFromData,
195
195
  dealShopContentData,
196
196
  dateFormat,
197
197
  throttle,
198
198
  lodashThrottle,
199
199
  debounce,
200
200
  addHttps,
201
201
  showSuccessToast,
202
202
  showFailToast,
203
203
  showNormalToast,
204
204
  showShopLoading,
205
205
  hideShopLoading,
206
206
  stopNativeScrollEvent,
207
207
  getAppChannelType,
208
208
  formatTabActiveMenuType,
209
209
  getAvifSupport,
210
210
  getWebpSupport,
211
211
  filterUrlQueryData,
212
212
  isMemberPage,
213
213
  getFloorDataToDataDefines,
214
214
  sgmCustomReport,
215
215
  draCustomReport,
216
216
  remoteCustomReport,
217
217
  draInterfaceCustomReport,
218
218
  draBusinessCustomReport,
219
219
  draBusinessCustomLogReport,
220
220
  isOpenJdAppUrl,
221
221
  jdOpenAppParams,
222
222
  createJdOpenAppUrl,
223
223
  isEmpty,
224
224
  isAppClassifyPage,
225
225
  isAppHomeForMarketPage,
226
226
  getJdAppReportPageSource,
227
227
  isImageOptimizeEnable,
228
228
  isPc,
229
229
  ipLoc_djd,
230
230
  isTjM,
231
231
  isTjJxM,
232
232
  isTjScence,
233
233
  isH5AdnJxMini,
234
234
  isTJApp,
235
235
  isH5AdnHaoWuJie,
236
236
  tjChannel,
237
237
  dealJdOpenAppData,
238
238
  jdAppVersionCompare,
239
239
  dealNativePixelToCssPixel,
240
240
  isAppStowShop,
241
241
  getSgmCustomCode,
242
242
  handleSgmCodeTaroVersion,
243
243
  isInGrayscale,
244
244
  isIpadDevice,
245
245
  getBorderStyle,
246
246
  isLanguageForEn,
247
247
  sColor,
248
248
  draInterfaceDSMCustomReport,
249
249
  isTabletDevice,
250
250
  updateContainerWidth,
251
251
  isInJdShopView,
252
252
  isDongWebView,
253
253
  isLanguageForHk,
254
254
  languageNowType,
@@ -1 +1 @@
1
- import {
2
1
  isJdMinAndHarmony,
3
2
  isChartH5,
4
3
  isH5AndJdShopViewH5Scroll,
5
4
  isH5AndJdShopH5CustomScrollView,
6
5
  getAvifSupport,
7
6
  getWebpSupport,
8
7
  sgmCustomReport,
9
8
  draCustomReport,
10
9
  remoteCustomReport,
11
10
  draInterfaceCustomReport,
12
11
  draBusinessCustomReport,
13
12
  isOpenJdAppUrl,
14
13
  jdOpenAppParams,
15
14
  createJdOpenAppUrl,
16
15
  isEmpty,
17
16
  getJdAppReportPageSource,
18
17
  isMemberPage,
19
18
  isAppClassifyPage,
20
19
  dealJdOpenAppData,
21
20
  jdAppVersionCompare,
22
21
  dealNativePixelToCssPixel,
23
22
  isImageOptimizeEnable,
24
23
  isIpadDevice,
25
24
  getBorderStyle,
26
25
  isLanguageForEn,
27
26
  console.warn("🚗 ~~ file: index.ts:93 ~~ wxapp的isInGrayscale还没有实现,不应该被调用!")
28
27
  return false
29
28
  isJdAndHarmonyDevice,
30
29
  isJdAndroidX5Core,
31
30
  isMin,
32
31
  isJdMinAndHarmony,
33
32
  isH5AndJdShopViewH5Scroll,
34
33
  isH5AndJdShopH5CustomScrollView,
35
34
  isH5AndJingGouMini,
36
35
  urlCookie,
37
36
  stopNativeScrollEvent,
38
37
  getAvifSupport,
39
38
  getWebpSupport,
40
39
  sgmCustomReport,
41
40
  draCustomReport,
42
41
  remoteCustomReport,
43
42
  draInterfaceCustomReport,
44
43
  draBusinessCustomReport,
45
44
  isOpenJdAppUrl,
46
45
  jdOpenAppParams,
47
46
  createJdOpenAppUrl,
48
47
  isEmpty,
49
48
  getJdAppReportPageSource,
50
49
  isMemberPage,
51
50
  isAppClassifyPage,
52
51
  isAppHomeForMarketPage,
53
52
  isImageOptimizeEnable,
54
53
  isPc,
55
54
  isTjM,
56
55
  isTjJxM,
57
56
  isTjScence,
58
57
  isH5AdnJxMini,
59
58
  isTJApp,
60
59
  isH5AdnHaoWuJie,
61
60
  tjChannel,
62
61
  dealJdOpenAppData,
63
62
  jdAppVersionCompare,
64
63
  dealNativePixelToCssPixel,
65
64
  getSgmCustomCode,
66
65
  handleSgmCodeTaroVersion,
67
66
  isInGrayscale,
68
67
  isIpadDevice,
69
68
  getBorderStyle,
70
69
  isLanguageForEn,
70
+ import {
71
71
  isJdApp,
72
72
  isWxApp,
73
73
  isIosDevice,
74
74
  isAndroidDevice,
75
75
  isJdAndIosDevice,
76
76
  isJdAndAndroidDevice,
77
77
  isWxMin,
78
78
  isWxMinAndWxapp,
79
79
  isJdMin,
80
80
  isJdMinAndHarmony,
81
81
  isH5,
82
82
  isH5AndJdShopView,
83
83
  isChartH5,
84
84
  isH5AndJdShopViewNativeScroll,
85
85
  isH5AndJdShopViewH5Scroll,
86
86
  isH5AndJdShopH5CustomScrollView,
87
87
  isWxMiniH5View,
88
88
  sliceArrToChunkList,
89
89
  dealAddress,
90
90
  objectToUrlEncode,
91
91
  parseQueryUrlString,
92
92
  setLowSmallPicUrl,
93
93
  setTaroStorage,
94
94
  getTaroStorageKeyValue,
95
95
  removeTaroStorageKey,
96
96
  clearTaroStorageKey,
97
97
  getQualityImage,
98
98
  countStringify,
99
99
  getSystemInfos,
100
100
  getWxAppCookieStr,
101
101
  pxTransformFromData,
102
102
  dealShopContentData,
103
103
  dateFormat,
104
104
  throttle,
105
105
  lodashThrottle,
106
106
  debounce,
107
107
  addHttps,
108
108
  showSuccessToast,
109
109
  showFailToast,
110
110
  showNormalToast,
111
111
  showShopLoading,
112
112
  hideShopLoading,
113
113
  getAppChannelType,
114
114
  formatTabActiveMenuType,
115
115
  getAvifSupport,
116
116
  getWebpSupport,
117
117
  filterUrlQueryData,
118
118
  sgmCustomReport,
119
119
  draCustomReport,
120
120
  remoteCustomReport,
121
121
  draInterfaceCustomReport,
122
122
  draBusinessCustomReport,
123
123
  draBusinessCustomLogReport,
124
124
  isOpenJdAppUrl,
125
125
  jdOpenAppParams,
126
126
  createJdOpenAppUrl,
127
127
  isEmpty,
128
128
  getJdAppReportPageSource,
129
129
  isMemberPage,
130
130
  isAppClassifyPage,
131
131
  dealJdOpenAppData,
132
132
  jdAppVersionCompare,
133
133
  dealNativePixelToCssPixel,
134
134
  isImageOptimizeEnable,
135
135
  isIpadDevice,
136
136
  getBorderStyle,
137
137
  isLanguageForEn,
138
138
  sColor,
139
139
  draInterfaceDSMCustomReport,
140
140
  isTabletDevice,
141
141
  isLanguageForHk,
142
142
  languageNowType,
143
143
  console.warn('暂未实现', code);
144
144
  console.warn('暂未实现', code);
145
145
  console.warn('🚗 ~~ file: index.ts:93 ~~ wxapp的isInGrayscale还没有实现,不应该被调用!');
146
146
  return false;
147
147
  console.warn('暂未实现');
148
148
  isJdApp,
149
149
  isWxApp,
150
150
  isIosDevice,
151
151
  isAndroidDevice,
152
152
  isHarmonyDevice,
153
153
  isJdAndIosDevice,
154
154
  isJdAndAndroidDevice,
155
155
  isJdAndHarmonyDevice,
156
156
  isNewHarmonyShop,
157
157
  isJdAndroidX5Core,
158
158
  isWxMin,
159
159
  isWxMinAndWxapp,
160
160
  isJdMin,
161
161
  isMin,
162
162
  isJdMinAndHarmony,
163
163
  isH5,
164
164
  isH5AndJdShopView,
165
165
  isChartH5,
166
166
  isH5AndJdShopViewNativeScroll,
167
167
  isH5AndJdShopViewH5Scroll,
168
168
  isH5AndJdShopH5CustomScrollView,
169
169
  isH5AndJingGouMini,
170
170
  isWxMiniH5View,
171
171
  urlCookie,
172
172
  sliceArrToChunkList,
173
173
  dealAddress,
174
174
  objectToUrlEncode,
175
175
  parseQueryUrlString,
176
176
  setLowSmallPicUrl,
177
177
  setTaroStorage,
178
178
  getTaroStorageKeyValue,
179
179
  removeTaroStorageKey,
180
180
  clearTaroStorageKey,
181
181
  getQualityImage,
182
182
  countStringify,
183
183
  getSystemInfos,
184
184
  getWxAppCookieStr,
185
185
  pxTransformFromData,
186
186
  dealShopContentData,
187
187
  dateFormat,
188
188
  throttle,
189
189
  lodashThrottle,
190
190
  debounce,
191
191
  addHttps,
192
192
  showSuccessToast,
193
193
  showFailToast,
194
194
  showNormalToast,
195
195
  showShopLoading,
196
196
  hideShopLoading,
197
197
  stopNativeScrollEvent,
198
198
  getAppChannelType,
199
199
  formatTabActiveMenuType,
200
200
  getAvifSupport,
201
201
  getWebpSupport,
202
202
  filterUrlQueryData,
203
203
  getFloorDataToDataDefines,
204
204
  sgmCustomReport,
205
205
  draCustomReport,
206
206
  remoteCustomReport,
207
207
  draInterfaceCustomReport,
208
208
  draBusinessCustomReport,
209
209
  draBusinessCustomLogReport,
210
210
  isOpenJdAppUrl,
211
211
  jdOpenAppParams,
212
212
  createJdOpenAppUrl,
213
213
  isEmpty,
214
214
  getJdAppReportPageSource,
215
215
  isMemberPage,
216
216
  isAppClassifyPage,
217
217
  isAppHomeForMarketPage,
218
218
  isImageOptimizeEnable,
219
219
  isPc,
220
220
  ipLoc_djd,
221
221
  isTjM,
222
222
  isTjJxM,
223
223
  isTjScence,
224
224
  isH5AdnJxMini,
225
225
  isTJApp,
226
226
  isH5AdnHaoWuJie,
227
227
  tjChannel,
228
228
  dealJdOpenAppData,
229
229
  jdAppVersionCompare,
230
230
  dealNativePixelToCssPixel,
231
231
  getSgmCustomCode,
232
232
  handleSgmCodeTaroVersion,
233
233
  isInGrayscale,
234
234
  isIpadDevice,
235
235
  getBorderStyle,
236
236
  isLanguageForEn,
237
237
  sColor,
238
238
  draInterfaceDSMCustomReport,
239
239
  isTabletDevice,
240
240
  updateContainerWidth,
241
241
  isInJdShopView,
242
242
  isDongWebView,
243
243
  isLanguageForHk,
244
244
  languageNowType,
@@ -0,0 +1 @@
1
+ import { isH5, isJdAndIosDevice, isJdAndAndroidDevice } from './index';
2
  'The current environment does not support the getEnterShopJumpExtMap method call!';
1
3
  const routerURL = 'router://JDShopModule/getHomeEntranceObj';
2
4
  const callBackName = `nativeGetHomeEntranceObj${Date.now()}`;
3
5
  const params = {
4
6
  routerURL,
5
7
  routerParam: null,
6
8
  callBackName,
7
9
  };
8
10
  return new Promise((resolve) => {
9
11
  window[callBackName] = (res) => {
10
12
  const data = typeof res === 'string' ? JSON.parse(res) : res;
11
13
  const tempVal = data?.data?.jumpExtMap ?? {};
12
14
  const entranceObj = typeof tempVal === 'string' ? JSON.parse(tempVal) : tempVal;
13
15
  resolve(entranceObj);
14
16
  };
15
17
  if (isH5 && isJdAndAndroidDevice) {
16
18
  callRouterAndroid(params);
17
19
  } else if (isH5 && isJdAndIosDevice) {
18
20
  callRouterIOS(params);
19
21
  } else {
20
22
  console.warn(errorTip);
21
23
  resolve({});
22
24
  }
23
25
  });
24
26
  getEnterShopJumpExtMap()
25
27
  .then((data) => {
26
28
  hasResult = true;
27
29
  entranceObj = data;
28
30
  })
29
31
  .catch((e) => {
30
32
  console.error('requestServer.getEnterShopJumpExtMap() ~~ error:', e);
31
33
  });
32
34
  hasResult = true;
33
35
  console.warn(errorTip);
34
36
  return entranceObj;
35
37
  const { smartCouponInfo = [] } = entranceObj;
36
38
  const info = smartCouponInfo.find((item) => item.skuId === skuId + '');
37
39
  return info ? info.adInfos : null;
38
40
  return new Promise((resolve) => {
39
41
  if (hasResult) {
40
42
  resolve(entranceObj.smartCouponInfo);
41
43
  } else {
42
44
  setTimeout(() => {
43
45
  resolve(entranceObj.smartCouponInfo || null);
44
46
  }, 16);
45
47
  }
46
48
  });
@@ -0,0 +1 @@
1
+ function getEnterShopExtInfo() {
2
  console.warn("~~ getEnterShopExtInfo() ~~ 暂不支持")
1
3
  return {};
2
4
  console.warn("~~ getAdInfoBySkuId() ~~ 暂不支持")
3
5
  return null;
4
6
  console.warn("~~ getSmartCouponInfo() ~~ 暂不支持")
5
7
  return new Promise((resolve) => {
6
8
  resolve(null);
7
9
  });
@@ -0,0 +1 @@
1
+ export const timeLog = (...messages) => {
2
  const level = 'info';
1
3
  const now = new Date();
2
4
  const timestamp = now.toLocaleString('zh-CN', {
3
5
  year: 'numeric',
4
6
  month: '2-digit',
5
7
  day: '2-digit',
6
8
  hour: '2-digit',
7
9
  minute: '2-digit',
8
10
  second: '2-digit',
9
11
  hour12: false,
10
12
  });
11
13
  const milliseconds = now.getMilliseconds().toString().padStart(3, '0');
12
14
  const prefix = `[${timestamp}.${milliseconds}] `;
13
15
  const logMethods = {
14
16
  info: console.info,
15
17
  warn: console.warn,
16
18
  error: console.error,
17
19
  };
18
20
  logMethods[level](prefix, ...messages);
@@ -0,0 +1 @@
1
+ const colorDSM = 'https://api.m.jd.com/client.action?functionId=';
2
  [
1
3
  colorDSM + 'op_getGoodListByCatesIds',
2
4
  ['dsm.jshop.operations.api.inner.service.ProductJsfService.getGoodListByCatesIds', true],
3
5
  ,
4
6
  ],
5
7
  console.log('getSColorPara ~ url is:', url);
6
8
  url = colorDSM + url;
7
9
  if (isDowngradeSDM(url)) {
8
10
  return {};
9
11
  }
10
12
  return getDSMValue(url)
11
13
  ? {
12
14
  url: '/api?v=1.0&appId=IEAFE4HKEFPYCKVAUVBR&api=' + getDSMValue(url)[0],
13
15
  }
14
16
  : {};
15
17
  url = colorDSM + url;
16
18
  try {
17
19
  if (isDowngradeSDM(url)) {
18
20
  return false;
19
21
  }
20
22
  console.log('is DSM', !!getDSMValue(url));
21
23
  return !!getDSMValue(url);
22
24
  } catch (error) {
23
25
  console.log('🚀 ~ checkIsDSM ~ error:', error);
24
26
  return false;
25
27
  }
26
28
  url = colorDSM + url;
27
29
  if (isDowngradeSDM(url)) {
28
30
  return false;
29
31
  }
30
32
  console.log('is need deconstruction', getDSMValue(url) ? getDSMValue(url)[1] : false);
31
33
  return getDSMValue(url) ? getDSMValue(url)[1] : false;
32
34
  for (let [key, value] of DSM) {
33
35
  if (url.startsWith(key) && url.includes('?')) {
34
36
  return value;
35
37
  }
36
38
  if (key === url) {
37
39
  return value;
38
40
  }
39
41
  }
40
42
  return '';
41
43
  try {
42
44
  const { nodePageData } = window;
43
45
  const { DSMDowngradeList = null, routeBlackList = null } = nodePageData;
44
46
  if (
45
47
  nodePageData &&
46
48
  routeBlackList &&
47
49
  Array.isArray(routeBlackList) &&
48
50
  ((routeBlackList.length > 0 &&
49
51
  routeBlackList.some((prefix) => url.startsWith(prefix)) &&
50
52
  url.includes('?')) ||
51
53
  routeBlackList.includes(url))
52
54
  ) {
53
55
  return true;
54
56
  }
55
57
  if (DSMDowngradeList === null) return true;
56
58
  if (
57
59
  !Array.isArray(DSMDowngradeList) ||
58
60
  (DSMDowngradeList.length > 0 &&
59
61
  DSMDowngradeList.some((prefix) => url.startsWith(prefix)) &&
60
62
  url.includes('?')) ||
61
63
  DSMDowngradeList.includes(url)
62
64
  ) {
63
65
  return true;
64
66
  }
65
67
  return false;
66
68
  } catch (error) {
67
69
  console.log('🚀 ~ isDowngradeSDM ~ error:', error)
68
70
  return false;
69
71
  }
70
72
  getSColorPara: (url) => getSColorPara(url),
71
73
  checkIsNeedDeconstruction: (url) => checkIsNeedDeconstruction(url),
72
74
  checkIsDSM: (url) => checkIsDSM(url),