@conecli/cone-render 0.9.1-shop2.2 → 0.9.1-shop2.4

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/common/const.ts +1 -1
  2. package/dist/common/index.h5.ts +1 -1
  3. package/dist/common/index.jd.ts +1 -1
  4. package/dist/common/index.ts +1 -1
  5. package/dist/common/index.weapp.ts +1 -1
  6. package/dist/common/jssdk.ts +1 -0
  7. package/dist/common/pageType.ts +1 -0
  8. package/dist/common/token/index.h5.ts +1 -1
  9. package/dist/common/token/token.jd.ts +1 -1
  10. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  11. package/dist/components/base/Exposure/index.h5.tsx +1 -1
  12. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  13. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  14. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  15. package/dist/components/base/InViewRender/index.tsx +1 -1
  16. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  17. package/dist/components/base/LazyLoadImage/const.ts +1 -1
  18. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  19. package/dist/components/base/MobileCommonHeader/index.module.scss +9 -0
  20. package/dist/components/base/MobileCommonHeader/index.tsx +1 -0
  21. package/dist/components/base/NetworkDataError/const.ts +1 -1
  22. package/dist/components/base/NetworkDataError/index.module.scss +4 -0
  23. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  24. package/dist/components/base/Price/Double/index.tsx +1 -1
  25. package/dist/components/base/Price/index.tsx +1 -1
  26. package/dist/components/decorate/DecorateFloorModule/index.module.scss +21 -2
  27. package/dist/components/decorate/DecorateFloorModule/index.tsx +1 -1
  28. package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
  29. package/dist/components/isv/Floor/index.tsx +1 -1
  30. package/dist/components/remoteFloorItem.tsx +1 -1
  31. package/dist/interface/common.ts +1 -1
  32. package/dist/interface/component.ts +1 -1
  33. package/dist/jumpEventReport/const.ts +1 -1
  34. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  35. package/dist/jumpEventReport/index.h5.ts +1 -1
  36. package/dist/jumpEventReport/index.weapp.ts +1 -1
  37. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  38. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  39. package/dist/jumpEventReport/web/report.ts +1 -1
  40. package/dist/jumpEventReport/web.base.ts +1 -1
  41. package/dist/jumpEventReport/web.jd.ts +1 -1
  42. package/dist/jumpEventReport/web.jdb.ts +1 -1
  43. package/dist/jumpEventReport/web.jdjch.ts +1 -1
  44. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  45. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  46. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  47. package/dist/open/api/environment.ts +1 -1
  48. package/dist/open/api/index.ts +1 -1
  49. package/dist/open/api/track.ts +1 -1
  50. package/dist/open/components/index.ts +1 -1
  51. package/dist/service/fetchGateway.ts +1 -1
  52. package/dist/service/http/const.ts +1 -1
  53. package/dist/service/requestServer.ts +1 -1
  54. package/dist/utils/connectNativeJsBridge.ts +1 -1
  55. package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
  56. package/dist/utils/h5Utils.ts +1 -1
  57. package/dist/utils/index.h5.ts +1 -1
  58. package/dist/utils/index.ts +1 -1
  59. package/dist/utils/index.weapp.ts +1 -1
  60. package/dist/utils/jm-common.js +1 -1
  61. package/dist/utils/utils.ts +1 -1
  62. package/package.json +1 -1
@@ -1 +1 @@
1
- import { isApp } from '../../utils/jm-common'
2
1
  return new Promise((resolve, reject) => {
3
2
  let platform: string = getPlatform()
4
3
  if (platform === TokenPlatform.TYPE_JDAPP) {
5
4
  ready('jmfe', 3000)
6
5
  .then(() => {
7
6
  console.log('window.jmfe已经存在:', jmfe)
8
7
  import('./token.jd')
9
8
  .then((data) => {
10
9
  console.log('data:', data)
11
10
  resolve(data)
12
11
  })
13
12
  .catch((err) => {
14
13
  reject(err)
15
14
  })
16
15
  })
17
16
  .catch((e) => {
18
17
  console.log('window.jmfe不存在')
19
18
  reject(e)
20
19
  })
21
20
  }
22
21
  else if (platform === TokenPlatform.TYPE_WQ) {
23
22
  import('./token.wxapp')
24
23
  .then((data) => {
25
24
  console.log('data:', data)
26
25
  resolve(data)
27
26
  })
28
27
  .catch((err) => {
29
28
  reject(err)
30
29
  })
31
30
  } else {
32
31
  import('./token')
33
32
  .then((data) => {
34
33
  console.log('data:', data)
35
34
  resolve(data)
36
35
  })
37
36
  .catch((err) => {
38
37
  reject(err)
39
38
  })
40
39
  }
41
40
  })
