@conecli/cone-render 0.10.1-shop3.5 → 0.10.1-shop3.6

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 (36) 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/components/base/CommonFloorHead/index.module.scss +126 -111
  7. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  8. package/dist/components/base/CustomScrollView/index-back.tsx +1 -0
  9. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  10. package/dist/components/base/Dialog/index.module.scss +11 -0
  11. package/dist/components/base/InViewRender/index.tsx +1 -1
  12. package/dist/components/floorItem.weapp.tsx +1 -1
  13. package/dist/interface/common.ts +1 -1
  14. package/dist/jumpEventReport/const.ts +1 -1
  15. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  16. package/dist/jumpEventReport/web.jd.ts +1 -1
  17. package/dist/libs/taroAppReport.js +2 -2
  18. package/dist/modules/ContainerFloorList/index.h5.module.scss +66 -56
  19. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  20. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  21. package/dist/open/api/shopMember.ts +1 -1
  22. package/dist/sass/app.h5.scss +252 -224
  23. package/dist/service/fetchGateway.ts +1 -1
  24. package/dist/service/fetchGateway.weapp.ts +1 -0
  25. package/dist/service/http/colorSign.ts +1 -1
  26. package/dist/service/http/const.ts +1 -1
  27. package/dist/service/http/h5Http.ts +1 -1
  28. package/dist/service/requestServer.h5.ts +1 -1
  29. package/dist/service/requestServer.ts +1 -1
  30. package/dist/utils/h5Utils.ts +1 -1
  31. package/dist/utils/index.h5.ts +1 -1
  32. package/dist/utils/index.ts +1 -1
  33. package/dist/utils/index.weapp.ts +1 -1
  34. package/dist/utils/jumpExtMapUtil.js +1 -0
  35. package/dist/utils/utils.ts +1 -1
  36. package/package.json +1 -1
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  getNativePageScrollRes,
3
2
  latestFromNativeMsgStorage,
4
3
  const { children, placeholder, height, className, inViewCallback } = props
5
4
  const [componentShowState, setComponentShowState] = useState(false)
6
5
  const [componentRenderShowState, setComponentRenderShowState] = useState(
7
6
  false,
8
7
  )
9
8
  const componentLazyRef = useRef<HTMLElement | null>(null)
10
9
  const componentShowStateRef = useRef(false)
11
10
  const needShowHighVersion =
12
11
  isH5AndJdShopViewH5Scroll &&
13
12
  !(
14
13
  global.info.queryInfo?.downgraded &&
15
14
  global.info.queryInfo.downgraded === 'true'
16
15
  )
17
16
  const rootDom =
18
17
  isH5AndJdShopView && needShowHighVersion
19
18
  ? null
20
19
  : document.querySelector('#J_shopHomeRoot')
21
20
  if (isH5AndJdShopView && !needShowHighVersion && !isAppStowShop) {
22
21
  useEffect(() => {
23
22
  const latestRes =
24
23
  latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
25
24
  !componentShowStateRef.current && dealPageScrollInfo(latestRes)
26
25
  Taro.eventCenter.on(TaroEventType.PAGE_SCROLL, res => {
27
26
  !componentShowStateRef.current && dealPageScrollInfo(res)
28
27
  })
29
28
  }, [])
30
29
  useEffect(() => {
31
30
  if (componentShowState) {
32
31
  typeof inViewCallback === 'function' && inViewCallback()
33
32
  }
34
33
  }, [componentShowState])
35
34
 
36
35
  const dealPageScrollInfo = res => {
37
36
  const { displayHeight, offSetY } = getNativePageScrollRes(res) || {}
38
37
  if (
39
38
  typeof displayHeight === 'undefined' ||
40
39
  typeof offSetY === 'undefined'
41
40
  )
42
41
  return
43
42
  if (componentLazyRef.current) {
44
43
  const eleClientRect = componentLazyRef.current.getBoundingClientRect()
45
44
  const getContainerHeightOffSetY = displayHeight + offSetY
46
45
  const eleOffsetTop = Math.ceil(eleClientRect.top)
47
46
  if (!componentShowStateRef.current) {
48
47
  if (getContainerHeightOffSetY > eleOffsetTop) {
49
48
  componentShowStateRef.current = true
50
49
  setComponentShowState(true)
51
50
  Taro.nextTick(() => {
52
51
  setComponentRenderShowState(true)
53
52
  })
54
53
  }
55
54
  }
56
55
  }
57
56
  }
58
57
  return (
59
58
  <View
60
59
  ref={componentLazyRef}
61
60
  className={classNames(
62
61
  lazyLayoutLoadStyle['d-app-floor-lazy-layout-load'],
63
62
  'd-app-floor-lazy-load',
64
63
  className,
65
64
  )}
66
65
  style={{
67
66
  minHeight: `${
68
67
  componentRenderShowState
69
68
  ? 'auto'
70
69
  : height + (typeof height === 'number' ? 'px' : '')
71
70
  }`,
72
71
  backgroundColor: componentRenderShowState ? 'transparent' : '#ffffff',
73
72
  }}
74
73
  >
75
74
  {componentShowState ? children : placeholder}
76
75
  </View>
77
76
  )
78
77
  } else {
79
78
  const { ref, inView } = useInView({
80
79
  threshold: 0.5,
81
80
  triggerOnce: true,
82
81
  root: rootDom || null,
83
82
  rootMargin: `0px 0px 0px 0px`,
84
83
  delay: 300,
85
84
  })
86
85
  useEffect(() => {
87
86
  if (inView) {
88
87
  typeof inViewCallback === 'function' && inViewCallback()
89
88
  }
90
89
  }, [inView])
91
90
  return (
92
91
  <View
93
92
  className={className}
94
93
  ref={ref}
95
94
  style={{
96
95
  minHeight: inView
97
96
  ? 'auto'
98
97
  : typeof height === 'number'
99
98
  ? `${height}px`
100
99
  : height,
101
100
  backgroundColor: 'transparent',
102
101
  }}
103
102
  >
104
103
  {inView ? children : placeholder}
105
104
  </View>
106
105
  )
107
106
  }
