@conecli/cone-render 0.9.1-shop2.7 → 0.9.1-shop2.9

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 (62) hide show
  1. package/dist/api/index.ts +1 -1
  2. package/dist/common/const.ts +1 -1
  3. package/dist/common/environmentType.ts +1 -0
  4. package/dist/common/index.h5.ts +1 -1
  5. package/dist/common/index.jd.ts +1 -1
  6. package/dist/common/index.ts +1 -1
  7. package/dist/common/index.weapp.ts +1 -1
  8. package/dist/common/sgmCustomCode.ts +1 -0
  9. package/dist/common/token/token.ts +1 -1
  10. package/dist/common/wxappApi.jd.ts +1 -0
  11. package/dist/components/ErrorBoundary.tsx +1 -1
  12. package/dist/components/base/CountDown/index.tsx +1 -1
  13. package/dist/components/base/CustomScrollView/index.jd.tsx +1 -0
  14. package/dist/components/base/CustomScrollView/index.module.scss +7 -0
  15. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  16. package/dist/components/base/Dialog/index.module.scss +5 -0
  17. package/dist/components/base/Dialog/index.tsx +1 -1
  18. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  19. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  20. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  21. package/dist/components/floorItem.jd.tsx +1 -1
  22. package/dist/components/floorItem.weapp.tsx +1 -1
  23. package/dist/components/remoteFloorItem.tsx +1 -1
  24. package/dist/interface/common.ts +1 -1
  25. package/dist/interface/component.ts +1 -1
  26. package/dist/interface/jumpEventReport.ts +1 -1
  27. package/dist/interface/service.ts +1 -1
  28. package/dist/interface/utils.ts +1 -1
  29. package/dist/jumpEventReport/base.ts +1 -1
  30. package/dist/jumpEventReport/const.ts +1 -1
  31. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  32. package/dist/jumpEventReport/index.h5.ts +1 -1
  33. package/dist/jumpEventReport/index.jd.ts +1 -1
  34. package/dist/jumpEventReport/index.weapp.ts +1 -1
  35. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  36. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  37. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  38. package/dist/jumpEventReport/web/report.ts +1 -1
  39. package/dist/jumpEventReport/web.base.ts +1 -1
  40. package/dist/jumpEventReport/web.jd.ts +1 -1
  41. package/dist/jumpEventReport/web.jxwxapp.ts +1 -0
  42. package/dist/jumpEventReport/web.tjapp.ts +1 -0
  43. package/dist/jumpEventReport/web.tjm.ts +1 -0
  44. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  45. package/dist/open/api/environment.ts +1 -1
  46. package/dist/open/api/jump copy.ts +1 -1
  47. package/dist/open/api/shopMember.ts +1 -1
  48. package/dist/open/api/track.ts +1 -1
  49. package/dist/open/api/util.ts +1 -1
  50. package/dist/sass/app.h5.scss +39 -3
  51. package/dist/service/requestServer.ts +1 -1
  52. package/dist/utils/connectNativeJsBridge.ts +1 -1
  53. package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
  54. package/dist/utils/draExceptionAndProfile.ts +1 -1
  55. package/dist/utils/h5Utils.ts +1 -1
  56. package/dist/utils/index.h5.ts +1 -1
  57. package/dist/utils/index.ts +1 -1
  58. package/dist/utils/index.weapp.ts +1 -1
  59. package/dist/utils/jm-common.js +1 -1
  60. package/dist/utils/sgmCodeUtils.ts +1 -0
  61. package/dist/utils/utils.ts +1 -1
  62. package/package.json +1 -1
@@ -1 +1 @@
1
- import React, { useRef, useEffect } from 'react'
2
1
  isH5AndJdShopView,
3
2
  isAndroidDevice,
4
3
  isJdAndAndroidDevice,
5
4
  isJdAndIosDevice,
6
5
  isIosDevice,
7
6
  isJdApp,
8
7
  isWxMin,
9
8
  isH5AndJdShopViewH5Scroll,
10
9
  isH5AndJdShopH5CustomScrollView,
11
10
  isH5,
12
11
  isAppClassifyPage,
13
12
  lodashThrottle,
14
13
  START: 'start',
