@conecli/cone-render 0.10.1-beta.6 → 0.10.1-beta.8

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 (65) hide show
  1. package/dist/api/index.ts +1 -1
  2. package/dist/common/const.ts +1 -1
  3. package/dist/common/index.h5.ts +1 -1
  4. package/dist/common/index.jd.ts +1 -1
  5. package/dist/common/index.ts +1 -1
  6. package/dist/common/index.weapp.ts +1 -1
  7. package/dist/common/jssdk.ts +1 -1
  8. package/dist/common/token/index.h5.ts +1 -1
  9. package/dist/common/token/token.jd.ts +1 -1
  10. package/dist/common/wxappApi.ts +1 -1
  11. package/dist/components/base/CommonFloorHead/index.module.scss +126 -111
  12. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  13. package/dist/components/base/CustomScrollView/index-back.tsx +1 -0
  14. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  15. package/dist/components/base/Dialog/index.module.scss +11 -0
  16. package/dist/components/base/ExposureSmart/index.h5.module.scss +12 -2
  17. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  18. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  19. package/dist/components/base/InViewRender/index.tsx +1 -1
  20. package/dist/components/base/ItemViewExposureSmart/index.module.scss +2 -2
  21. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  22. package/dist/components/debug/DebugLayout/index.module.scss +2 -2
  23. package/dist/components/floorItem.weapp.tsx +1 -1
  24. package/dist/interface/common.ts +1 -1
  25. package/dist/interface/jumpEventReport.ts +1 -1
  26. package/dist/interface/service.ts +1 -1
  27. package/dist/jumpEventReport/base.ts +1 -1
  28. package/dist/jumpEventReport/const.ts +1 -1
  29. package/dist/jumpEventReport/index.weapp.ts +1 -1
  30. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  31. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  32. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  33. package/dist/jumpEventReport/web/report.ts +1 -1
  34. package/dist/jumpEventReport/web.base.ts +1 -1
  35. package/dist/jumpEventReport/web.jd.ts +1 -1
  36. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  37. package/dist/libs/taroAppReport.js +2 -2
  38. package/dist/modules/ContainerFloorList/index.h5.module.scss +66 -53
  39. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  40. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  41. package/dist/open/api/environment.ts +1 -1
  42. package/dist/open/api/shopMember.ts +1 -1
  43. package/dist/open/api/util.ts +1 -1
  44. package/dist/sass/app.h5.scss +273 -224
  45. package/dist/service/fetchGateway.ts +1 -1
  46. package/dist/service/fetchGateway.weapp.ts +1 -0
  47. package/dist/service/http/colorSign.ts +1 -1
  48. package/dist/service/http/const.ts +1 -1
  49. package/dist/service/http/h5Http.ts +1 -1
  50. package/dist/service/requestServer.h5.ts +1 -1
  51. package/dist/service/requestServer.ts +1 -1
  52. package/dist/service/requestServer.weapp.ts +1 -0
  53. package/dist/utils/connectNativeJsBridge.ts +1 -1
  54. package/dist/utils/h5Utils.ts +1 -1
  55. package/dist/utils/index.h5.ts +1 -1
  56. package/dist/utils/index.ts +1 -1
  57. package/dist/utils/index.weapp.ts +1 -1
  58. package/dist/utils/jumpExtMapUtil.h5.ts +1 -0
  59. package/dist/utils/jumpExtMapUtil.ts +1 -0
  60. package/dist/utils/log.ts +1 -0
  61. package/dist/utils/sColor.js +1 -0
  62. package/dist/utils/utils.ts +1 -1
  63. package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
  64. package/dist/wxapp/common/user_info.js +1 -1
  65. 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
  isOpenJdAppUrl,
131
131
  jdOpenAppParams,
132
132
  createJdOpenAppUrl,
133
133
  isEmpty,
134
134
  getJdAppReportPageSource,
135
135
  isAppClassifyPage,
136
136
  isPc,
137
137
  ipLoc_djd,
138
138
  dealJdOpenAppData,
139
139
  jdAppVersionCompare,
140
140
  dealNativePixelToCssPixel,
141
141
  isAppStowShop,
142
142
  isImageOptimizeEnable,
143
143
  isIpadDevice,
144
144
  getBorderStyle,