42
41
  console.log(e);
43
42
  return {}
44
43
  return new Promise((resolve) => {
45
44
  loadTokenPromise
46
45
  .then((proxy: any) => {
47
46
  if (proxy?.isLogin) {
48
47
  proxy?.isLogin().then((data: boolean) => {
49
48
  resolve(data)
50
49
  })
51
50
  } else {
52
51
  resolve(false)
53
52
  }
54
53
  })
55
54
  .catch((err) => {
56
55
  resolve(false)
57
56
  })
58
57
  })
59
58
  return new Promise((resolve) => {
60
59
  loadTokenPromise
61
60
  .then((proxy: any) => {
62
61
  if (proxy?.getIsvToken) {
63
62
  proxy?.getIsvToken().then((data: string) => {
64
63
  resolve(data)
65
64
  })
66
65
  } else {
67
66
  resolve('')
68
67
  }
69
68
  })
70
69
  .catch((err) => {
71
70
  resolve('')
72
71
  })
73
72
  })
74
73
  return new Promise((resolve) => {
75
74
  loadTokenPromise
76
75
  .then((proxy: any) => {
77
76
  if (proxy?.toLogin) {
78
77
  proxy?.toLogin(options)
79
78
  resolve(true)
80
79
  } else {
81
80
  resolve(false)
82
81
  }
83
82
  })
84
83
  .catch((err) => {
85
84
  resolve(false)
86
85
  })
87
86
  })
88
87
  let platform = TokenPlatform.TYPE_M
89
88
  if (isApp('jd')) {
90
89
  platform = TokenPlatform.TYPE_JDAPP
91
90
  }
92
91
  else if (isApp('wx') && isApp('mp')) {
93
92
  platform = TokenPlatform.TYPE_WQ
94
93
  }
95
94
  return platform
96
95
  let platform = getPlatform()
97
96
  let source = platform
98
97
  if (platform === TokenPlatform.TYPE_M || platform === TokenPlatform.TYPE_WQ) {
99
98
  source = TokenPlatform.TYPE_JDAPP
100
99
  }
101
100
  return source
102
101
  return window?.page_data?.pageChannel || ''
102
+ import { isApp } from '../../utils/jm-common'
103
103
  return new Promise((resolve, reject) => {
104
104
  let platform: string = getPlatform()
105
105
  if (platform === TokenPlatform.TYPE_JDAPP) {
106
106
  ready('jmfe', 3000)
107
107
  .then(() => {
108
108
  console.log('window.jmfe已经存在:', window['jmfe'])
109
109
  import('./token.jd')
110
110
  .then((data) => {
111
111
  console.log('data:', data)
112
112
  resolve(data)
113
113
  })
114
114
  .catch((err) => {
115
115
  reject(err)
116
116
  })
117
117
  })
118
118
  .catch((e) => {
119
119
  console.log('window.jmfe不存在')
120
120
  reject(e)
121
121
  })
122
122
  }
123
123
  else if (platform === TokenPlatform.TYPE_WQ) {
124
124
  import('./token.wxapp')
125
125
  .then((data) => {
126
126
  console.log('data:', data)
127
127
  resolve(data)
128
128
  })
129
129
  .catch((err) => {
130
130
  reject(err)
131
131
  })
132
132
  } else {
133
133
  import('./token')
134
134
  .then((data) => {
135
135
  console.log('data:', data)
136
136
  resolve(data)
137
137
  })
138
138
  .catch((err) => {
139
139
  reject(err)
140
140
  })
141
141
  }
142
142
  })