15
14
  MOVE: 'move',
16
15
  END: 'end',
17
16
  const {scrollX, children, style = {},iosNeedDisableVertical, className, ...otherProps} = props
18
17
  const rootEleNode = isH5 && document ? document.querySelector('body') : null
19
18
  const needShowHighVersion = isH5AndJdShopViewH5Scroll && !(global.info.queryInfo?.downgraded && global.info.queryInfo.downgraded === "true")
20
19
  const mLastClientPosRef = useRef({
21
20
  mLastClientX: 0,
22
21
  mLastClientY: 0,
23
22
  })
24
23
 
25
24
  const touchstartEventBubbleFunc = (e) => {
26
25
  const isH5SwiperCustomEle = e?.target?.closest('.J_h5SwiperCustom')
27
26
  if(!isH5SwiperCustomEle){
28
27
  const hasCustomEle = e ? (e?.target?.closest('.J_customScroll') || e?.target?.closest('.J_customLayout')) : false
29
28
  if (isJdAndAndroidDevice && !hasCustomEle) {
30
29
  window.JdAndroid && window.JdAndroid.requestEvent(false)
31
30
  }
32
31
  !hasCustomEle && rootEleNode && rootEleNode.classList.contains('over-hidden') && rootEleNode.classList.remove('over-hidden')
33
32
  console.log("customScrollView所在页面document touch start事件是否有J_customScroll元素",hasCustomEle,"根元素是否有over-hidden",rootEleNode.classList)
34
33
  }
35
34
  }
36
35
  const touchstartEventCaptureFunc = (e) => {
37
36
  if(e && !e?.target?.closest('.J_h5SwiperCustom')){
38
37
  rootEleNode && rootEleNode.classList.contains('over-hidden') && rootEleNode.classList.remove('over-hidden')
39
38
  console.log("customScrollView所在页面document touch start事件捕获阶段移除根元素是否有over-hidden",rootEleNode.classList)
40
39
  }
41
40
  }
42
41
  useEffect(() => {
43
42
  isJdApp && !window.JDJshopViewInfo.getAndroidTouchSlopState &&
44
43
  nativePageGetScaledTouchSlop((res) => {
45
44
  console.log('获取安卓系统滑动阈值', res)
46
45
  window.JDJshopViewInfo.androidTouchSlop = res
47
46
  window.JDJshopViewInfo.getAndroidTouchSlopState = true
48
47
  })
49
48
  if(needShowHighVersion && rootEleNode && !rootEleAddEventListenerState){
50
49
  rootEleNode.addEventListener(
51
50
  'touchstart',
52
51
  touchstartEventBubbleFunc,
53
52
  false,
54
53
  )
55
54
 
56
55
  rootEleNode.addEventListener(
57
56
  'touchstart',
58
57
  touchstartEventCaptureFunc,
59
58
  true,
60
59
  )
61
60
  rootEleAddEventListenerState = true
62
61
  console.warn("customScrollView 初始化document监听完成")
63
62
  }
64
63
  return () => {
65
64
  if(needShowHighVersion && rootEleNode && rootEleAddEventListenerState){
66
65
  console.warn("customScrollView document监听取消完成")
67
66
  rootEleNode.removeEventListener(
68
67
  'touchstart',
69
68
  touchstartEventBubbleFunc,
70
69
  false,
71
70
  )
72
71
  rootEleNode.removeEventListener(
73
72
  'touchstart',
74
73
  touchstartEventCaptureFunc,
75
74
  true,
76
75
  )
77
76
  }
78
77
  }
79
78
  }, [])
80
79
 
81
80
  const androidDeviceStopNativeScrollEvent = (touchType) => {
82
81
  isJdApp &&
83
82
  isAndroidDevice &&
84
83
  window?.JdAndroid &&
85
84
  window?.JdAndroid.requestEvent(touchType === TouchType.START)
86
85
  console.log("触发window?.JdAndroid.requestEvent",touchType === TouchType.START,touchType)
87
86
  }
88
87
  const iosDeviceStopNativeScrollEvent = (e, touchType, sendIosState = true) => {
89
88
  e && e.stopPropagation()
90
89
  sendIosState && iosDeviceSendRouter(touchType)
91
90
  }
