@conecli/cone-render 0.8.42 → 0.8.44

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 (34) hide show
  1. package/dist/common/const.ts +1 -1
  2. package/dist/common/index.h5.ts +1 -1
  3. package/dist/common/index.weapp.ts +1 -1
  4. package/dist/common/sgmCustomCode.ts +1 -1
  5. package/dist/components/ErrorBoundary.tsx +1 -1
  6. package/dist/components/base/CustomVideo/index.tsx +1 -1
  7. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  8. package/dist/components/base/MobileCommonHeader/index.tsx +1 -1
  9. package/dist/components/base/NetworkDataError/index.module.scss +3 -0
  10. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  11. package/dist/components/remoteFloorItem.tsx +1 -1
  12. package/dist/interface/component.ts +1 -1
  13. package/dist/jumpEventReport/base.ts +1 -1
  14. package/dist/jumpEventReport/const.ts +1 -1
  15. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  16. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  17. package/dist/jumpEventReport/web.base.ts +1 -1
  18. package/dist/jumpEventReport/web.jd.ts +1 -1
  19. package/dist/modules/ContainerFloorList/index.h5.module.scss +1 -0
  20. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  21. package/dist/open/api/request.ts +1 -1
  22. package/dist/open/api/shopMember.ts +1 -1
  23. package/dist/open/components/index.ts +1 -1
  24. package/dist/sass/app.h5.scss +5 -0
  25. package/dist/service/requestServer.ts +1 -1
  26. package/dist/utils/connectNativeJsBridge.ts +1 -1
  27. package/dist/utils/h5Utils.ts +1 -1
  28. package/dist/utils/index.h5.ts +1 -1
  29. package/dist/utils/index.ts +1 -1
  30. package/dist/utils/index.weapp.ts +1 -1
  31. package/dist/utils/sgmCodeUtils.ts +1 -1
  32. package/dist/utils/taroRenderUtil.ts +1 -1
  33. package/dist/utils/utils.ts +1 -1
  34. package/package.json +1 -1
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  nativePageShowToast,
3
2
  ToastAndroidType,
4
3
  ToastIosType,
5
4
  getAppChannelType,
6
5
  isAndroidDevice,
7
6
  isH5AndJdShopView,
8
7
  isChartH5,
9
8
  isH5AndJdShopViewNativeScroll,
10
9
  isIosDevice,
11
10
  isJdAndAndroidDevice,
12
11
  isJdAndIosDevice,
13
12
  isJdAndHarmonyDevice,
14
13
  isJdApp,
15
14
  isWxApp,
16
15
  isWxMiniH5View,
17
16
  isH5AndJingGouMini,
18
17
  urlCookie,
19
18
  sgmCustomReport,
20
19
  isMemberPage,
21
20
  isH5AndJdShopViewH5Scroll,
22
21
  isH5AndJdShopH5CustomScrollView,
23
22
  isAppClassifyPage,
24
23
  isPc,
25
24
  ipLoc_djd,
26
25
  jdAppVersionCompare,
27
26
  dealNativePixelToCssPixel,
28
27
  isAppStowShop,
29
28
  isJdAndroidX5Core,
30
29
  isTjScence,
31
30
  isH5AdnJxMini,
32
31
  isTjM,
33
32
  isTjJxM,
34
33
  isTJApp,
35
34
  isH5AdnHaoWuJie,
36
35
  tjChannel,
37
36
  parseQueryUrlObj,
38
37
  addHttps,
39
38
  clearTaroStorageKey,
40
39
  countStringify,
41
40
  dateFormat,
42
41
  dealAddress,
43
42
  dealShopContentData as originDealShopContentData,
44
43
  debounce,
45
44
  filterUrlQueryData,
46
45
  formatTabActiveMenuType,
47
46
  getAvifSupport,
48
47
  getWebpSupport,
49
48
  getTaroStorageKeyValue,
50
49
  getWxAppCookieStr,
51
50
  isH5,
52
51
  isMin,
53
52
  isJdMin,
54
53
  isWxMin,
55
54
  isWxMinAndWxapp,
56
55
  isJdMinAndHarmony,
57
56
  lodashThrottle,
