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