92
91
  const iosDeviceSendRouter = (state) => {
93
92
  window?.webkit?.messageHandlers?.MobileNavi?.postMessage?.({
94
93
  method: 'callRouterModuleWithParams',
95
94
  params: {
96
95
  routerURL: 'router://JDShopModule/processShoph5SlideState',
97
96
  routerParam: {
98
97
  slideDirection: 'horizontal',
99
98
  needDisableVertical: `${iosNeedDisableVertical}`,
100
99
  state,
101
100
  },
102
101
  callBackId: new Date().getTime(),
103
102
  },
104
103
  })
105
104
  }
106
105
  const stopNativeScrollEvent = (e: Event, touchType, sendIosState = true) => {
107
106
  if (isJdApp) {
108
107
  isIosDevice && !isAppClassifyPage && iosDeviceStopNativeScrollEvent(e, touchType, sendIosState)
109
108
  isAndroidDevice && androidDeviceStopNativeScrollEvent(touchType)
110
109
  console.log("当前customScrollView touch结束", touchType, e, "是否是e instanceof CustomEvent", e instanceof CustomEvent)
111
110
  }
112
111
  }
113
112
  const GetSlideAngle = (dx,dy) => {
114
113
  return Math.atan2(dy,dx) * 180 / Math.PI;
115
114
  }
116
115
  const GetSlideDirection = (startX, startY, endX, endY) => {
117
116
  const dy = startY - endY
118
117
  const dx = endX - startX
119
118
  let result = 0
120
119
  if (Math.abs(dx) < 2 && Math.abs(dy) < 2) {
121
120
  return result
122
121
  }
123
122
  const angle = GetSlideAngle(dx, dy)
124
123
  if (angle >= -45 && angle < 45) {
125
124
  result = 4
126
125
  } else if (angle >= 45 && angle < 135) {
127
126
  result = 1
128
127
  } else if (angle >= -135 && angle < -45) {
129
128
  result = 2
130
129
  } else if ((angle >= 135 && angle <= 180) || (angle >= -180 && angle < -135)) {
131
130
  result = 3
132
131
  }
133
132
  return result
134
133
  }
135
134
  const changeTouchStart = (e) => {
136
135
  if(isJdApp){
137
136
  stopNativeScrollEvent(e, TouchType.START, !iosNeedDisableVertical)
138
137
  if (isH5AndJdShopView || isH5AndJdShopH5CustomScrollView) {
139
138
  (needShowHighVersion || isH5AndJdShopH5CustomScrollView) && rootEleNode && rootEleNode.classList.add('over-hidden')
140
139
  console.info("customScrollView touchstart 当前根元素是否添加还是删除over-hidden",TouchType.START,rootEleNode.classList)
141
140
  const touchEvent =
142
141
  e?.originalEvent?.targetTouches[0] || e?.targetTouches[0]
143
142
  mLastClientPosRef.current.mLastClientX = touchEvent.clientX
144
143
  mLastClientPosRef.current.mLastClientY = touchEvent.clientY
145
144
  }
146
145
  }
147
146
  }
148
147
  const triggerIosTouchMove = () => {
149
148
  isJdAndIosDevice && iosDeviceStopNativeScrollEvent(null,TouchType.START, true)
150
149
  }
151
150
 
152
151
  const lodashThrottleTriggerIosTouchMove = lodashThrottle(
153
152
  triggerIosTouchMove,
154
153
  500,
155
154
  )
156
155
  const changeTouchEnd = (e) => {
157
156
  console.log('触发touchend事件')
158
157
  stopNativeScrollEvent(e, TouchType.END)
159
158
  }
160
159
 
161
160
  const recoverRootEleVerticalScroll = (touchEvent) => {
162
161
  const direction = GetSlideDirection(mLastClientPosRef.current.mLastClientX, mLastClientPosRef.current.mLastClientY, touchEvent.clientX, touchEvent.clientY)
163
162
  if (direction === 1 || direction === 2) {
164
163
  rootEleNode && rootEleNode.classList.contains('over-hidden') && rootEleNode.classList.remove('over-hidden')
165
164
  }
166
165
  }