108
107
  children: null,
109
108
  placeholder: null,
110
109
  height: 1,
111
110
  className: '',
112
111
  lazyNodeClassName: '',
113
112
  inViewCallback: null,
113
+ import Taro from '@tarojs/taro';
114
114
  getNativePageScrollRes,
115
115
  latestFromNativeMsgStorage,
116
116
  const { children, placeholder, height, className, inViewCallback } = props;
117
117
  const [componentShowState, setComponentShowState] = useState(false);
118
118
  const [componentRenderShowState, setComponentRenderShowState] = useState(false);
119
119
  const componentLazyRef = useRef<HTMLElement | null>(null);
120
120
  const componentShowStateRef = useRef(false);
121
121
  const needShowHighVersion =
122
122
  isH5AndJdShopViewH5Scroll &&
123
123
  !(global.info.queryInfo?.downgraded && global.info.queryInfo.downgraded === 'true');
124
124
  const rootDom =
125
125
  isH5AndJdShopView && needShowHighVersion ? null : document.querySelector('#J_shopHomeRoot');
126
126
  if (isH5AndJdShopView && !needShowHighVersion && !isAppStowShop) {
127
127
  useEffect(() => {
128
128
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {};
129
129
  !componentShowStateRef.current && dealPageScrollInfo(latestRes);
130
130
  Taro.eventCenter.on(TaroEventType.PAGE_SCROLL, (res) => {
131
131
  !componentShowStateRef.current && dealPageScrollInfo(res);
132
132
  });
133
133
  }, []);
134
134
  useEffect(() => {
135
135
  if (componentShowState) {
136
136
  typeof inViewCallback === 'function' && inViewCallback();
137
137
  }
138
138
  }, [componentShowState]);
139
139
 
140
140
  const dealPageScrollInfo = (res) => {
141
141
  const { displayHeight, offSetY } = getNativePageScrollRes(res) || {};
142
142
  if (typeof displayHeight === 'undefined' || typeof offSetY === 'undefined') return;
143
143
  if (componentLazyRef.current) {
144
144
  const eleClientRect = componentLazyRef.current.getBoundingClientRect();
145
145
  const getContainerHeightOffSetY = displayHeight + offSetY;
146
146
  const eleOffsetTop = Math.ceil(eleClientRect.top);
147
147
  if (!componentShowStateRef.current) {
148
148
  if (getContainerHeightOffSetY > eleOffsetTop) {
149
149
  componentShowStateRef.current = true;
150
150
  setComponentShowState(true);
151
151
  Taro.nextTick(() => {
152
152
  setComponentRenderShowState(true);
153
153
  });
154
154
  }
155
155
  }
156
156
  }
157
157
  };
158
158
  return (
159
159
  <View
160
160
  ref={componentLazyRef}
161
161
  className={classNames(
162
162
  lazyLayoutLoadStyle['d-app-floor-lazy-layout-load'],
163
163
  'd-app-floor-lazy-load',
164
164
  className,
165
165
  )}
166
166
  style={{
167
167
  minHeight: `${
168
168
  componentRenderShowState ? 'auto' : height + (typeof height === 'number' ? 'px' : '')
169
169
  }`,
170
170
  backgroundColor: componentRenderShowState ? 'transparent' : '#ffffff',
171
171
  }}
172
172
  >
173
173
  {componentShowState ? children : placeholder}
174
174
  </View>
175
175
  );
176
176
  } else {
177
177
  const { ref, inView } = useInView({
178
178
  threshold: 0.5,
179
179
  triggerOnce: true,
180
180
  root: rootDom || null,
181
181
  rootMargin: `0px 0px 0px 0px`,
182
182
  delay: 300,
183
183
  });
184
184
  useEffect(() => {
185
185
  if (inView) {
186
186
  typeof inViewCallback === 'function' && inViewCallback();
187
187
  }
188
188
  }, [inView]);
189
189
  return (
190
190
  <div
191
191
  className={className}
192
192
  ref={ref}
193
193
  style={{
194
194
  minHeight: inView ? 'auto' : typeof height === 'number' ? `${height}px` : height,
195
195
  backgroundColor: 'transparent',
196
196
  }}
197
197
  >
198
198
  {inView ? children : placeholder}
199
199
  </div>
200
200
  );
201
201
  }