58
57
  objectToUrlEncode,
59
58
  parseQueryUrlString,
60
59
  removeTaroStorageKey,
61
60
  setLowSmallPicUrl,
62
61
  setTaroStorage,
63
62
  showFailToast,
64
63
  showNormalToast,
65
64
  showSuccessToast,
66
65
  sliceArrToChunkList,
67
66
  throttle,
68
67
  getQualityImageNew,
69
68
  getQualityImageOld,
70
69
  isOpenJdAppUrl,
71
70
  jdOpenAppParams,
72
71
  createJdOpenAppUrl,
73
72
  isEmpty,
74
73
  getJdAppReportPageSource,
75
74
  dealJdOpenAppData,
76
75
  const getNum = Number(num)
77
76
  let _changeLayoutWidth = layoutWidth
78
77
  if (!_changeLayoutWidth) {
79
78
  _changeLayoutWidth =
80
79
  _ShopSystemInfo && _ShopSystemInfo?.windowWidth
81
80
  ? _ShopSystemInfo.windowWidth
82
81
  : Taro.getSystemInfoSync()?.windowWidth
83
82
  }
84
83
  return Math.round((getNum / widthSize) * _changeLayoutWidth)
85
84
  changeSize,
86
85
  designWidth = 750,
87
86
  systemInfo,
88
87
  const getRootFontSize =
89
88
  (40 * (systemInfo?.windowWidth ?? _ShopSystemInfo.windowWidth)) / 750
90
89
  const getRealRootFontSize =
91
90
  getRootFontSize > 40 ? 40 : getRootFontSize < 20 ? 20 : getRootFontSize
92
91
  return Math.ceil(
93
92
  (((parseInt(String(changeSize), 10) / 40) * 750) / designWidth) *
94
93
  getRealRootFontSize,
95
94
  )
96
95
  console.log(
97
96
  '获取系统宽度systemInfo?.windowWidth',
98
97
  systemInfo?.windowWidth,
99
98
  'taroToTransformRoutimePXNumber(changeWidth)',
100
99
  taroToTransformRoutimePXNumber(changeWidth, 750, systemInfo),
101
100
  )
102
101
  return buildType === BUILD_TYPE.CLASSIFY && systemInfo?.windowWidth
103
102
  ? systemInfo?.windowWidth -
104
103
  taroToTransformRoutimePXNumber(changeWidth, 750, systemInfo)
105
104
  : systemInfo?.windowWidth ?? 0
106
105
  const systemInfo = Taro.getSystemInfoSync()
107
106
  if (params && params?.pageWidth && params?.pageHeight) {
108
107
  systemInfo.windowWidth = params?.pageWidth
109
108
  systemInfo.windowHeight = params?.pageHeight
110
109
  }
111
110
  systemInfo['containerWidth'] = getContainerWidth(buildType, systemInfo)
112
111
  console.warn('====获取系统信息=====', systemInfo)
113
112
  return systemInfo
114
113
  const appVersionCheckPass = jdAppVersionCompare(MPAAS_CONFIG_APP_VERSION) >= 0
115
114
  const supportBuildType = /app-view|app-member|app-classify|member-home/
116
115
  const scopeCheckPass = supportBuildType.test(buildType || '')
117
116
  const enableAvifOptimize = appVersionCheckPass && scopeCheckPass