145
145
  isLanguageForEn,
146
146
  sColor,
147
147
  draInterfaceDSMCustomReport,
148
148
  isTabletDevice,
149
149
  console.warn('暂未实现', code);
150
150
  console.warn('暂未实现', code);
151
151
  console.warn('暂未实现');
152
152
  console.warn('🚗 ~~ file: index.ts:93 ~~ 通用的isInGrayscale还没有实现,不应该被调用!');
153
153
  return false;
154
154
  isJdApp,
155
155
  isWxApp,
156
156
  isIosDevice,
157
157
  isAndroidDevice,
158
158
  isHarmonyDevice,
159
159
  isJdAndIosDevice,
160
160
  isJdAndAndroidDevice,
161
161
  isJdAndHarmonyDevice,
162
162
  isJdAndroidX5Core,
163
163
  isWxMin,
164
164
  isMin,
165
165
  isJdMinAndHarmony,
166
166
  isWxMinAndWxapp,
167
167
  isJdMin,
168
168
  isH5,
169
169
  isH5AndJdShopView,
170
170
  isChartH5,
171
171
  isH5AndJdShopViewNativeScroll,
172
172
  isH5AndJdShopViewH5Scroll,
173
173
  isH5AndJdShopH5CustomScrollView,
174
174
  isH5AndJingGouMini,
175
175
  isWxMiniH5View,
176
176
  urlCookie,
177
177
  sliceArrToChunkList,
178
178
  dealAddress,
179
179
  objectToUrlEncode,
180
180
  parseQueryUrlString,
181
181
  setLowSmallPicUrl,
182
182
  countStringify,
183
183
  setTaroStorage,
184
184
  getTaroStorageKeyValue,
185
185
  removeTaroStorageKey,
186
186
  clearTaroStorageKey,
187
187
  getQualityImage,
188
188
  getSystemInfos,
189
189
  getWxAppCookieStr,
190
190
  pxTransformFromData,
191
191
  dealShopContentData,
192
192
  dateFormat,
193
193
  throttle,
194
194
  lodashThrottle,
195
195
  debounce,
196
196
  addHttps,
197
197
  showSuccessToast,
198
198
  showFailToast,
199
199
  showNormalToast,
200
200
  showShopLoading,
201
201
  hideShopLoading,
202
202
  stopNativeScrollEvent,
203
203
  getAppChannelType,
204
204
  formatTabActiveMenuType,
205
205
  getAvifSupport,
206
206
  getWebpSupport,
207
207
  filterUrlQueryData,
208
208
  isMemberPage,
209
209
  getFloorDataToDataDefines,
210
210
  sgmCustomReport,
211
211
  draCustomReport,
212
212
  remoteCustomReport,
213
213
  draInterfaceCustomReport,
214
214
  draBusinessCustomReport,
215
215
  isOpenJdAppUrl,
216
216
  jdOpenAppParams,
217
217
  createJdOpenAppUrl,
218
218
  isEmpty,
219
219
  isAppClassifyPage,
220
220
  isAppHomeForMarketPage,
221
221
  getJdAppReportPageSource,
222
222
  isImageOptimizeEnable,
223
223
  isPc,
224
224
  ipLoc_djd,
225
225
  isTjM,
226
226
  isTjJxM,
227
227
  isTjScence,
228
228
  isH5AdnJxMini,
229
229
  isTJApp,
230
230
  isH5AdnHaoWuJie,
231
231
  tjChannel,
232
232
  dealJdOpenAppData,
233
233
  jdAppVersionCompare,
234
234
  dealNativePixelToCssPixel,
235
235
  isAppStowShop,
236
236
  getSgmCustomCode,
237
237
  handleSgmCodeTaroVersion,
238
238
  isInGrayscale,
239
239
  isIpadDevice,
240
240
  getBorderStyle,
241
241
  isLanguageForEn,
242
242
  sColor,
243
243
  draInterfaceDSMCustomReport,
244
244
  isTabletDevice,
245
245
  updateContainerWidth,
@@ -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
  isOpenJdAppUrl,
124
124
  jdOpenAppParams,
125
125
  createJdOpenAppUrl,
126
126
  isEmpty,
127
127
  getJdAppReportPageSource,
128
128
  isMemberPage,