202
202
  children: null,
203
203
  placeholder: null,
204
204
  height: 1,
205
205
  className: '',
206
206
  lazyNodeClassName: '',
207
207
  inViewCallback: null,
@@ -1 +1 @@
1
- import React from 'react'
2
1
  const {
3
2
  floorData,
4
3
  renderSourceType = BUSINESS_TYPE.ONLINE,
5
4
  builtInComponents = {},
6
5
  updateContainerFloorListDataFn,
7
6
  } = props
8
7
  const isDevMode = renderSourceType === BUSINESS_TYPE.DECORATE
9
8
  const floorModuleType = floorData?.floorExtInfo?.moduleFlag
10
9
  const FloorContentItem =
11
10
  (floorModuleType && builtInComponents[floorModuleType]) || null
12
11
  const dataDefines = getFloorDataToDataDefines(floorData)
13
12
 
14
13
  const renderDecorateDefaultModule = () => {
15
14
  return (
16
15
  <View
17
16
  style={{
18
17
  lineHeight: '120px',
19
18
  textAlign: 'center',
20
19
  }}
21
20
  >
22
21
  当前模块是{floorData.moduleName}
23
22
  </View>
24
23
  )
25
24
  }
26
25
  return FloorContentItem ? (
27
26
  <ErrorBoundary {...props}>
28
27
  <FloorContentItem {...props} dataDefines={dataDefines} />
29
28
  </ErrorBoundary>
30
29
  ) : isDevMode ? (
31
30
  renderDecorateDefaultModule()
32
31
  ) : null
33
32
  switch (moduleId) {
34
33
  case 83158:
35
34
  return 'freeLayout'
36
35
  case 99654:
37
36
  return 'activeText'
38
37
  case 100382:
39
38
  return 'superGoods'
40
39
  }
41
40
  floorList.map((item) => {
42
41
  if (!item.floorExtInfo) {
43
42
  return null
44
43
  }
45
44
  const moduleFlag = item.floorExtInfo.moduleFlag
46
45
  if (!moduleFlag) {
47
46
  const newModuleFlag = moduleId2ModuleFlag(item.moduleId)
48
47
  if (newModuleFlag) {
49
48
  item.floorExtInfo.moduleFlag = newModuleFlag
50
49
  }
51
50
  }
52
51
  })
52
+ import React from 'react'
53
53
  const { floorData, renderSourceType, builtInComponents = {} } = props
54
54
  const isDevMode = renderSourceType === BUSINESS_TYPE.DECORATE
55
55
  const floorModuleType = floorData?.floorExtInfo?.moduleFlag
56
56
  const FloorContentItem =
57
57
  (floorModuleType && builtInComponents[floorModuleType]) || null
58
58
  const dataDefines = getFloorDataToDataDefines(floorData)
59
59
 
60
60
  const renderDecorateDefaultModule = () => {
61
61
  return (
62
62
  <View
63
63
  style={{
64
64
  lineHeight: '120px',
65
65
  textAlign: 'center',
66
66
  }}
67
67
  >
68
68
  当前模块是{floorData.moduleName}
69
69
  </View>
70
70
  )
71
71
  }
72
72
  return FloorContentItem ? (
73
73
  <ErrorBoundary {...props}>
74
74
  <FloorContentItem {...props} dataDefines={dataDefines} />
75
75
  </ErrorBoundary>
76
76
  ) : isDevMode ? (
77
77
  renderDecorateDefaultModule()
78
78
  ) : null