118
117
  if(enableAvifOptimize){
119
118
  const configData = global.getDynamicConfig('avifSwitch')
120
119
  if(!hasOutputLog){
121
120
  console.warn("🚗 ~~ file: utils.ts:187 ~~ isImageOptimizeEnable ~~ enableAvifOptimize:", enableAvifOptimize, ' appVersionCheckPass:', appVersionCheckPass, ' scopeCheckPass:', scopeCheckPass)
122
121
  console.warn("🚗 ~~ file: utils.ts:188 ~~ global.getDynamicConfig ~~ configData:", configData)
123
122
  }
124
123
  const { globalOn = true, ignoreOptimizeFromServer = false, page = {}, whiteList = [], blackList = [] } = configData || {}
125
124
  const {shopId = '0', venderId = '0'} = parseQueryUrlObj
126
125
  let imageEnableResult = true
127
126
  isIgnoreOptimizeFromServer = ignoreOptimizeFromServer
128
127
  if (blackList.find(item => item.sId === Number(shopId) || item.vId === Number(venderId))){
129
128
  imageEnableResult = false
130
129
  if(!hasOutputLog){
131
130
  console.warn("🚗 ~~ file: utils.ts:198 命中黑名单!")
132
131
  }
133
132
  }else if(whiteList.find(item => item.sId === Number(shopId) || item.vId === Number(venderId))){
134
133
  imageEnableResult = true
135
134
  if(!hasOutputLog){
136
135
  console.warn("🚗 ~~ file: utils.ts:205 命中白名单!")
137
136
  }
138
137
  }else{
139
138
  imageEnableResult = globalOn === true || page[buildType] === true
140
139
  if(!hasOutputLog){
141
140
  console.warn("🚗 ~~ file: utils.ts:211 走全局开关+页面开关控制逻辑,开关结果:", imageEnableResult)
142
141
  }
143
142
  }
144
143
  if(!hasOutputLog){
145
144
  hasOutputLog = true
146
145
  }
147
146
  return imageEnableResult
148
147
  }else{
149
148
  return false
150
149
  }
151
150
  if(typeof options === 'object' && isImageOptimizeEnable()){
152
151
  return getQualityImageNew(imgUrl, options, isIgnoreOptimizeFromServer)
153
152
  }else{
154
153
  return getQualityImageOld(imgUrl, options)
155
154
  }
156
155
  const getSystemInfo = getSystemAndContainerWidthInfo(params) || {
157
156
  windowWidth: window.innerWidth,
158
157
  containerWidth: getContainerWidth(buildType, {
159
158
  windowWidth: window.innerWidth,
160
159
  }),
161
160
  screenWidth: window.innerWidth,
162
161
  platform: '',
163
162
  model: '',
164
163
  system: '',
165
164
  }
166
165
  if (isJdApp && isAndroidDevice && getSystemInfo.windowWidth <= 0) {
167
166
  getSystemInfo.windowWidth = getSystemInfo.screenWidth
168
167
  getSystemInfo['containerWidth'] = getContainerWidth(
169
168
  buildType,
170
169
  getSystemInfo,
171
170
  )
172
171
  }
173
172
  return getSystemInfo
174
173
  const params = Object.assign(
175
174
  {},
176
175
  {
177
176
  title: '',
178
177
  duration: 1500,
179
178
  },
180
179
  options,
181
180
  )
182
181
  params.duration = params.duration / 1000
183
182
  if (isJdApp) {
184
183
  const showSuccessType = isIosDevice
185
184
  ? ToastIosType.SUCCESS
186
185
  : ToastAndroidType.SUCCESS
187
186
  const duration = isAndroidDevice ? 0 : params.duration
188
187
  nativePageShowToast(options.title, showSuccessType, duration)
189
188
  console.log('执行原生toast success')
190
189
  } else {
191
190
  showSuccessToast(options)
192
191
  }
193
192
  const params = Object.assign(
194
193
  {},
195
194
  {
196
195
  title: '',
197
196
  duration: 1500,
198
197
  },
199
198
  options,
200
199
  )
201
200
  params.duration = params.duration / 1000
202
201
  if (isJdApp) {
203
202
  const showSuccessType = isIosDevice
204
203
  ? ToastIosType.FAIL
205
204
  : ToastAndroidType.FAIL
206
205
  const duration = isAndroidDevice ? 0 : params.duration
207
206
  nativePageShowToast(options.title, showSuccessType, duration)
208
207
  console.log('执行原生toast fail')
209
208
  } else {
210
209
  console.log('执行H5 toast fail')
211
210
  showFailToast(options)
212
211
  }
213
212
  const params = Object.assign(
214
213
  {},
215
214
  {
216
215
  title: '',
217
216
  duration: 1500,
218
217
  },
219
218
  options,
220
219
  )
221
220
  params.duration = params.duration / 1000
