@conecli/cone-render 0.8.39 → 0.8.40

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 (90) hide show
  1. package/README.md +7 -1
  2. package/dist/api/index.ts +1 -1
  3. package/dist/common/const.ts +1 -1
  4. package/dist/common/environmentType.ts +1 -0
  5. package/dist/common/index.h5.ts +1 -1
  6. package/dist/common/index.jd.ts +1 -1
  7. package/dist/common/index.ts +1 -1
  8. package/dist/common/index.weapp.ts +1 -1
  9. package/dist/common/jdplayerSdk.ts +1 -0
  10. package/dist/common/sgmCustomCode.ts +1 -0
  11. package/dist/common/token/token.jd.ts +1 -1
  12. package/dist/common/token/token.ts +1 -1
  13. package/dist/common/wxappApi.jd.ts +1 -0
  14. package/dist/components/ErrorBoundary.tsx +1 -1
  15. package/dist/components/base/CountDown/index.tsx +1 -1
  16. package/dist/components/base/CustomScrollView/index.jd.tsx +1 -0
  17. package/dist/components/base/CustomScrollView/index.module.scss +7 -0
  18. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  19. package/dist/components/base/CustomVideo/index.tsx +1 -1
  20. package/dist/components/base/Dialog/index.module.scss +5 -0
  21. package/dist/components/base/Dialog/index.tsx +1 -1
  22. package/dist/components/base/Exposure/index.h5.tsx +1 -1
  23. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  24. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  25. package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
  26. package/dist/components/base/InViewRender/index.tsx +1 -1
  27. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  28. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  29. package/dist/components/base/LazyLayoutLoad/index.weapp.tsx +1 -1
  30. package/dist/components/base/LazyLoadImage/const.ts +1 -1
  31. package/dist/components/base/LazyLoadImage/index.h5.module.scss +20 -20
  32. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  33. package/dist/components/base/NetworkDataError/const.ts +1 -1
  34. package/dist/components/base/NetworkDataError/index.module.scss +4 -0
  35. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  36. package/dist/components/base/Skeleton/index.tsx +1 -1
  37. package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
  38. package/dist/components/floorItem.jd.tsx +1 -1
  39. package/dist/components/floorItem.weapp.tsx +1 -1
  40. package/dist/components/isv/Floor/index.tsx +1 -1
  41. package/dist/components/remoteFloorItem.tsx +1 -1
  42. package/dist/interface/common.ts +1 -1
  43. package/dist/interface/component.ts +1 -1
  44. package/dist/interface/jumpEventReport.ts +1 -1
  45. package/dist/interface/service.ts +1 -1
  46. package/dist/interface/utils.ts +1 -1
  47. package/dist/jumpEventReport/base.ts +1 -1
  48. package/dist/jumpEventReport/const.ts +1 -1
  49. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  50. package/dist/jumpEventReport/index.h5.ts +1 -1
  51. package/dist/jumpEventReport/index.jd.ts +1 -1
  52. package/dist/jumpEventReport/index.weapp.ts +1 -1
  53. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  54. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  55. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  56. package/dist/jumpEventReport/web/report.ts +1 -1
  57. package/dist/jumpEventReport/web.base.ts +1 -1
  58. package/dist/jumpEventReport/web.jd.ts +1 -1
  59. package/dist/jumpEventReport/web.jdb.ts +1 -1
  60. package/dist/jumpEventReport/web.jdjch.ts +1 -1
  61. package/dist/jumpEventReport/web.jxwxapp.ts +1 -0
  62. package/dist/jumpEventReport/web.tjapp.ts +1 -0
  63. package/dist/jumpEventReport/web.tjm.ts +1 -0
  64. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  65. package/dist/modules/ContainerFloorList/index.h5.module.scss +17 -1
  66. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  67. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  68. package/dist/open/api/environment.ts +1 -1
  69. package/dist/open/api/index.ts +1 -1
  70. package/dist/open/api/jump copy.ts +1 -1
  71. package/dist/open/api/shopMember.ts +1 -1
  72. package/dist/open/api/track.ts +1 -1
  73. package/dist/open/api/util.ts +1 -1
  74. package/dist/sass/app.h5.scss +39 -3
  75. package/dist/sass/base.scss +12 -0
  76. package/dist/service/requestServer.ts +1 -1
  77. package/dist/utils/connectNativeJsBridge.ts +1 -1
  78. package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
  79. package/dist/utils/draExceptionAndProfile.ts +1 -1
  80. package/dist/utils/h5Utils.ts +1 -1
  81. package/dist/utils/index.h5.ts +1 -1
  82. package/dist/utils/index.ts +1 -1
  83. package/dist/utils/index.weapp.ts +1 -1
  84. package/dist/utils/jm-common.js +1 -1
  85. package/dist/utils/sgmCodeUtils.ts +1 -0
  86. package/dist/utils/taroRenderUtil.ts +1 -0
  87. package/dist/utils/utils.ts +1 -1
  88. package/package.json +2 -1
  89. package/dist/components/base/Skeleton/old.tsx +0 -1
  90. package/dist/customHooks/useDocumentVisibilitychange.ts +0 -1