79
79
  renderSourceType: BUSINESS_TYPE.ONLINE,
80
80
  switch (moduleId) {
81
81
  case 83158:
82
82
  return 'freeLayout'
83
83
  case 99654:
84
84
  return 'activeText'
85
85
  case 100382:
86
86
  return 'superGoods'
87
87
  }
88
88
  floorList.map((item) => {
89
89
  if (!item.floorExtInfo) {
90
90
  return null
91
91
  }
92
92
  const moduleFlag = item.floorExtInfo.moduleFlag
93
93
  if (!moduleFlag) {
94
94
  const newModuleFlag = moduleId2ModuleFlag(item.moduleId)
95
95
  if (newModuleFlag) {
96
96
  item.floorExtInfo.moduleFlag = newModuleFlag
97
97
  }
98
98
  }
99
99
  })
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
2
1
  isJingxiMiniViewState?: boolean
3
2
  floorVideInfo: object
4
3
  isFloorInfoDataByPage?: boolean
5
4
  originQueryInfo: {
6
5
  openAppData?: {
7
6
  [key: string]: any
8
7
  }
8
+ import Taro from '@tarojs/taro'
9
9
  abTestLabels: {
10
10
  [key: string]: any
11
11
  }
12
12
  isJingxiMiniViewState?: boolean
13
13
  floorVideInfo: object
14
14
  isFloorInfoDataByPage?: boolean
15
15
  originQueryInfo: {
16
16
  openAppData?: {
17
17
  [key: string]: any
18
18
  }
@@ -1 +1 @@
1
- import { isH5, isWxMinAndWxapp } from '../utils'
2
1
  ? 'Terminator_New_Mobile_Shop'
3
2
  : 'W_jdgwxcx_shop'
4
3
  CONFIG_TYPE_NO_LINK = 0,
5
4
  CONFIG_TYPE_SKU_LIST = 1,
6
5
  CONFIG_TYPE_COUPON_LIST = 2,
7
6
  CONFIG_TYPE_CATEGORY = 3,
8
7
  CONFIG_TYPE_JSHOP_MOBILE = 4,
9
8
  CONFIG_TYPE_JSHOP_PC = 5,
10
9
  CONFIG_TYPE_JSHOP_DETAIL = 6,
11
10
  CONFIG_TYPE_CUSTOM_LINK = 7,
12
11
  CONFIG_TYPE_MEMBER = 9,
13
12
  CONFIG_TYPE_SHOP_ACTIVITY = 10,
14
13
  CONFIG_TYPE_SHOP_HOME = 12,
15
14
  CONFIG_TYPE_ANCHOR_POINT = 13,
16
15
  CONFIG_TYPE_SHOPPING_GUIDE = 17,
17
16
  CONFIG_TYPE_MINI_PROGRAM = 18,
18
17
  CONFIG_TYPE_FINANCE_COUPON = 22,
19
18
  CONFIG_TYPE_CATEGORY_PAGE = 25,
20
19
  CONFIG_TYPE_SHOP_SEARCH = 31,
20
+ import { isH5, isWxMinAndWxapp } from '../utils'
21
21
  ? 'Terminator_New_Mobile_Shop'
22
22
  : 'W_jdgwxcx_shop'
23
23
  CONFIG_TYPE_NO_LINK = 0,
24
24
  CONFIG_TYPE_SKU_LIST = 1,
25
25
  CONFIG_TYPE_COUPON_LIST = 2,
26
26
  CONFIG_TYPE_CATEGORY = 3,
27
27
  CONFIG_TYPE_JSHOP_MOBILE = 4,
28
28
  CONFIG_TYPE_JSHOP_PC = 5,
29
29
  CONFIG_TYPE_JSHOP_DETAIL = 6,
30
30
  CONFIG_TYPE_CUSTOM_LINK = 7,
31
31
  CONFIG_TYPE_MEMBER = 9,
32
32
  CONFIG_TYPE_SHOP_ACTIVITY = 10,
33
33
  CONFIG_TYPE_SHOP_HOME = 12,
34
34
  CONFIG_TYPE_ANCHOR_POINT = 13,
35
35
  CONFIG_TYPE_SHOPPING_GUIDE = 17,
36
36
  CONFIG_TYPE_MINI_PROGRAM = 18,
37
37
  CONFIG_TYPE_FINANCE_COUPON = 22,
38
38
  CONFIG_TYPE_CATEGORY_PAGE = 25,
39
39
  CONFIG_TYPE_SHOP_SEARCH = 31,