222
221
  if (isJdApp) {
223
222
  const showSuccessType = isIosDevice
224
223
  ? ToastIosType.NORMAL
225
224
  : ToastAndroidType.NORMAL
226
225
  const duration = isAndroidDevice ? 0 : params.duration
227
226
  nativePageShowToast(options.title, showSuccessType, duration)
228
227
  } else {
229
228
  showNormalToast(options)
230
229
  }
231
230
  const createLoadingEle = document.createElement('div')
232
231
  createLoadingEle.id = 'J_shopLoading'
233
232
  createLoadingEle.className = `d-shop-loading flexible-center-box ${customClassName}`
234
233
  createLoadingEle.innerHTML = `<div class='d-loading-content'>
235
234
  <span class='d-shop-loading-icon'></span>
236
235
  <p class='d-shop-text'>${text}</p>
237
236
  </div>`
238
237
  const getEle = document.body
239
238
  ? document.body
240
239
  : document.getElementsByTagName('body')[0]
241
240
  getEle.appendChild(createLoadingEle)
242
241
  const getEle = document.getElementById('J_shopLoading')
243
242
  getEle && getEle.remove()
244
243
  const systemInfo: UtilsInterFace.taroGetSystemInfoSyncRes = getReviseSystemInfo(
245
244
  params,
246
245
  )
247
246
  if (!systemInfo.system && window) {
248
247
  systemInfo.system = window.navigator.userAgent
249
248
  systemInfo.isChrome = !!systemInfo?.system.match(/chrome/i)
250
249
  }
251
250
  const isIOS = !!systemInfo?.system.match(/ios/i)
252
251
  const isAndroid = !!systemInfo?.system.match(/android/i)
253
252
  systemInfo.navBarHeight = 0
254
253
  systemInfo.statusBarHeight = 0
255
254
  systemInfo.capsulePosition = null
256
255
  systemInfo.isIOS = isIOS
257
256
  systemInfo.isAndroid = isAndroid
258
257
  _ShopSystemInfo = systemInfo
259
258
  return systemInfo
260
259
  return originDealShopContentData(pageData, sgmCustomReport, isvdev)
261
260
  isJdApp,
262
261
  isWxApp,
263
262
  isIosDevice,
264
263
  isAndroidDevice,
265
264
  isJdAndIosDevice,
266
265
  isJdAndAndroidDevice,
267
266
  isJdAndHarmonyDevice,
268
267
  isJdAndroidX5Core,
269
268
  isMin,
270
269
  isWxMin,
271
270
  isWxMinAndWxapp,
272
271
  isJdMinAndHarmony,
273
272
  isJdMin,
274
273
  isH5,
275
274
  isH5AndJdShopView,
276
275
  isChartH5,
277
276
  isH5AndJdShopViewNativeScroll,
278
277
  isH5AndJdShopViewH5Scroll,
279
278
  isH5AndJdShopH5CustomScrollView,
280
279
  isH5AndJingGouMini,
281
280
  isWxMiniH5View,
282
281
  urlCookie,
283
282
  sliceArrToChunkList,
284
283
  dealAddress,
285
284
  objectToUrlEncode,
286
285
  parseQueryUrlString,
287
286
  setLowSmallPicUrl,
288
287
  setTaroStorage,
289
288
  getTaroStorageKeyValue,
290
289
  removeTaroStorageKey,
291
290
  clearTaroStorageKey,
292
291
  getAvifSupport,
293
292
  getWebpSupport,
294
293
  getQualityImage,
295
294
  countStringify,
296
295
  getWxAppCookieStr,
297
296
  getSystemInfos,
298
297
  pxTransformFromData,
299
298
  dealShopContentDataAndReport as dealShopContentData,
300
299
  dateFormat,
301
300
  throttle,
302
301
  lodashThrottle,
303
302
  debounce,
304
303
  addHttps,
305
304
  commonShowSuccessToast as showSuccessToast,
306
305
  commonShowFailToast as showFailToast,
307
306
  commonShowNormalToast as showNormalToast,
308
307
  showShopLoading,
309
308
  hideShopLoading,
310
309
  getAppChannelType,
311
310
  formatTabActiveMenuType,
312
311
  filterUrlQueryData,
313
312
  sgmCustomReport,