167
166
  const changeTouchMove = (e) => {
168
167
  if (isH5AndJdShopView || isH5AndJdShopH5CustomScrollView) {
169
168
  const touchEvent =
170
169
  e?.originalEvent?.targetTouches[0] || e?.targetTouches[0]
171
170
  const xDiff = Math.abs(
172
171
  touchEvent.clientX - mLastClientPosRef.current.mLastClientX,
173
172
  ).toFixed(2)
174
173
  const yDiff = Math.abs(
175
174
  touchEvent.clientY - mLastClientPosRef.current.mLastClientY,
176
175
  ).toFixed(2)
177
176
  if(isJdApp) {
178
177
  if (xDiff >= window.JDJshopViewInfo.androidTouchSlop) {
179
178
  console.log(
180
179
  '横向滚动触发',
181
180
  xDiff,
182
181
  touchEvent,
183
182
  window.JDJshopViewInfo.androidTouchSlop,
184
183
  )
185
184
  iosNeedDisableVertical && isJdApp && lodashThrottleTriggerIosTouchMove()
186
185
  } else if (yDiff > window.JDJshopViewInfo.androidTouchSlop) {
187
186
  console.log(
188
187
  '纵向滚动触发',
189
188
  yDiff,
190
189
  touchEvent,
191
190
  window.JDJshopViewInfo.androidTouchSlop,
192
191
  )
193
192
  stopNativeScrollEvent(e, TouchType.END)
194
193
  }
195
194
  }
196
195
  (needShowHighVersion || isH5AndJdShopH5CustomScrollView) && recoverRootEleVerticalScroll(touchEvent)
197
196
  }
198
197
  }
199
198
  if (scrollX && (isH5AndJdShopView || isH5AndJdShopH5CustomScrollView)) {
200
199
  return (
201
200
  <ScrollView
202
201
  scrollX
203
202
  onTouchStart={changeTouchStart}
204
203
  onTouchEnd={changeTouchEnd}
205
204
  onTouchCancel={changeTouchEnd}
206
205
  onTouchMove={changeTouchMove}
207
206
  enhanced
208
207
  showScrollbar={false}
209
208
  style={style}
210
209
  className={classNames(className, {
211
210
  [customScrollViewStyle[
212
211
  'd-custom-ios-h5-extend-border-radius'
213
212
  ]]: isIosDevice,
214
213
  }, 'J_customScroll')}
215
214
  {...otherProps}
216
215
  >
217
216
  {children}
218
217
  </ScrollView>
219
218
  )
220
219
  } else {
221
220
  return (
222
221
  <ScrollView
223
222
  scrollX
224
223
  enhanced
225
224
  showScrollbar={false}
226
225
  {...otherProps}
227
226
  className={classNames(
228
227
  className,
229
228
  {
230
229
  [customScrollViewStyle[
231
230
  'd-custom-ios-mini-extend-border-radius'
232
231
  ]]:
233
232
  isIosDevice &&
234
233
  isWxMin &&
235
234
  scrollX &&
236
235
  style['borderRadius'],
237
236
  },
238
237
  {
239
238
  [customScrollViewStyle[
240
239
  'd-custom-ios-h5-extend-border-radius'
241
240
  ]]: isIosDevice,
242
241
  },
243
242
  {
244
243
  [customScrollViewStyle['d-custom-mini-hide-scroll']]:
245
244
  isWxMin,
246
245
  },
247
246
  )}
248
247
  style={style}
249
248
  >
250
249
  {children}
251
250
  </ScrollView>
252
251
  )
253
252
  }
254
253
  style: {},
255
254
  scrollX: false,
256
255
  scrollY: false,
257
256
  scrollWithAnimation: true,
258
257
  iosNeedDisableVertical: false,
259
258
  className: null,
259
+ import React, { useRef, useEffect } from 'react'
260
260
  isH5AndJdShopView,
261
261
  isAndroidDevice,
262
262
  isJdAndAndroidDevice,
263
263
  isJdAndIosDevice,
264
264
  isIosDevice,
265
265
  isJdApp,
266
266
  isWxMin,
267
267
  isH5AndJdShopViewH5Scroll,
268
268
  isH5AndJdShopH5CustomScrollView,
269
269
  isH5,