@@ -1 +1 @@
1
- import {
2
1
  isApp,
3
2
  isIOS,
4
3
  getAppVersion,
5
4
  version,
6
5
  getUUID,
7
6
  getUrlQuery,
8
7
  assign,
9
8
  isString,
10
9
  isObject,
11
10
  serialize,
12
11
  isAndroid, versionCompare,
13
12
  CHANNEL_TYPE,
14
13
  JDShopViewBusinessPathType,
15
14
  JDShopViewBusinessPathList,
16
15
  SECTION_HOME_TAB_NAME_TYPE,
17
16
  SECTION_HOME_TAB_TYPE,
18
17
  parseQueryUrlString(window?.location?.href ?? ''),
19
18
  try {
20
19
  return JSON.parse(decodeURIComponent(getUrlQuery('cookie')))
21
20
  } catch (e) {
22
21
  return {}
23
22
  }
24
23
  isWxMiniH5View && urlCookie['wxapp_type'] == '1'
25
24
  if (isJdApp) {
26
25
  isIosDevice
27
26
  ? e && e.stopPropagation()
28
27
  : androidDeviceStopNativeScrollEvent(state)
29
28
  }
30
29
  isJdApp &&
31
30
  isAndroidDevice &&
32
31
  window?.JdAndroid &&
33
32
  window?.JdAndroid.requestEvent(state)
34
33
  if (isH5AndJdShopView) {
35
34
  return (
36
35
  CHANNEL_TYPE[currentChannel] ||
37
36
  CHANNEL_TYPE[JDShopViewBusinessPathType.HOME]
38
37
  )
39
38
  }
40
39
  return null
41
40
  isH5 && ['/app/home', '/app/classify', '/app/newProduct', '/member/shopcard'].includes(urlPathname)
42
41
  const getCustomObj = {
43
42
  type: 1,
44
43
  code: 'all',
45
44
  cost1: 1,
46
45
  ...customObj
47
46
  }
48
47
  try {
49
48
  window.__sgm__.custom(getCustomObj, '9HwAEg@fTtWBB3EnwA5VgLT')
50
49
  } catch (e) {}
50
+ import {
51
51
  isApp,
52
52
  isIOS,
53
53
  getAppVersion,
54
54
  version,
55
55
  getUUID,
56
56
  getUrlQuery,
57
57
  assign,
58
58
  isString,
59
59
  isObject,
60
60
  serialize,
61
61
  isAndroid,
62
62
  versionCompare,
63
63
  CHANNEL_TYPE,
64
64
  JDShopViewBusinessPathType,
65
65
  JDShopViewBusinessPathList,
66
66
  SECTION_HOME_TAB_NAME_TYPE,
67
67
  SECTION_HOME_TAB_TYPE,
68
68
  parseQueryUrlObj,
69
69
  if (window?.__sgm__) {
70
70
  resolve(true)
71
71
  } else {
72
72
  if (isSgmReadyError) {
73
73
  console.log("当前sgm初始化失败")
74
74
  reject(false)
75
75
  } else {
76
76
  ready('__sgm__', 2000).then(() => {
77
77
  isSgmReadyError = false
78
78
  console.log("当前sgm初始化成功")
79
79
  resolve(true)
80
80
  }).catch(() => {
81
81
  isSgmReadyError = true
82
82
  console.log("当前sgm初始化失败")
83
83
  reject(false)
84
84
  })
85
85
  }
86
86
  }
87
87
  try {
88
88
  return JSON.parse(decodeURIComponent(getUrlQuery('cookie')))
89
89
  } catch (e) {
90
90
  return {}
91
91
  }
92
92
  isWxMiniH5View && urlCookie['wxapp_type'] == '1'
93
93
  if (isH5AdnJxMini) {
94
94
  return 'jxxcx'
95
95
  } else if (isTJApp) {
96
96
  return 'tjapp'
97
97
  } else if (isTjM) {
98
98
  return 'tjm'
99
99
  } else if (isTjJxM) {
100
100
  return 'jxh5'
101
101
  }
102
102
  return ''
103
103
  if (isJdApp) {
104
104
  isIosDevice
105
105
  ? e && e.stopPropagation()
106
106
  : androidDeviceStopNativeScrollEvent(state)
107
107
  }
108
108
  isJdApp &&
109
109
  isAndroidDevice &&
110
110
  window?.JdAndroid &&
111
111
  window?.JdAndroid.requestEvent(state)
112
112
  if (isH5AndJdShopView) {
113
113
  return (
114
114
  CHANNEL_TYPE[currentChannel] ||
115
115
  CHANNEL_TYPE[JDShopViewBusinessPathType.HOME]
116
116
  )
117
117
  }
118
118
  return null
119
119
  isH5 && isJdApp && ['/app/home', '/app/classify', '/member/shopcard','/favorite/list', '/favorite/home'].includes(urlPathname)
120
120
  isH5 && isJdApp && !['/app/home'].includes(urlPathname)
121
121
  return isJdApp ? versionCompare(nowVersion, compareVersion) : -2
122
122
  getSgmReadyPromise().then(() => {
123
123
  const getCustomObj = {
124
124
  type: 1,
125
125
  code: 'all',
126
126
  cost1: 1,
127
127
  ...customObj
128
128
  }
129
129
  try {
130
130
  window.__sgm__.custom(getCustomObj, '9HwAEg@fTtWBB3EnwA5VgLT')
131
131
  } catch (e) {
132
132
  console.log("当前sgm上报异常, 原始数据为",JSON.stringify(customObj))
133
133
  }
134
134
  }).catch(() => {
135
135
  console.error("当前页面sgm加载异常,无法进行异常上报, 原始数据为",JSON.stringify(customObj))
136
136
  })
137
137
  if(isJdAndAndroidDevice && typeof displayObj === 'object'){
138
138
  const deviceRatio = window?.devicePixelRatio
139
139
  Object.keys(displayObj).forEach(key => {
140
140
  if(key === 'nativeHeaderHeight'){
141
141
  displayObj[key] = Math.ceil(displayObj[key] / (deviceRatio * deviceRatio) - 2)
142
142
  }else {
143
143
  displayObj[key] = Math.ceil(displayObj[key] / deviceRatio)
144
144
  }
145
145
  })
146
146
  }
147
147
  return displayObj
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  nativePageShowToast, ToastAndroidType,
3
2
  ToastIosType,
4
3
  getAppChannelType, isAndroidDevice, isH5AndJdShopView, isChartH5,
5
4
  isH5AndJdShopViewNativeScroll, isIosDevice, isJdAndAndroidDevice, isJdAndIosDevice, isJdApp,
6
5
  isWxApp, isWxMiniH5View, isH5AndJingGouMini, urlCookie,
7
6
  sgmCustomReport, isMemberPage, isH5AndJdShopViewH5Scroll, isAppClassifyPage, isPc, ipLoc_djd
8
7
  addHttps,
9
8
  clearTaroStorageKey,
10
9
  countStringify,
11
10
  dateFormat,
12
11
  dealAddress,
13
12
  dealShopContentData as originDealShopContentData,
14
13
  debounce,
15
14
  filterUrlQueryData,
16
15
  formatTabActiveMenuType,
17
16
  getQualityImage,
18
17
  getTaroStorageKeyValue,
19
18
  getWxAppCookieStr,
20
19
  isH5,
21
20
  isJdMin,
22
21
  isWxMin,
23
22
  isWxMinAndWxapp,
24
23
  lodashThrottle,
25
24
  objectToUrlEncode,
26
25
  parseQueryUrlString,
27
26
  removeTaroStorageKey,
28
27
  setLowSmallPicUrl,
29
28
  setTaroStorage,
30
29
  showFailToast,
31
30
  showNormalToast,
32
31
  showSuccessToast,
33
32
  sliceArrToChunkList,
34
33
  throttle,
35
34
  windowWidth: window.innerWidth,
36
35
  containerWidth: buildType === BUILD_TYPE.CLASSIFY ? window.innerWidth - 100 : window.innerWidth,
37
36
  screenWidth: window.innerWidth,
38
37
  platform: '',
39
38
  model: '',
40
39
  system: '',
41
40
  getSystemInfo.windowWidth = getSystemInfo.screenWidth
42
41
  getSystemInfo['containerWidth'] = buildType === BUILD_TYPE.CLASSIFY ? getSystemInfo.screenWidth - 100 : getSystemInfo.screenWidth
43
42
  const params = Object.assign(
44
43
  {},
45
44
  {
46
45
  title: '',
47
46
  duration: 1500,
48
47
  },
49
48
  options,
50
49
  )
51
50
  params.duration = params.duration / 1000
52
51
  if (isJdApp && isH5AndJdShopView) {
53
52
  const showSuccessType = isIosDevice
54
53
  ? ToastIosType.SUCCESS
55
54
  : ToastAndroidType.SUCCESS
56
55
  const duration = isAndroidDevice ? 0 : params.duration
57
56
  nativePageShowToast(options.title, showSuccessType, duration)
58
57
  console.log('执行原生toast success')
59
58
  } else {
60
59
  showSuccessToast(options)
61
60
  }
62
61
  const params = Object.assign(
63
62
  {},
64
63
  {
65
64
  title: '',
66
65
  duration: 1500,
67
66
  },
68
67
  options,
69
68
  )
70
69
  params.duration = params.duration / 1000
71
70
  console.log(`isJdApp${isJdApp}`)
72
71
  if (isJdApp && isH5AndJdShopView) {
73
72
  const showSuccessType = isIosDevice
74
73
  ? ToastIosType.FAIL
75
74
  : ToastAndroidType.FAIL
76
75
  const duration = isAndroidDevice ? 0 : params.duration
77
76
  nativePageShowToast(options.title, showSuccessType, duration)
78
77
  console.log('执行原生toast fail')
79
78
  } else {
80
79
  console.log('执行H5 toast fail')
81
80
  showFailToast(options)
82
81
  }
83
82
  const params = Object.assign(
84
83
  {},
85
84
  {
86
85
  title: '',
87
86
  duration: 1500,
88
87
  },
89
88
  options,
90
89
  )
91
90
  params.duration = params.duration / 1000
92
91
  if (isJdApp) {
93
92
  const showSuccessType = isIosDevice
94
93
  ? ToastIosType.NORMAL
95
94
  : ToastAndroidType.NORMAL
96
95
  const duration = isAndroidDevice ? 0 : params.duration
97
96
  nativePageShowToast(options.title, showSuccessType, duration)
98
97
  } else {
99
98
  showNormalToast(options)
100
99
  }
101
100
  const createLoadingEle = document.createElement('div')
102
101
  createLoadingEle.id = 'J_shopLoading'
103
102
  createLoadingEle.className = `d-shop-loading flexible-center-box ${customClassName}`
104
103
  createLoadingEle.innerHTML = `<div class='d-loading-content'>
105
104
  <span class='d-shop-loading-icon'></span>
106
105
  <p class='d-shop-text'>${text}</p>
107
106
  </div>`
108
107
  const getEle = document.body ? document.body : document.getElementsByTagName('body')[0]
109
108
  console.log('获取getEle及append及appendChild方法', getEle, getEle?.append, getEle?.appendChild)
110
109
  getEle.appendChild(createLoadingEle)
111
110
  const getEle = document.getElementById('J_shopLoading')
112
111
  getEle && getEle.remove()
113
112
  num,
114
113
  widthSize = 375,
115
114
  layoutWidth = getSystemInfo.windowWidth,
116
115
  const getNum = Number(num)
117
116
  return Math.round((getNum / widthSize) * layoutWidth)
118
117
  const systemInfo: UtilsInterFace.taroGetSystemInfoSyncRes = getSystemInfo
119
118
  if (!systemInfo.system && window) {
120
119
  systemInfo.system = window.navigator.userAgent
121
120
  systemInfo.isChrome = !!systemInfo?.system.match(/chrome/i)
122
121
  }
123
122
  const isIOS = !!systemInfo?.system.match(/ios/i)
124
123
  const isAndroid = !!systemInfo?.system.match(/android/i)
125
124
  systemInfo.navBarHeight = 0
126
125
  systemInfo.statusBarHeight = 0
127
126
  systemInfo.capsulePosition = null
128
127
  systemInfo.isIOS = isIOS
129
128
  systemInfo.isAndroid = isAndroid
130
129
  return systemInfo
131
130
  return originDealShopContentData(pageData, sgmCustomReport, isvdev)
132
131
  isJdApp,
133
132
  isWxApp,
134
133
  isIosDevice,
135
134
  isAndroidDevice,
136
135
  isJdAndIosDevice,
137
136
  isJdAndAndroidDevice,
138
137
  isWxMin,
139
138
  isWxMinAndWxapp,
140
139
  isJdMin,
141
140
  isH5,
142
141
  isH5AndJdShopView,
143
142
  isChartH5,
144
143
  isH5AndJdShopViewNativeScroll,
145
144
  isH5AndJdShopViewH5Scroll,
146
145
  isH5AndJingGouMini,
147
146
  isWxMiniH5View,
148
147
  urlCookie,
149
148
  sliceArrToChunkList,
150
149
  dealAddress,
151
150
  objectToUrlEncode,
152
151
  parseQueryUrlString,
153
152
  setLowSmallPicUrl,
154
153
  setTaroStorage,
155
154
  getTaroStorageKeyValue,
156
155
  removeTaroStorageKey,
157
156
  clearTaroStorageKey,
158
157
  getQualityImage,
159
158
  countStringify,
160
159
  getWxAppCookieStr,
161
160
  getSystemInfos,
162
161
  pxTransformFromData,
163
162
  dealShopContentDataAndReport as dealShopContentData,
164
163
  dateFormat,
165
164
  throttle,
166
165
  lodashThrottle,
167
166
  debounce,
168
167
  addHttps,
169
168
  commonShowSuccessToast as showSuccessToast,
170
169
  commonShowFailToast as showFailToast,
171
170
  commonShowNormalToast as showNormalToast,
172
171
  showShopLoading,
173
172
  hideShopLoading,
174
173
  getAppChannelType,
175
174
  formatTabActiveMenuType,
176
175
  filterUrlQueryData,
177
176
  sgmCustomReport,
178
177
  isMemberPage,
179
178
  memberFormatUtils,
180
179
  getFloorDataToDataDefines,
181
180
  isAppClassifyPage,
182
181
  isPc,
183
182
  ipLoc_djd,
183
+ import Taro from '@tarojs/taro'
184
184
  nativePageShowToast,
185
185
  ToastAndroidType,
186
186
  ToastIosType,
187
187
  getAppChannelType,
188
188
  isAndroidDevice,
189
189
  isH5AndJdShopView,
190
190
  isChartH5,
191
191
  isH5AndJdShopViewNativeScroll,
192
192
  isIosDevice,
193
193
  isJdAndAndroidDevice,
194
194
  isJdAndIosDevice,
195
195
  isJdAndHarmonyDevice,
196
196
  isJdApp,
197
197
  isWxApp,
198
198
  isWxMiniH5View,
199
199
  isH5AndJingGouMini,
200
200
  urlCookie,
201
201
  sgmCustomReport,
202
202
  isMemberPage,
203
203
  isH5AndJdShopViewH5Scroll,
204
204
  isH5AndJdShopH5CustomScrollView,
205
205
  isAppClassifyPage,
206
206
  isPc,
207
207
  ipLoc_djd,
208
208
  jdAppVersionCompare,
209
209
  dealNativePixelToCssPixel,
210
210
  isAppStowShop,
211
211
  isJdAndroidX5Core,
212
212
  isTjScence,
213
213
  isH5AdnJxMini,
214
214
  isTjM,
215
215
  isTjJxM,
216
216
  isTJApp,
217
217
  isH5AdnHaoWuJie,
218
218
  tjChannel
219
219
  addHttps,
220
220
  clearTaroStorageKey,
221
221
  countStringify,
222
222
  dateFormat,
223
223
  dealAddress,
224
224
  dealShopContentData as originDealShopContentData,
225
225
  debounce,
226
226
  filterUrlQueryData,
227
227
  formatTabActiveMenuType,
228
228
  getQualityImage,
229
229
  getTaroStorageKeyValue,
230
230
  getWxAppCookieStr,
231
231
  isH5,
232
232
  isMin,
233
233
  isJdMin,
234
234
  isWxMin,
235
235
  isWxMinAndWxapp,
236
236
  isJdMinAndHarmony,
237
237
  lodashThrottle,
238
238
  objectToUrlEncode,
239
239
  parseQueryUrlString,
240
240
  removeTaroStorageKey,
241
241
  setLowSmallPicUrl,
242
242
  setTaroStorage,
243
243
  showFailToast,
244
244
  showNormalToast,
245
245
  showSuccessToast,
246
246
  sliceArrToChunkList,
247
247
  throttle,
248
248
  isOpenJdAppUrl,
249
249
  jdOpenAppParams,
250
250
  createJdOpenAppUrl,
251
251
  isEmpty,
252
252
  getJdAppReportPageSource,
253
253
  dealJdOpenAppData,
254
254
  const getNum = Number(num)
255
255
  let _changeLayoutWidth = layoutWidth
256
256
  if (!_changeLayoutWidth) {
257
257
  _changeLayoutWidth =
258
258
  _ShopSystemInfo && _ShopSystemInfo?.windowWidth
259
259
  ? _ShopSystemInfo.windowWidth
260
260
  : Taro.getSystemInfoSync()?.windowWidth
261
261
  }
262
262
  return Math.round((getNum / widthSize) * _changeLayoutWidth)
263
263
  changeSize,
264
264
  designWidth = 750,
265
265
  systemInfo,
266
266
  const getRootFontSize =
267
267
  (40 * (systemInfo?.windowWidth ?? _ShopSystemInfo.windowWidth)) / 750
268
268
  const getRealRootFontSize =
269
269
  getRootFontSize > 40 ? 40 : getRootFontSize < 20 ? 20 : getRootFontSize
270
270
  return Math.ceil(
271
271
  (((parseInt(String(changeSize), 10) / 40) * 750) / designWidth) *
272
272
  getRealRootFontSize,
273
273
  )
274
274
  console.log(
275
275
  '获取系统宽度systemInfo?.windowWidth',
276
276
  systemInfo?.windowWidth,
277
277
  'taroToTransformRoutimePXNumber(changeWidth)',
278
278
  taroToTransformRoutimePXNumber(changeWidth, 750, systemInfo),
279
279
  )
280
280
  return buildType === BUILD_TYPE.CLASSIFY && systemInfo?.windowWidth
281
281
  ? systemInfo?.windowWidth -
282
282
  taroToTransformRoutimePXNumber(changeWidth, 750, systemInfo)
283
283
  : systemInfo?.windowWidth ?? 0
284
284
  const systemInfo = Taro.getSystemInfoSync()
285
285
  if (params && params?.pageWidth && params?.pageHeight) {
286
286
  systemInfo.windowWidth = params?.pageWidth
287
287
  systemInfo.windowHeight = params?.pageHeight
288
288
  }
289
289
  systemInfo['containerWidth'] = getContainerWidth(buildType, systemInfo)
290
290
  console.warn('====获取系统信息=====', systemInfo)
291
291
  return systemInfo
292
292
  const getSystemInfo = getSystemAndContainerWidthInfo(params) || {
293
293
  windowWidth: window.innerWidth,
294
294
  containerWidth: getContainerWidth(buildType, {
295
295
  windowWidth: window.innerWidth,
296
296
  }),
297
297
  screenWidth: window.innerWidth,
298
298
  platform: '',
299
299
  model: '',
300
300
  system: '',
301
301
  }
302
302
  if (isJdApp && isAndroidDevice && getSystemInfo.windowWidth <= 0) {
303
303
  getSystemInfo.windowWidth = getSystemInfo.screenWidth
304
304
  getSystemInfo['containerWidth'] = getContainerWidth(
305
305
  buildType,
306
306
  getSystemInfo,
307
307
  )
308
308
  }
309
309
  return getSystemInfo
310
310
  const params = Object.assign(
311
311
  {},
312
312
  {
313
313
  title: '',
314
314
  duration: 1500,
315
315
  },
316
316
  options,
317
317
  )
318
318
  params.duration = params.duration / 1000
319
319
  if (isJdApp) {
320
320
  const showSuccessType = isIosDevice
321
321
  ? ToastIosType.SUCCESS
322
322
  : ToastAndroidType.SUCCESS
323
323
  const duration = isAndroidDevice ? 0 : params.duration
324
324
  nativePageShowToast(options.title, showSuccessType, duration)
325
325
  console.log('执行原生toast success')
326
326
  } else {
327
327
  showSuccessToast(options)
328
328
  }
329
329
  const params = Object.assign(
330
330
  {},
331
331
  {
332
332
  title: '',
333
333
  duration: 1500,
334
334
  },
335
335
  options,
336
336
  )
337
337
  params.duration = params.duration / 1000
338
338
  if (isJdApp) {
339
339
  const showSuccessType = isIosDevice
340
340
  ? ToastIosType.FAIL
341
341
  : ToastAndroidType.FAIL
342
342
  const duration = isAndroidDevice ? 0 : params.duration
343
343
  nativePageShowToast(options.title, showSuccessType, duration)
344
344
  console.log('执行原生toast fail')
345
345
  } else {
346
346
  console.log('执行H5 toast fail')
347
347
  showFailToast(options)
348
348
  }
349
349
  const params = Object.assign(
350
350
  {},
351
351
  {
352
352
  title: '',
353
353
  duration: 1500,
354
354
  },
355
355
  options,
356
356
  )
357
357
  params.duration = params.duration / 1000
358
358
  if (isJdApp) {
359
359
  const showSuccessType = isIosDevice
360
360
  ? ToastIosType.NORMAL
361
361
  : ToastAndroidType.NORMAL
362
362
  const duration = isAndroidDevice ? 0 : params.duration
363
363
  nativePageShowToast(options.title, showSuccessType, duration)
364
364
  } else {
365
365
  showNormalToast(options)
366
366
  }
367
367
  const createLoadingEle = document.createElement('div')
368
368
  createLoadingEle.id = 'J_shopLoading'
369
369
  createLoadingEle.className = `d-shop-loading flexible-center-box ${customClassName}`
370
370
  createLoadingEle.innerHTML = `<div class='d-loading-content'>
371
371
  <span class='d-shop-loading-icon'></span>
372
372
  <p class='d-shop-text'>${text}</p>
373
373
  </div>`
374
374
  const getEle = document.body
375
375
  ? document.body
376
376
  : document.getElementsByTagName('body')[0]
377
377
  getEle.appendChild(createLoadingEle)
378
378
  const getEle = document.getElementById('J_shopLoading')
379
379
  getEle && getEle.remove()
380
380
  const systemInfo: UtilsInterFace.taroGetSystemInfoSyncRes = getReviseSystemInfo(
381
381
  params,
382
382
  )
383
383
  if (!systemInfo.system && window) {
384
384
  systemInfo.system = window.navigator.userAgent
385
385
  systemInfo.isChrome = !!systemInfo?.system.match(/chrome/i)
386
386
  }
387
387
  const isIOS = !!systemInfo?.system.match(/ios/i)
388
388
  const isAndroid = !!systemInfo?.system.match(/android/i)
389
389
  systemInfo.navBarHeight = 0
390
390
  systemInfo.statusBarHeight = 0
391
391
  systemInfo.capsulePosition = null
392
392
  systemInfo.isIOS = isIOS
393
393
  systemInfo.isAndroid = isAndroid
394
394
  _ShopSystemInfo = systemInfo
395
395
  return systemInfo
396
396
  return originDealShopContentData(pageData, sgmCustomReport, isvdev)
397
397
  isJdApp,
398
398
  isWxApp,
399
399
  isIosDevice,
400
400
  isAndroidDevice,
401
401
  isJdAndIosDevice,
402
402
  isJdAndAndroidDevice,
403
403
  isJdAndHarmonyDevice,
404
404
  isJdAndroidX5Core,
405
405
  isMin,
406
406
  isWxMin,
407
407
  isWxMinAndWxapp,
408
408
  isJdMinAndHarmony,
409
409
  isJdMin,
410
410
  isH5,
411
411
  isH5AndJdShopView,
412
412
  isChartH5,
413
413
  isH5AndJdShopViewNativeScroll,
414
414
  isH5AndJdShopViewH5Scroll,
415
415
  isH5AndJdShopH5CustomScrollView,
416
416
  isH5AndJingGouMini,
417
417
  isWxMiniH5View,
418
418
  urlCookie,
419
419
  sliceArrToChunkList,
420
420
  dealAddress,
421
421
  objectToUrlEncode,
422
422
  parseQueryUrlString,
423
423
  setLowSmallPicUrl,
424
424
  setTaroStorage,
425
425
  getTaroStorageKeyValue,
426
426
  removeTaroStorageKey,
427
427
  clearTaroStorageKey,
428
428
  getQualityImage,
429
429
  countStringify,
430
430
  getWxAppCookieStr,
431
431
  getSystemInfos,
432
432
  pxTransformFromData,
433
433
  dealShopContentDataAndReport as dealShopContentData,
434
434
  dateFormat,
435
435
  throttle,
436
436
  lodashThrottle,
437
437
  debounce,
438
438
  addHttps,
439
439
  commonShowSuccessToast as showSuccessToast,
440
440
  commonShowFailToast as showFailToast,
441
441
  commonShowNormalToast as showNormalToast,
442
442
  showShopLoading,
443
443
  hideShopLoading,
444
444
  getAppChannelType,
445
445
  formatTabActiveMenuType,
446
446
  filterUrlQueryData,
447
447
  sgmCustomReport,
448
448
  isMemberPage,
449
449
  getFloorDataToDataDefines,
450
450
  isOpenJdAppUrl,
451
451
  jdOpenAppParams,
452
452
  createJdOpenAppUrl,
453
453
  isEmpty,
454
454
  getJdAppReportPageSource,
455
455
  isAppClassifyPage,
456
456
  isPc,
457
457
  ipLoc_djd,
458
458
  isTjScence,
459
459
  isH5AdnJxMini,
460
460
  isTjM,
461
461
  isTjJxM,
462
462
  isTJApp,
463
463
  isH5AdnHaoWuJie,
464
464
  tjChannel,
465
465
  dealJdOpenAppData,
466
466
  jdAppVersionCompare,
467
467
  dealNativePixelToCssPixel,
468
468
  isAppStowShop,
469
469
  getSgmCustomCode
@@ -1 +1 @@
1
- import {
2
1
  isChartH5,
3
2
  isH5AndJdShopViewH5Scroll,
4
3
  isMemberPage,
5
4
  isPc,
6
5
  ipLoc_djd,
7
6
  isChartH5,
8
7
  isH5AndJdShopViewH5Scroll,
9
8
  isH5AndJingGouMini,
10
9
  urlCookie,
11
10
  isMemberPage,
12
11
  isPc,
13
12
  ipLoc_djd,
13
+ import {
14
14
  isMin,
15
15
  isJdMinAndHarmony,
16
16
  isChartH5,
17
17
  isH5AndJdShopViewH5Scroll,
18
18
  isH5AndJdShopH5CustomScrollView,
19
19
  isMemberPage,
20
20
  sgmCustomReport,
21
21
  isOpenJdAppUrl,
22
22
  jdOpenAppParams,
23
23
  createJdOpenAppUrl,
24
24
  isEmpty,
25
25
  getJdAppReportPageSource,
26
26
  isPc,
27
27
  ipLoc_djd,
28
28
  dealJdOpenAppData,
29
29
  jdAppVersionCompare,
30
30
  dealNativePixelToCssPixel,
31
31
  isAppStowShop,
32
32
  isJdAndHarmonyDevice,
33
33
  isJdAndroidX5Core,
34
34
  isMin,
35
35
  isJdMinAndHarmony,
36
36
  isChartH5,
37
37
  isH5AndJdShopViewH5Scroll,
38
38
  isH5AndJdShopH5CustomScrollView,
39
39
  isH5AndJingGouMini,
40
40
  urlCookie,
41
41
  isMemberPage,
42
42
  sgmCustomReport,
43
43
  isOpenJdAppUrl,
44
44
  jdOpenAppParams,
45
45
  createJdOpenAppUrl,
46
46
  isEmpty,
47
47
  isPc,
48
48
  ipLoc_djd,
49
49
  isTjM,
50
50
  isTjJxM,
51
51
  isTjScence,
52
52
  isH5AdnJxMini,
53
53
  isTJApp,
54
54
  isH5AdnHaoWuJie,
55
55
  tjChannel,
56
56
  dealJdOpenAppData,
57
57
  jdAppVersionCompare,
58
58
  dealNativePixelToCssPixel,
59
59
  isAppStowShop,
60
60
  getSgmCustomCode