314
313
  isMemberPage,
315
314
  getFloorDataToDataDefines,
316
315
  isOpenJdAppUrl,
317
316
  jdOpenAppParams,
318
317
  createJdOpenAppUrl,
319
318
  isEmpty,
320
319
  getJdAppReportPageSource,
321
320
  isAppClassifyPage,
322
321
  isImageOptimizeEnable,
323
322
  isPc,
324
323
  ipLoc_djd,
325
324
  isTjScence,
326
325
  isH5AdnJxMini,
327
326
  isTjM,
328
327
  isTjJxM,
329
328
  isTJApp,
330
329
  isH5AdnHaoWuJie,
331
330
  tjChannel,
332
331
  dealJdOpenAppData,
333
332
  jdAppVersionCompare,
334
333
  dealNativePixelToCssPixel,
335
334
  isAppStowShop,
336
335
  getSgmCustomCode
336
+ import Taro from '@tarojs/taro'
337
337
  nativePageShowToast,
338
338
  ToastAndroidType,
339
339
  ToastIosType,
340
340
  getAppChannelType,
341
341
  isAndroidDevice,
342
342
  isH5AndJdShopView,
343
343
  isChartH5,
344
344
  isH5AndJdShopViewNativeScroll,
345
345
  isIosDevice,
346
346
  isJdAndAndroidDevice,
347
347
  isJdAndIosDevice,
348
348
  isJdAndHarmonyDevice,
349
349
  isJdApp,
350
350
  isWxApp,
351
351
  isWxMiniH5View,
352
352
  isH5AndJingGouMini,
353
353
  urlCookie,
354
354
  sgmCustomReport,
355
355
  isMemberPage,
356
356
  isH5AndJdShopViewH5Scroll,
357
357
  isH5AndJdShopH5CustomScrollView,
358
358
  isAppClassifyPage,
359
359
  isAppHomeForMarketPage,
360
360
  isPc,
361
361
  ipLoc_djd,
362
362
  jdAppVersionCompare,
363
363
  dealNativePixelToCssPixel,
364
364
  isAppStowShop,
365
365
  isJdAndroidX5Core,
366
366
  isTjScence,
367
367
  isH5AdnJxMini,
368
368
  isTjM,
369
369
  isTjJxM,
370
370
  isTJApp,
371
371
  isH5AdnHaoWuJie,
372
372
  tjChannel,
373
373
  parseQueryUrlObj,
374
374
  addHttps,
375
375
  clearTaroStorageKey,
376
376
  countStringify,
377
377
  dateFormat,
378
378
  dealAddress,
379
379
  dealShopContentData as originDealShopContentData,
380
380
  debounce,
381
381
  filterUrlQueryData,
382
382
  formatTabActiveMenuType,
383
383
  getAvifSupport,
384
384
  getWebpSupport,
385
385
  getTaroStorageKeyValue,
386
386
  getWxAppCookieStr,
387
387
  isH5,
388
388
  isMin,
389
389
  isJdMin,
390
390
  isWxMin,
391
391
  isWxMinAndWxapp,
392
392
  isJdMinAndHarmony,
393
393
  lodashThrottle,
394
394
  objectToUrlEncode,
395
395
  parseQueryUrlString,
396
396
  removeTaroStorageKey,
397
397
  setLowSmallPicUrl,
398
398
  setTaroStorage,
399
399
  showFailToast,
400
400
  showNormalToast,
401
401
  showSuccessToast,
402
402
  sliceArrToChunkList,
403
403
  throttle,
404
404
  getQualityImageNew,
405
405
  getQualityImageOld,
406
406
  isOpenJdAppUrl,
407
407
  jdOpenAppParams,
408
408
  createJdOpenAppUrl,
409
409
  isEmpty,
410
410
  getJdAppReportPageSource,
411
411
  dealJdOpenAppData,
412
412
  const getNum = Number(num)
413
413
  let _changeLayoutWidth = layoutWidth
414
414
  if (!_changeLayoutWidth) {
415
415
  _changeLayoutWidth =
416
416
  _ShopSystemInfo && _ShopSystemInfo?.windowWidth
417
417
  ? _ShopSystemInfo.windowWidth
418
418
  : Taro.getSystemInfoSync()?.windowWidth
419
419
  }