129
129
  isAppClassifyPage,
130
130
  dealJdOpenAppData,
131
131
  jdAppVersionCompare,
132
132
  dealNativePixelToCssPixel,
133
133
  isImageOptimizeEnable,
134
134
  isIpadDevice,
135
135
  getBorderStyle,
136
136
  isLanguageForEn,
137
137
  sColor,
138
138
  draInterfaceDSMCustomReport,
139
139
  isTabletDevice,
140
140
  console.warn('暂未实现', code);
141
141
  console.warn('暂未实现', code);
142
142
  console.warn('🚗 ~~ file: index.ts:93 ~~ wxapp的isInGrayscale还没有实现,不应该被调用!');
143
143
  return false;
144
144
  console.warn('暂未实现');
145
145
  isJdApp,
146
146
  isWxApp,
147
147
  isIosDevice,
148
148
  isAndroidDevice,
149
149
  isHarmonyDevice,
150
150
  isJdAndIosDevice,
151
151
  isJdAndAndroidDevice,
152
152
  isJdAndHarmonyDevice,
153
153
  isJdAndroidX5Core,
154
154
  isWxMin,
155
155
  isWxMinAndWxapp,
156
156
  isJdMin,
157
157
  isMin,
158
158
  isJdMinAndHarmony,
159
159
  isH5,
160
160
  isH5AndJdShopView,
161
161
  isChartH5,
162
162
  isH5AndJdShopViewNativeScroll,
163
163
  isH5AndJdShopViewH5Scroll,
164
164
  isH5AndJdShopH5CustomScrollView,
165
165
  isH5AndJingGouMini,
166
166
  isWxMiniH5View,
167
167
  urlCookie,
168
168
  sliceArrToChunkList,
169
169
  dealAddress,
170
170
  objectToUrlEncode,
171
171
  parseQueryUrlString,
172
172
  setLowSmallPicUrl,
173
173
  setTaroStorage,
174
174
  getTaroStorageKeyValue,
175
175
  removeTaroStorageKey,
176
176
  clearTaroStorageKey,
177
177
  getQualityImage,
178
178
  countStringify,
179
179
  getSystemInfos,
180
180
  getWxAppCookieStr,
181
181
  pxTransformFromData,
182
182
  dealShopContentData,
183
183
  dateFormat,
184
184
  throttle,
185
185
  lodashThrottle,
186
186
  debounce,
187
187
  addHttps,
188
188
  showSuccessToast,
189
189
  showFailToast,
190
190
  showNormalToast,
191
191
  showShopLoading,
192
192
  hideShopLoading,
193
193
  stopNativeScrollEvent,
194
194
  getAppChannelType,
195
195
  formatTabActiveMenuType,
196
196
  getAvifSupport,
197
197
  getWebpSupport,
198
198
  filterUrlQueryData,
199
199
  getFloorDataToDataDefines,
200
200
  sgmCustomReport,
201
201
  draCustomReport,
202
202
  remoteCustomReport,
203
203
  draInterfaceCustomReport,
204
204
  draBusinessCustomReport,
205
205
  isOpenJdAppUrl,
206
206
  jdOpenAppParams,
207
207
  createJdOpenAppUrl,
208
208
  isEmpty,
209
209
  getJdAppReportPageSource,
210
210
  isMemberPage,
211
211
  isAppClassifyPage,
212
212
  isAppHomeForMarketPage,
213
213
  isImageOptimizeEnable,
214
214
  isPc,
215
215
  ipLoc_djd,
216
216
  isTjM,
217
217
  isTjJxM,
218
218
  isTjScence,
219
219
  isH5AdnJxMini,
220
220
  isTJApp,
221
221
  isH5AdnHaoWuJie,
222
222
  tjChannel,
223
223
  dealJdOpenAppData,
224
224
  jdAppVersionCompare,
225
225
  dealNativePixelToCssPixel,
226
226
  getSgmCustomCode,
227
227
  handleSgmCodeTaroVersion,
228
228
  isInGrayscale,
229
229
  isIpadDevice,
230
230
  getBorderStyle,
231
231
  isLanguageForEn,
232
232
  sColor,
233
233
  draInterfaceDSMCustomReport,
234
234
  isTabletDevice,
235
235
  updateContainerWidth,
@@ -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),