143
143
  console.log(e)
144
144
  return {}
145
145
  return new Promise((resolve) => {
146
146
  loadTokenPromise
147
147
  .then((proxy: any) => {
148
148
  if (proxy?.isLogin) {
149
149
  proxy?.isLogin().then((data: boolean) => {
150
150
  resolve(data)
151
151
  })
152
152
  } else {
153
153
  resolve(false)
154
154
  }
155
155
  })
156
156
  .catch((err) => {
157
157
  resolve(false)
158
158
  })
159
159
  })
160
160
  return new Promise((resolve) => {
161
161
  loadTokenPromise
162
162
  .then((proxy: any) => {
163
163
  if (proxy?.getIsvToken) {
164
164
  proxy?.getIsvToken().then((data: string) => {
165
165
  resolve(data)
166
166
  })
167
167
  } else {
168
168
  resolve('')
169
169
  }
170
170
  })
171
171
  .catch((err) => {
172
172
  resolve('')
173
173
  })
174
174
  })
175
175
  return new Promise((resolve) => {
176
176
  loadTokenPromise
177
177
  .then((proxy: any) => {
178
178
  if (proxy?.toLogin) {
179
179
  proxy?.toLogin(options)
180
180
  resolve(true)
181
181
  } else {
182
182
  resolve(false)
183
183
  }
184
184
  })
185
185
  .catch((err) => {
186
186
  resolve(false)
187
187
  })
188
188
  })
189
189
  let platform = TokenPlatform.TYPE_M
190
190
  if (isApp('jd')) {
191
191
  platform = TokenPlatform.TYPE_JDAPP
192
192
  }
193
193
  else if (isApp('wx') && isApp('mp')) {
194
194
  platform = TokenPlatform.TYPE_WQ
195
195
  }
196
196
  return platform
197
197
  let platform = getPlatform()
198
198
  let source = platform
199
199
  if (platform === TokenPlatform.TYPE_M || platform === TokenPlatform.TYPE_WQ) {
200
200
  source = TokenPlatform.TYPE_JDAPP
201
201
  }
202
202
  return source
203
203
  return window?.page_data?.pageChannel || ''
@@ -1 +1 @@
1
- console.log('load token.jd')
2
1
  return new Promise((resolve) => {
3
2
  if (jmfe) {
4
3
  jmfe.isJDAppLogin().then(({ data }) => {
5
4
  if (data === '1') {
6
5
  resolve(true)
7
6
  } else if (data === '0') {
8
7
  resolve(false)
9
8
  }
10
9
  })
11
10
  } else {
12
11
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js')
13
12
  resolve(false)
14
13
  }
15
14
  })
16
15
  return requestIsvToken(window.location.href)
17
16
  if (jmfe) {
18
17
  jmfe.toLogin(options)
19
18
  } else {
20
19
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js')
21
20
  }
22
21
  if (jmfe) {
23
22
  console.log('registerCode:', code)
24
23
  jmfe.registerCode(code)
25
24
  } else {
26
25
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js')
27
26
  }
28
27
  return new Promise((resolve) => {
29
28
  console.log('requestIsvToken:', url)
30
29
  if (jmfe) {
31
30
  jmfe
32
31
  .requestIsvToken(url)
33
32
  .then((result: any) => {
34
33
  console.log('requestIsvToken result:' + JSON.stringify(result))
35
34
  const { status, data, msg } = result
36
35
  if (status === '0') {
37
36
  resolve(data || '')
38
37
  } else {
39
38
  resolve('')
40
39
  }
41
40
  })
42
41
  .catch((e: any) => {
43
42
  console.log('requestIsvToken error:' + JSON.stringify(e))
44
43
  resolve('')
45
44
  })
46
45
  } else {
47
46
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js')
48
47
  resolve('')
49
48
  }
50
49
  })