420
420
  return Math.round((getNum / widthSize) * _changeLayoutWidth)
421
421
  changeSize,
422
422
  designWidth = 750,
423
423
  systemInfo,
424
424
  const getRootFontSize =
425
425
  (40 * (systemInfo?.windowWidth ?? _ShopSystemInfo.windowWidth)) / 750
426
426
  const getRealRootFontSize =
427
427
  getRootFontSize > 40 ? 40 : getRootFontSize < 20 ? 20 : getRootFontSize
428
428
  return Math.ceil(
429
429
  (((parseInt(String(changeSize), 10) / 40) * 750) / designWidth) *
430
430
  getRealRootFontSize,
431
431
  )
432
432
  console.log(
433
433
  '获取系统宽度systemInfo?.windowWidth',
434
434
  systemInfo?.windowWidth,
435
435
  'taroToTransformRoutimePXNumber(changeWidth)',
436
436
  taroToTransformRoutimePXNumber(changeWidth, 750, systemInfo),
437
437
  )
438
438
  return buildType === BUILD_TYPE.CLASSIFY && systemInfo?.windowWidth
439
439
  ? systemInfo?.windowWidth -
440
440
  taroToTransformRoutimePXNumber(changeWidth, 750, systemInfo)
441
441
  : systemInfo?.windowWidth ?? 0
442
442
  const systemInfo = Taro.getSystemInfoSync()
443
443
  if (params && params?.pageWidth && params?.pageHeight) {
444
444
  systemInfo.windowWidth = params?.pageWidth
445
445
  systemInfo.windowHeight = params?.pageHeight
446
446
  }
447
447
  systemInfo['containerWidth'] = getContainerWidth(buildType, systemInfo)
448
448
  console.warn('====获取系统信息=====', systemInfo)
449
449
  return systemInfo
450
450
  const appVersionCheckPass = jdAppVersionCompare(MPAAS_CONFIG_APP_VERSION) >= 0
451
451
  const supportBuildType = /app-view|app-member|app-classify|member-home/
452
452
  const scopeCheckPass = supportBuildType.test(buildType || '')
453
453
  const enableAvifOptimize = appVersionCheckPass && scopeCheckPass
454
454
  if(enableAvifOptimize){
455
455
  const configData = global.getDynamicConfig('avifSwitch')
456
456
  if(!hasOutputLog){
457
457
  console.warn("🚗 ~~ file: utils.ts:187 ~~ isImageOptimizeEnable ~~ enableAvifOptimize:", enableAvifOptimize, ' appVersionCheckPass:', appVersionCheckPass, ' scopeCheckPass:', scopeCheckPass)
458
458
  console.warn("🚗 ~~ file: utils.ts:188 ~~ global.getDynamicConfig ~~ configData:", configData)
459
459
  }
460
460
  const { globalOn = true, ignoreOptimizeFromServer = false, page = {}, whiteList = [], blackList = [] } = configData || {}
461
461
  const {shopId = '0', venderId = '0'} = parseQueryUrlObj
462
462
  let imageEnableResult = true
463
463
  isIgnoreOptimizeFromServer = ignoreOptimizeFromServer
464
464
  if (blackList.find(item => item.sId === Number(shopId) || item.vId === Number(venderId))){
465
465
  imageEnableResult = false
466
466
  if(!hasOutputLog){
467
467
  console.warn("🚗 ~~ file: utils.ts:198 命中黑名单!")
468
468
  }
469
469
  }else if(whiteList.find(item => item.sId === Number(shopId) || item.vId === Number(venderId))){
470
470
  imageEnableResult = true
471
471
  if(!hasOutputLog){
472
472
  console.warn("🚗 ~~ file: utils.ts:205 命中白名单!")
473
473
  }
474
474
  }else{
475
475
  imageEnableResult = globalOn === true || page[buildType] === true
476
476
  if(!hasOutputLog){
477
477
  console.warn("🚗 ~~ file: utils.ts:211 走全局开关+页面开关控制逻辑,开关结果:", imageEnableResult)
478
478
  }
479
479
  }
480
480
  if(!hasOutputLog){
481
481
  hasOutputLog = true
482
482
  }
483
483
  return imageEnableResult
484
484
  }else{
485
485
  return false
486
486
  }