270
270
  isAppClassifyPage,
271
271
  lodashThrottle,
272
272
  START: 'start',
273
273
  MOVE: 'move',
274
274
  END: 'end',
275
275
  const rootEleNode = isH5 && document ? document.querySelector('body') : null
276
276
  const needShowHighVersion = isH5AndJdShopViewH5Scroll && !(global.info.queryInfo?.downgraded && global.info.queryInfo.downgraded === "true")
277
277
  const isJdAndH5ScrollState = needShowHighVersion || isH5AndJdShopH5CustomScrollView
278
278
 
279
279
  const touchstartEventBubbleFunc = (e) => {
280
280
  const isH5SwiperCustomEle = e?.target?.closest('.J_h5SwiperCustom')
281
281
  if(!isH5SwiperCustomEle){
282
282
  const hasCustomEle = e ? (e?.target?.closest('.J_customScroll') || e?.target?.closest('.J_customLayout')) : false
283
283
  if (isJdAndAndroidDevice && !hasCustomEle) {
284
284
  window.JdAndroid && window.JdAndroid.requestEvent(false)
285
285
  }
286
286
  !hasCustomEle && rootEleNode && rootEleNode.classList.contains('over-hidden') && rootEleNode.classList.remove('over-hidden')
287
287
  console.log("customScrollView所在页面document touch start事件是否有J_customScroll元素",hasCustomEle,"根元素是否有over-hidden",rootEleNode.classList)
288
288
  }
289
289
  }
290
290
  const touchstartEventCaptureFunc = (e) => {
291
291
  if (e && !e?.target?.closest('.J_h5SwiperCustom') && !e?.target?.closest('.J_customLayout')){
292
292
  rootEleNode && rootEleNode.classList.contains('over-hidden') && rootEleNode.classList.remove('over-hidden')
293
293
  console.log("customScrollView所在页面document touch start事件捕获阶段移除根元素是否有over-hidden",rootEleNode.classList)
294
294
  }
295
295
  }
296
296
  useEffect(() => {
297
297
  isJdApp && !window.JDJshopViewInfo.getAndroidTouchSlopState &&
298
298
  nativePageGetScaledTouchSlop((res) => {
299
299
  console.log('获取安卓系统滑动阈值', res)
300
300
  window.JDJshopViewInfo.androidTouchSlop = res
301
301
  window.JDJshopViewInfo.getAndroidTouchSlopState = true
302
302
  })
303
303
  if(isJdAndH5ScrollState && rootEleNode && !rootEleAddEventListenerState){
304
304
  global?.removeJdAndroidRquestEventForTouchStart && global.removeJdAndroidRquestEventForTouchStart()
305
305
  rootEleNode.addEventListener(
306
306
  'touchstart',
307
307
  touchstartEventBubbleFunc,
308
308
  false,
309
309
  )
310
310
 
311
311
  rootEleNode.addEventListener(
312
312
  'touchstart',
313
313
  touchstartEventCaptureFunc,
314
314
  true,
315
315
  )
316
316
  rootEleAddEventListenerState = true
317
317
  console.warn("customScrollView 初始化document监听完成")
318
318
  }
319
319
  return () => {
320
320
  if(isJdAndH5ScrollState && rootEleNode && rootEleAddEventListenerState){
321
321
  console.warn("customScrollView document监听取消完成")
322
322
  rootEleNode.removeEventListener(
323
323
  'touchstart',
324
324
  touchstartEventBubbleFunc,
325
325
  false,
326
326
  )
327
327
  rootEleNode.removeEventListener(
328
328
  'touchstart',
329
329
  touchstartEventCaptureFunc,
330
330
  true,
331
331
  )
332
332
  }
333
333
  }
334
334
  }, [])
335
335
 
336
336
  const androidDeviceStopNativeScrollEvent = (touchType) => {
337
337
  isJdApp &&
338
338
  isAndroidDevice &&
339
339
  window?.JdAndroid &&
340
340
  window?.JdAndroid.requestEvent(touchType === TouchType.START)
341
341
  console.log("触发window?.JdAndroid.requestEvent",touchType === TouchType.START,touchType)
342
342
  }