50
+ console.log('load token.jd')
51
51
  return new Promise((resolve) => {
52
52
  if (window['jmfe']) {
53
53
  window['jmfe'].isJDAppLogin().then(({ data }) => {
54
54
  if (data === '1') {
55
55
  resolve(true)
56
56
  } else if (data === '0') {
57
57
  resolve(false)
58
58
  }
59
59
  })
60
60
  } else {
61
61
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js')
62
62
  resolve(false)
63
63
  }
64
64
  })
65
65
  return requestIsvToken(window.location.href)
66
66
  if (window['jmfe']) {
67
67
  window['jmfe'].toLogin(options)
68
68
  } else {
69
69
  console.warn('jmfe对象不存在,可能没有提前动态引入jd-jssdk.js')
70
70
  }
71
71
  if (window['jmfe']) {
72
72
  console.log('registerCode:', code)
73
73
  window['jmfe'].registerCode(code)
74
74
  } else {
75
75
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js')
76
76
  }
77
77
  return new Promise((resolve) => {
78
78
  console.log('requestIsvToken:', url)
79
79
  if (window['jmfe']) {
80
80
  window['jmfe']
81
81
  .requestIsvToken(url)
82
82
  .then((result: any) => {
83
83
  console.log('requestIsvToken result:' + JSON.stringify(result))
84
84
  const { status, data, msg } = result
85
85
  if (status === '0') {
86
86
  resolve(data || '')
87
87
  } else {
88
88
  resolve('')
89
89
  }
90
90
  })
91
91
  .catch((e: any) => {
92
92
  console.log('requestIsvToken error:' + JSON.stringify(e))
93
93
  resolve('')
94
94
  })
95
95
  } else {
96
96
  console.warn('jmfe对象不存在,可能没有提前引入jd-jssdk.js')
97
97
  resolve('')
98
98
  }
99
99
  })
@@ -1 +1 @@
1
- import React, {useRef, useEffect} from 'react'
2
1
  isH5AndJdShopView,
3
2
  isAndroidDevice,
4
3
  isIosDevice,
5
4
  isJdApp,
6
5
  isWxMin,
7
6
  isH5AndJdShopViewH5Scroll,
8
7
  isH5,
9
8
  const rootEleNode = isH5 && document ? document.querySelector('body') : null
10
9
  const needShowHighVersion = isH5AndJdShopViewH5Scroll && !(global.info.queryInfo?.downgraded && global.info.queryInfo.downgraded === "true")
11
10
  const GetSlideAngle = (dx,dy) => {
12
11
  return Math.atan2(dy,dx) * 180 / Math.PI;
13
12
  }
14
13
  const GetSlideDirection = (startX,startY,endX,endY) => {
15
14
  const dy = startY - endY;
16
15
  const dx = endX - startX;
17
16
  let result = 0;
18
17
  if (Math.abs(dx) < 2 && Math.abs(dy) < 2) {
19
18
  return result;
20
19
  }
21
20
  const angle = GetSlideAngle(dx, dy);
22
21
  if (angle >= -45 && angle < 45) {
23
22
  result = 4;
24
23
  }else if (angle >= 45 && angle < 135) {
25
24
  result = 1;
26
25
  }else if (angle >= -135 && angle < -45) {
27
26
  result = 2;
28
27
  }else if ((angle >= 135 && angle <= 180) || (angle >= -180 && angle < -135)) {
29
28
  result = 3;
30
29
  }
31
30
  return result;
32
31
  }
33
32
  needShowHighVersion && rootEleNode && rootEleNode.classList.add('over-hidden')
34
33
  const touchEvent =
35
34
  e?.originalEvent?.targetTouches[0] || e?.targetTouches[0]
36
35
  const xDiff = Math.abs(
37
36
  touchEvent.clientX - mLastClientPosRef.current.mLastClientX,
38
37
  ).toFixed(2)
39
38
  const yDiff = Math.abs(
40
39
  touchEvent.clientY - mLastClientPosRef.current.mLastClientY,
41
40
  ).toFixed(2)