487
487
  if(typeof options === 'object' && isImageOptimizeEnable()){
488
488
  return getQualityImageNew(imgUrl, options, isIgnoreOptimizeFromServer)
489
489
  }else{
490
490
  return getQualityImageOld(imgUrl, options)
491
491
  }
492
492
  const getSystemInfo = getSystemAndContainerWidthInfo(params) || {
493
493
  windowWidth: window.innerWidth,
494
494
  containerWidth: getContainerWidth(buildType, {
495
495
  windowWidth: window.innerWidth,
496
496
  }),
497
497
  screenWidth: window.innerWidth,
498
498
  platform: '',
499
499
  model: '',
500
500
  system: '',
501
501
  }
502
502
  if (isJdApp && isAndroidDevice && getSystemInfo.windowWidth <= 0) {
503
503
  getSystemInfo.windowWidth = getSystemInfo.screenWidth
504
504
  getSystemInfo['containerWidth'] = getContainerWidth(
505
505
  buildType,
506
506
  getSystemInfo,
507
507
  )
508
508
  }
509
509
  return getSystemInfo
510
510
  const params = Object.assign(
511
511
  {},
512
512
  {
513
513
  title: '',
514
514
  duration: 1500,
515
515
  },
516
516
  options,
517
517
  )
518
518
  params.duration = params.duration / 1000
519
519
  if (isJdApp) {
520
520
  const showSuccessType = isIosDevice
521
521
  ? ToastIosType.SUCCESS
522
522
  : ToastAndroidType.SUCCESS
523
523
  const duration = isAndroidDevice ? 0 : params.duration
524
524
  nativePageShowToast(options.title, showSuccessType, duration)
525
525
  console.log('执行原生toast success')
526
526
  } else {
527
527
  showSuccessToast(options)
528
528
  }
529
529
  const params = Object.assign(
530
530
  {},
531
531
  {
532
532
  title: '',
533
533
  duration: 1500,
534
534
  },
535
535
  options,
536
536
  )
537
537
  params.duration = params.duration / 1000
538
538
  if (isJdApp) {
539
539
  const showSuccessType = isIosDevice
540
540
  ? ToastIosType.FAIL
541
541
  : ToastAndroidType.FAIL
542
542
  const duration = isAndroidDevice ? 0 : params.duration
543
543
  nativePageShowToast(options.title, showSuccessType, duration)
544
544
  console.log('执行原生toast fail')
545
545
  } else {
546
546
  console.log('执行H5 toast fail')
547
547
  showFailToast(options)
548
548
  }
549
549
  const params = Object.assign(
550
550
  {},
551
551
  {
552
552
  title: '',
553
553
  duration: 1500,
554
554
  },
555
555
  options,
556
556
  )
557
557
  params.duration = params.duration / 1000
558
558
  if (isJdApp) {
559
559
  const showSuccessType = isIosDevice
560
560
  ? ToastIosType.NORMAL
561
561
  : ToastAndroidType.NORMAL
562
562
  const duration = isAndroidDevice ? 0 : params.duration
563
563
  nativePageShowToast(options.title, showSuccessType, duration)
564
564
  } else {
565
565
  showNormalToast(options)
566
566
  }
567
567
  const createLoadingEle = document.createElement('div')
568
568
  createLoadingEle.id = 'J_shopLoading'
569
569
  createLoadingEle.className = `d-shop-loading flexible-center-box ${customClassName}`
570
570
  createLoadingEle.innerHTML = `<div class='d-loading-content'>
571
571
  <span class='d-shop-loading-icon'></span>
572
572
  <p class='d-shop-text'>${text}</p>
573
573
  </div>`
574
574
  const getEle = document.body
575
575
  ? document.body
576
576
  : document.getElementsByTagName('body')[0]
577
577
  getEle.appendChild(createLoadingEle)
578
578
  const getEle = document.getElementById('J_shopLoading')