343
343
  const iosDeviceStopNativeScrollEvent = (e, touchType, sendIosState = true) => {
344
344
  e && e.stopPropagation()
345
345
  sendIosState && iosDeviceSendRouter(touchType)
346
346
  }
347
347
  const iosDeviceSendRouter = (state) => {
348
348
  window?.webkit?.messageHandlers?.MobileNavi?.postMessage?.({
349
349
  method: 'callRouterModuleWithParams',
350
350
  params: {
351
351
  routerURL: 'router://JDShopModule/processShoph5SlideState',
352
352
  routerParam: {
353
353
  slideDirection: 'horizontal',
354
354
  needDisableVertical: `${iosNeedDisableVertical}`,
355
355
  state,
356
356
  },
357
357
  callBackId: new Date().getTime(),
358
358
  },
359
359
  })
360
360
  }
361
361
  isAndroidDevice && androidDeviceStopNativeScrollEvent(touchType)
362
362
  console.log("当前customScrollView touch事件", touchType, e, "是否是e instanceof CustomEvent", e instanceof CustomEvent)
363
363
  const GetSlideAngle = (dx,dy) => {
364
364
  return Math.atan2(dy,dx) * 180 / Math.PI;
365
365
  }
366
366
  const GetSlideDirection = (startX, startY, endX, endY) => {
367
367
  const dy = startY - endY
368
368
  const dx = endX - startX
369
369
  let result = 0
370
370
  if (Math.abs(dx) < 2 && Math.abs(dy) < 2) {
371
371
  return result
372
372
  }
373
373
  const angle = GetSlideAngle(dx, dy)
374
374
  if (angle >= -45 && angle < 45) {
375
375
  result = 4
376
376
  } else if (angle >= 45 && angle < 135) {
377
377
  result = 1
378
378
  } else if (angle >= -135 && angle < -45) {
379
379
  result = 2
380
380
  } else if ((angle >= 135 && angle <= 180) || (angle >= -180 && angle < -135)) {
381
381
  result = 3
382
382
  }
383
383
  return result
384
384
  }
385
385
  if(isJdApp){
386
386
  stopNativeScrollEvent(e, TouchType.START, !iosNeedDisableVertical)
387
387
  if (isH5AndJdShopView || isH5AndJdShopH5CustomScrollView) {
388
388
  isJdAndH5ScrollState && rootEleNode && rootEleNode.classList.add('over-hidden')
389
389
  console.info("customScrollView touchstart 当前根元素是否添加还是删除over-hidden",TouchType.START,rootEleNode.classList)
390
390
  const touchEvent =
391
391
  e?.originalEvent?.targetTouches[0] || e?.targetTouches[0]
392
392
  mLastClientPosRef.current.mLastClientX = touchEvent.clientX
393
393
  mLastClientPosRef.current.mLastClientY = touchEvent.clientY
394
394
  console.log('ustomScrollView touchstart 获取mLastClientPosRef', mLastClientPosRef)
395
395
  }
396
396
  }
397
397
  stopNativeScrollEvent(e,TouchType.END)
398
398
  mLastClientPosRef.current.mLastClientX = 0
399
399
  mLastClientPosRef.current.mLastClientY = 0
400
400
  console.log('ustomScrollView touchend 获取mLastClientPosRef', mLastClientPosRef)
401
401
  const triggerIosTouchMove = () => {
402
402
  isJdAndIosDevice && iosDeviceStopNativeScrollEvent(null,TouchType.START, true)
403
403
  }
404
404
 
405
405
  const lodashThrottleTriggerIosTouchMove = lodashThrottle(
406
406
  triggerIosTouchMove,
407
407
  500,
408
408
  )
409
409
 
410
410
  const recoverRootEleVerticalScroll = (touchEvent) => {
411
411
  const direction = GetSlideDirection(mLastClientPosRef.current.mLastClientX, mLastClientPosRef.current.mLastClientY, touchEvent.clientX, touchEvent.clientY)
412
412
  if (direction === 1 || direction === 2) {
413
413
  rootEleNode && rootEleNode.classList.contains('over-hidden') && rootEleNode.classList.remove('over-hidden')
414
414
  }
415
415
  console.log("获取当前滚动方向,向上向下1、2",direction,'根元素的classList',rootEleNode.classList,'mLastClientPosRef.current.mLastClientX',mLastClientPosRef.current.mLastClientX)
416
416
  }