42
41
  if(isAndroidDevice) {
43
42
  if (xDiff >= window.JDJshopViewInfo.androidTouchSlop) {
44
43
  console.log(
45
44
  '横向滚动触发',
46
45
  xDiff,
47
46
  touchEvent,
48
47
  window.JDJshopViewInfo.androidTouchSlop,
49
48
  )
50
49
  } else if (yDiff > window.JDJshopViewInfo.androidTouchSlop) {
51
50
  console.log(
52
51
  '纵向滚动触发',
53
52
  yDiff,
54
53
  touchEvent,
55
54
  window.JDJshopViewInfo.androidTouchSlop,
56
55
  )
57
56
  androidDeviceStopNativeScrollEvent(false)
58
57
  }
59
58
  }
60
59
  if(needShowHighVersion) {
61
60
  const direction = GetSlideDirection(mLastClientPosRef.current.mLastClientX, mLastClientPosRef.current.mLastClientY, touchEvent.clientX, touchEvent.clientY);
62
61
  if(direction === 1 || direction === 2) {
63
62
  rootEleNode && rootEleNode.classList.remove('over-hidden')
64
63
  }
65
64
  }
66
65
  <ScrollView
67
66
  scrollX
68
67
  onTouchStart={changeTouchStart}
69
68
  onTouchEnd={changeTouchEnd}
70
69
  onTouchCancel={changeTouchEnd}
71
70
  onTouchMove={changeTouchMove}
72
71
  enhanced
73
72
  showScrollbar={false}
74
73
  style={style}
75
74
  className={classNames(className, {
76
75
  [customScrollViewStyle[
77
76
  'd-custom-ios-h5-extend-border-radius'
78
77
  ]]: isIosDevice,
79
78
  },'J_customScroll')}
80
79
  {...otherProps}
81
80
  >
82
81
  {children}
83
82
  </ScrollView>
83
+ import React, { useRef, useEffect } from 'react'
84
84
  isH5AndJdShopView,
85
85
  isAndroidDevice,
86
86
  isIosDevice,
87
87
  isJdApp,
88
88
  isWxMin,
89
89
  isH5AndJdShopViewH5Scroll,
90
90
  isH5AndJdShopH5CustomScrollView,
91
91
  isH5,
92
92
  isAppClassifyPage,
93
93
  START: 'start',
94
94
  END: 'end',
95
95
  const { scrollX, children, style = {}, className, ...otherProps } = props
96
96
  const rootEleNode = isH5 && document ? document.querySelector('body') : null
97
97
  const needShowHighVersion = isH5AndJdShopViewH5Scroll && !(global.info.queryInfo?.downgraded && global.info.queryInfo.downgraded === 'true')
98
98
  const mLastClientPosRef = useRef({
99
99
  mLastClientX: 0,
100
100
  mLastClientY: 0,
101
101
  })
102
102
  const touchstartEventCaptureFunc = () => {
103
103
  console.log('捕获阶段优先判断body上有没有over-hidden,有则取消')
104
104
  rootEleNode && rootEleNode.classList.contains('over-hidden') && rootEleNode.classList.remove('over-hidden')
105
105
  }
106
106
  useEffect(() => {
107
107
  !window.JDJshopViewInfo.getAndroidTouchSlopState &&
108
108
  nativePageGetScaledTouchSlop((res) => {
109
109
  console.log('获取安卓系统滑动阈值', res)
110
110
  window.JDJshopViewInfo.androidTouchSlop = res
111
111
  window.JDJshopViewInfo.getAndroidTouchSlopState = true
112
112
  })
113
113
 
114
114
  rootEleNode && rootEleNode.addEventListener(
115
115
  'touchstart',
116
116
  touchstartEventCaptureFunc,
117
117
  true,
118
118
  )
119
119
  return () => {
120
120
  rootEleNode && rootEleNode.removeEventListener(
121
121
  'touchstart',
122
122
  touchstartEventCaptureFunc,
123
123
  true,
124
124
  )
125
125
  }
126
126
  }, [])
127
127
 
128
128
  const androidDeviceStopNativeScrollEvent = (touchType) => {
129
129
  isJdApp &&
130
130
  isAndroidDevice &&
131
131
  window?.JdAndroid &&
132
132
  window?.JdAndroid.requestEvent(touchType === TouchType.START)
133
133
  }