579
579
  getEle && getEle.remove()
580
580
  const systemInfo: UtilsInterFace.taroGetSystemInfoSyncRes = getReviseSystemInfo(
581
581
  params,
582
582
  )
583
583
  if (!systemInfo.system && window) {
584
584
  systemInfo.system = window.navigator.userAgent
585
585
  systemInfo.isChrome = !!systemInfo?.system.match(/chrome/i)
586
586
  }
587
587
  const isIOS = !!systemInfo?.system.match(/ios/i)
588
588
  const isAndroid = !!systemInfo?.system.match(/android/i)
589
589
  systemInfo.navBarHeight = 0
590
590
  systemInfo.statusBarHeight = 0
591
591
  systemInfo.capsulePosition = null
592
592
  systemInfo.isIOS = isIOS
593
593
  systemInfo.isAndroid = isAndroid
594
594
  _ShopSystemInfo = systemInfo
595
595
  return systemInfo
596
596
  return originDealShopContentData(pageData, sgmCustomReport, isvdev)
597
597
  isJdApp,
598
598
  isWxApp,
599
599
  isIosDevice,
600
600
  isAndroidDevice,
601
601
  isJdAndIosDevice,
602
602
  isJdAndAndroidDevice,
603
603
  isJdAndHarmonyDevice,
604
604
  isJdAndroidX5Core,
605
605
  isMin,
606
606
  isWxMin,
607
607
  isWxMinAndWxapp,
608
608
  isJdMinAndHarmony,
609
609
  isJdMin,
610
610
  isH5,
611
611
  isH5AndJdShopView,
612
612
  isChartH5,
613
613
  isH5AndJdShopViewNativeScroll,
614
614
  isH5AndJdShopViewH5Scroll,
615
615
  isH5AndJdShopH5CustomScrollView,
616
616
  isH5AndJingGouMini,
617
617
  isWxMiniH5View,
618
618
  urlCookie,
619
619
  sliceArrToChunkList,
620
620
  dealAddress,
621
621
  objectToUrlEncode,
622
622
  parseQueryUrlString,
623
623
  setLowSmallPicUrl,
624
624
  setTaroStorage,
625
625
  getTaroStorageKeyValue,
626
626
  removeTaroStorageKey,
627
627
  clearTaroStorageKey,
628
628
  getAvifSupport,
629
629
  getWebpSupport,
630
630
  getQualityImage,
631
631
  countStringify,
632
632
  getWxAppCookieStr,
633
633
  getSystemInfos,
634
634
  pxTransformFromData,
635
635
  dealShopContentDataAndReport as dealShopContentData,
636
636
  dateFormat,
637
637
  throttle,
638
638
  lodashThrottle,
639
639
  debounce,
640
640
  addHttps,
641
641
  commonShowSuccessToast as showSuccessToast,
642
642
  commonShowFailToast as showFailToast,
643
643
  commonShowNormalToast as showNormalToast,
644
644
  showShopLoading,
645
645
  hideShopLoading,
646
646
  getAppChannelType,
647
647
  formatTabActiveMenuType,
648
648
  filterUrlQueryData,
649
649
  sgmCustomReport,
650
650
  isMemberPage,
651
651
  getFloorDataToDataDefines,
652
652
  isOpenJdAppUrl,
653
653
  jdOpenAppParams,
654
654
  createJdOpenAppUrl,
655
655
  isEmpty,
656
656
  getJdAppReportPageSource,
657
657
  isAppClassifyPage,
658
658
  isAppHomeForMarketPage,
659
659
  isImageOptimizeEnable,
660
660
  isPc,
661
661
  ipLoc_djd,
662
662
  isTjScence,
663
663
  isH5AdnJxMini,
664
664
  isTjM,
665
665
  isTjJxM,
666
666
  isTJApp,
667
667
  isH5AdnHaoWuJie,
668
668
  tjChannel,
669
669
  dealJdOpenAppData,
670
670
  jdAppVersionCompare,
671
671
  dealNativePixelToCssPixel,
672
672
  isAppStowShop,
673
673
  getSgmCustomCode,
674
674
  handleSgmCodeTaroVersion,