417
417
  const touchEvent =
418
418
  e?.originalEvent?.targetTouches[0] || e?.targetTouches[0]
419
419
  const xDiff = Math.abs(
420
420
  touchEvent.clientX - mLastClientPosRef.current.mLastClientX,
421
421
  ).toFixed(2)
422
422
  const yDiff = Math.abs(
423
423
  touchEvent.clientY - mLastClientPosRef.current.mLastClientY,
424
424
  ).toFixed(2)
425
425
  if(isJdApp) {
426
426
  if (xDiff >= window.JDJshopViewInfo.androidTouchSlop) {
427
427
  console.log(
428
428
  '横向滚动触发',
429
429
  xDiff,
430
430
  touchEvent,
431
431
  window.JDJshopViewInfo.androidTouchSlop,
432
432
  "iosNeedDisableVertical",
433
433
  iosNeedDisableVertical
434
434
  )
435
435
  iosNeedDisableVertical && isJdApp && lodashThrottleTriggerIosTouchMove()
436
436
  } else if (yDiff > window.JDJshopViewInfo.androidTouchSlop) {
437
437
  console.log(
438
438
  '纵向滚动触发',
439
439
  yDiff,
440
440
  touchEvent,
441
441
  window.JDJshopViewInfo.androidTouchSlop,
442
442
  )
443
443
  stopNativeScrollEvent(e, TouchType.END)
444
444
  }
445
445
  }
446
446
  isJdAndH5ScrollState && recoverRootEleVerticalScroll(touchEvent)
447
447
  <ScrollView
448
448
  scrollX
449
449
  onTouchStart={changeTouchStart}
450
450
  onTouchEnd={changeTouchEnd}
451
451
  onTouchCancel={changeTouchEnd}
452
452
  onTouchMove={changeTouchMove}
453
453
  enhanced
454
454
  showScrollbar={false}
455
455
  style={style}
456
456
  className={classNames(className, {
457
457
  [customScrollViewStyle[
458
458
  'd-custom-ios-h5-extend-border-radius'
459
459
  ]]: isIosDevice,
460
460
  }, 'J_customScroll')}
461
461
  {...otherProps}
462
462
  >
463
463
  {children}
464
464
  </ScrollView>
465
465
  )
466
466
  } else {
467
467
  return (
468
468
  <ScrollView
469
469
  scrollX
470
470
  enhanced
471
471
  showScrollbar={false}
472
472
  {...otherProps}
473
473
  className={classNames(
474
474
  className,
475
475
  {
476
476
  [customScrollViewStyle[
477
477
  'd-custom-ios-mini-extend-border-radius'
478
478
  ]]:
479
479
  isIosDevice &&
480
480
  isWxMin &&
481
481
  scrollX &&
482
482
  style['borderRadius'],
483
483
  },
484
484
  {
485
485
  [customScrollViewStyle[
486
486
  'd-custom-ios-h5-extend-border-radius'
487
487
  ]]: isIosDevice,
488
488
  },
489
489
  {
490
490
  [customScrollViewStyle['d-custom-mini-hide-scroll']]:
491
491
  isWxMin,
492
492
  },
493
493
  )}
494
494
  style={style}
495
495
  >
496
496
  {children}
497
497
  </ScrollView>
498
498
  )
499
499
  }
500
500
  iosNeedDisableVertical: false,
@@ -8,12 +8,17 @@
8
8
  background: rgba(0, 0, 0, 0.5);
9
9
  z-index: 222;
10
10
  .d-dialog-wrap {
11
+ position: relative;
11
12
  width: 100%;
12
13
  height: 100%;
13
14
  opacity: 0.01;
14
15
  transform: scale(0);
15
16
  animation: zoomIn 300ms;
16
17
  animation-fill-mode: forwards;
18
+ box-sizing: border-box;
19
+ &.d-dialog-jdapp-wrap{
20
+ padding-bottom: 80px;
21
+ }
17
22
  }
18
23
  .d-dialog-content {
19
24
  padding-top: 30px;