134
134
  const iosDeviceStopNativeScrollEvent = (e, touchType) => {
135
135
  e && e.stopPropagation()
136
136
  iosDeviceSendRouter(touchType)
137
137
  }
138
138
  const iosDeviceSendRouter = (state) => {
139
139
  window?.webkit?.messageHandlers?.MobileNavi.postMessage?.({
140
140
  method: 'callRouterModuleWithParams',
141
141
  params: {
142
142
  routerURL: 'router://JDShopModule/processShoph5SlideState',
143
143
  routerParam: { slideDirection: 'horizontal', state },
144
144
  callBackId: new Date().getTime(),
145
145
  },
146
146
  })
147
147
  }
148
148
  const stopNativeScrollEvent = (e: Event, touchType) => {
149
149
  if (isJdApp) {
150
150
  isIosDevice && !isAppClassifyPage && iosDeviceStopNativeScrollEvent(e, touchType)
151
151
  isAndroidDevice && androidDeviceStopNativeScrollEvent(touchType)
152
152
  }
153
153
  }
154
154
  const GetSlideAngle = (dx, dy) => {
155
155
  return Math.atan2(dy, dx) * 180 / Math.PI
156
156
  }
157
157
  const GetSlideDirection = (startX, startY, endX, endY) => {
158
158
  const dy = startY - endY
159
159
  const dx = endX - startX
160
160
  let result = 0
161
161
  if (Math.abs(dx) < 2 && Math.abs(dy) < 2) {
162
162
  return result
163
163
  }
164
164
  const angle = GetSlideAngle(dx, dy)
165
165
  if (angle >= -45 && angle < 45) {
166
166
  result = 4
167
167
  } else if (angle >= 45 && angle < 135) {
168
168
  result = 1
169
169
  } else if (angle >= -135 && angle < -45) {
170
170
  result = 2
171
171
  } else if ((angle >= 135 && angle <= 180) || (angle >= -180 && angle < -135)) {
172
172
  result = 3
173
173
  }
174
174
  return result
175
175
  }
176
176
  const changeTouchStart = (e) => {
177
177
  stopNativeScrollEvent(e, TouchType.START)
178
178
  if (isH5AndJdShopView || isH5AndJdShopH5CustomScrollView) {
179
179
  (needShowHighVersion || isH5AndJdShopH5CustomScrollView) && rootEleNode && rootEleNode.classList.add('over-hidden')
180
180
  const touchEvent =
181
181
  e?.originalEvent?.targetTouches[0] || e?.targetTouches[0]
182
182
  mLastClientPosRef.current.mLastClientX = touchEvent.clientX
183
183
  mLastClientPosRef.current.mLastClientY = touchEvent.clientY
184
184
  console.log('TouchStart获取mLastClientPosRef', mLastClientPosRef)
185
185
  }
186
186
  }
187
187
  const changeTouchEnd = (e) => {
188
188
  console.log('触发touchend事件')
189
189
  stopNativeScrollEvent(e, TouchType.END)
190
190
  }
191
191
 
192
192
  const recoverRootEleVerticalScroll = (touchEvent) => {
193
193
  const direction = GetSlideDirection(mLastClientPosRef.current.mLastClientX, mLastClientPosRef.current.mLastClientY, touchEvent.clientX, touchEvent.clientY)
194
194
  if (direction === 1 || direction === 2) {
195
195
  rootEleNode && rootEleNode.classList.contains('over-hidden') && rootEleNode.classList.remove('over-hidden')
196
196
  }
197
197
  }
198
198
  const changeTouchMove = (e) => {
199
199
  if (isH5AndJdShopView || isH5AndJdShopH5CustomScrollView) {
200
200
  const touchEvent =
201
201
  e?.originalEvent?.targetTouches[0] || e?.targetTouches[0]
202
202
  const xDiff = Math.abs(
203
203
  touchEvent.clientX - mLastClientPosRef.current.mLastClientX,
204
204
  ).toFixed(2)
205
205
  const yDiff = Math.abs(
206
206
  touchEvent.clientY - mLastClientPosRef.current.mLastClientY,
207
207
  ).toFixed(2)
208
208
  console.log(
209
209
  '滑动触发结果 xDiff yDiff window.JDJshopViewInfo.androidTouchSlop',
210
210
  xDiff,
211
211
  yDiff,
212
212
  window.JDJshopViewInfo.androidTouchSlop,
213
213
  )
214
214
  if (isAndroidDevice) {
215
215
  if (xDiff >= window.JDJshopViewInfo.androidTouchSlop) {
216
216
  console.log(
217
217
  '横向滚动触发',
218
218
  xDiff,
219
219
  touchEvent,
220
220
  window.JDJshopViewInfo.androidTouchSlop,
221
221
  )
222
222
  } else if (yDiff > window.JDJshopViewInfo.androidTouchSlop) {
223
223
  console.log(
224
224
  '纵向滚动触发',
225
225
  yDiff,
226
226
  touchEvent,
227
227
  window.JDJshopViewInfo.androidTouchSlop,
228
228
  )
229
229
  stopNativeScrollEvent(e, TouchType.END)
230
230
  }
231
231
  }
232
232
  (needShowHighVersion || isH5AndJdShopH5CustomScrollView) && recoverRootEleVerticalScroll(touchEvent)
233
233
  }
234
234
  }
235
235
  if (scrollX && (isH5AndJdShopView || isH5AndJdShopH5CustomScrollView)) {
236
236
  return (
237
237
  <ScrollView
238
238
  scrollX
239
239
  onTouchStart={changeTouchStart}
240
240
  onTouchEnd={changeTouchEnd}
241
241
  onTouchCancel={changeTouchEnd}
242
242
  onTouchMove={changeTouchMove}
243
243
  enhanced
244
244
  showScrollbar={false}
245
245
  style={style}
246
246
  className={classNames(className, {
247
247
  [customScrollViewStyle[
248
248
  'd-custom-ios-h5-extend-border-radius'
249
249
  ]]: isIosDevice,
250
250
  }, 'J_customScroll')}
251
251
  {...otherProps}
252
252
  >
253
253
  {children}
254
254
  </ScrollView>
255
255
  )
256
256
  } else {
257
257
  return (
258
258
  <ScrollView
259
259
  scrollX
260
260
  enhanced
261
261
  showScrollbar={false}
262
262
  {...otherProps}
263
263
  className={classNames(
264
264
  className,
265
265
  {
266
266
  [customScrollViewStyle[
267
267
  'd-custom-ios-mini-extend-border-radius'
268
268
  ]]:
269
269
  isIosDevice &&
270
270
  isWxMin &&
271
271
  scrollX &&
272
272
  style['borderRadius'],
273
273
  },
274
274
  {
275
275
  [customScrollViewStyle[
276
276
  'd-custom-ios-h5-extend-border-radius'
277
277
  ]]: isIosDevice,
278
278
  },
279
279
  {
280
280
  [customScrollViewStyle['d-custom-mini-hide-scroll']]:
281
281
  isWxMin,
282
282
  },
283
283
  )}
284
284
  style={style}
285
285
  >
286
286
  {children}
287
287
  </ScrollView>
288
288
  )
289
289
  }
290
290
  style: {},
291
291
  scrollX: false,
292
292
  scrollY: false,
293
293
  scrollWithAnimation: true,
294
294
  className: null,
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  (
3
2
  <View
4
3
  className={classNames(
5
4
  exposureStyle['d-floor-exposure'],
6
5
  className,
7
6
  floorName,
8
7
  )}
9
8
  id={`J_floor_${floorName}`}
10
9
  />
11
10
  )
11
+ import Taro from '@tarojs/taro'
12
12
  const { windowHeight } = taroJdBaseInfo.info.sysInfo
13
13
  (
14
14
  <View
15
15
  className={classNames(
16
16
  exposureStyle['d-floor-exposure'],
17
17
  className,
18
18
  floorName,
19
19
  )}
20
20
  id={`J_floor_${floorName}`}
21
21
  />
22
22
  )