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

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 (38) 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/open/api/util.ts +1 -1
  23. package/dist/sass/app.h5.scss +252 -224
  24. package/dist/service/fetchGateway.ts +1 -1
  25. package/dist/service/fetchGateway.weapp.ts +1 -0
  26. package/dist/service/http/colorSign.ts +1 -1
  27. package/dist/service/http/const.ts +1 -1
  28. package/dist/service/http/h5Http.ts +1 -1
  29. package/dist/service/requestServer.h5.ts +1 -1
  30. package/dist/service/requestServer.ts +1 -1
  31. package/dist/service/requestServer.weapp.ts +1 -0
  32. package/dist/utils/h5Utils.ts +1 -1
  33. package/dist/utils/index.h5.ts +1 -1
  34. package/dist/utils/index.ts +1 -1
  35. package/dist/utils/index.weapp.ts +1 -1
  36. package/dist/utils/jumpExtMapUtil.js +1 -0
  37. package/dist/utils/utils.ts +1 -1
  38. package/package.json +1 -1
@@ -1 +1 @@
1
- import React from 'react';
2
1
  NETWORK_DATA_TYPE,
3
2
  M_SHOP_DOWNLOAD_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT,
4
3
  APP_SHOP_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT,
5
4
  containerFloorListData: ComponentInterFace.ContainerItemData[];
6
5
  className?: string;
7
6
  containerItemClass?: object;
8
7
  style?: object;
9
8
  hasGoodsFeeds?: boolean;
10
9
  builtInComponents?: object;
11
10
  loadingEndComponentFn?: functionType;
12
11
  sectionType?: string;
13
12
  updateShopFloorDataFn?: functionType;
14
13
  updateContainerFloorListDataFn?: functionType;
15
14
  refreshFloorListDataFn?: functionType;
16
15
  refreshFloorListDataBtnLabel?: string;
17
16
  customErrorIsvFloorModule?: React.ReactElement;
18
17
  componentExtend?: React.ReactElement;
19
18
  luxuryFixedIndex?: number;
20
19
  const { windowHeight } = taroJdBaseInfo.info.sysInfo;
21
20
  const {
22
21
  className,
23
22
  style,
24
23
  containerItemClass = null,
25
24
  containerFloorListData,
26
25
  builtInComponents,
27
26
  loadingEndComponentFn,
28
27
  sectionType,
29
28
  updateShopFloorDataFn,
30
29
  updateContainerFloorListDataFn,
31
30
  refreshFloorListDataFn,
32
31
  refreshFloorListDataBtnLabel,
33
32
  customErrorIsvFloorModule,
34
33
  luxuryFixedIndex = -1,
35
34
  } = props;
36
35
  const isSageShop = taroJdBaseInfo.info?.pageInfo?.isSageShop
37
36
 
38
37
  const hasLiveForSageShop =
39
38
  isSageShop &&
40
39
  taroJdBaseInfo.info?.pageInfo?.isJdShowNativeImmersivePlayer;
41
40
 
42
41
  const renderFloorItem = (
43
42
  item,
44
43
  floorItem,
45
44
  floorIndex,
46
45
  containerLayoutLeftRightMargin,
47
46
  lazyLoadState = false,
48
47
  index,
49
48
  borderStyle,
50
49
  ) => {
51
50
  return (
52
51
  <View
53
52
  className={classNames(shopContainerListStyle['d-floor-item'])}
54
53
  data-floor-uid={floorItem?.uid}
55
54
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ''}
56
55
  data-lazy-load={lazyLoadState}
57
56
  key={floorItem.uid}
58
57
  id={`J_floor_${floorItem.uid}`}
59
58
  style={borderStyle}
60
59
  >
61
60
  {isChartH5 && (
62
61
  <View
63
62
  className={shopContainerListStyle['d-floor-chart-item']}
64
63
  id={`J_chart_floor_${floorItem?.uid}`}
65
64
  data-floor-uid={floorItem?.uid}
66
65
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ''}
67
66
  />
68
67
  )}
69
68
  <FloorListItem
70
69
  floorIndex={floorIndex}
71
70
  floorData={floorItem}
72
71
  layoutLeftRightMargin={containerLayoutLeftRightMargin}
73
72
  containerBorderRadius={borderStyle}
74
73
  updateShopFloorDataFn={updateShopFloorDataFn}
75
74
  loadingEndComponentFn={loadingEndComponentFn}
76
75
  key={floorItem.uid}
77
76
  builtInComponents={builtInComponents}
78
77
  updateContainerFloorListDataFn={updateContainerFloorListDataFn}
79
78
  customErrorIsvFloorModule={customErrorIsvFloorModule}
80
79
  />
81
80
  {index === luxuryFixedIndex ? props.children : null}
82
81
  </View>
83
82
  );
84
83
  };
85
84
 
86
85
  const getFloorSetHeight = (item) => {
87
86
  const getHeight = item?.floorExtInfo?.floorHeight
88
87
  ? Number(item?.floorExtInfo?.floorHeight)
89
88
  : 200;
90
89
  return getHeight > 0 ? getHeight : 200;
91
90
  };
92
91
  const containerFloorListDataLen = containerFloorListData.length;
93
92
 
94
93
  const getNoDataContainerHeight = () => {
95
94
  const changeHeight = hasLiveForSageShop
96
95
  ? windowHeight
97
96
  : windowHeight -
98
97
  (isJdApp
99
98
  ? APP_SHOP_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT
100
99
  : M_SHOP_DOWNLOAD_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT);
101
100
  return {
102
101
  height: `${changeHeight}px`,
103
102
  };
104
103
  };
105
104
  return (
106
105
  <View
107
106
  className={classNames(className, shopContainerListStyle['d-shop-container-list'])}
108
107
  style={style}
109
108
  >
110
109
  <View id="J_shopContainerFloorList">
111
110
  {containerFloorListDataLen > 0 ? (
112
111
  containerFloorListData.map((item, index) => {
113
112
  const containerLayoutLeftRightMargin = (item.marginLeft || 0) + (item.marginRight || 0);
114
113
  const getContainerId = `J_container_${item.containerId}`;
115
114
  const borderStyle = getBorderStyle(
116
115
  item,
117
116
  index,
118
117
  containerFloorListData,
119
118
  containerFloorListDataLen,
120
119
  );
121
120
  if (!isSageShop && index === containerFloorListDataLen - 1) item.marginBottom = 8;
122
121
  return (
123
122
  <React.Fragment key={item.containerId + index}>
124
123
  {item.addLuxuryStyle ? (
125
124
  <View className={shopContainerListStyle['d-luxury-header']} />
126
125
  ) : null}
127
126
  {item.addLuxuryBackupStyle ? (
128
127
  <View
129
128
  style={{
130
129
  height: taroJdBaseInfo?.info?.sysInfo?.jdNativeHeaderHeight + 'px',
131
130
  }}
132
131
  className={shopContainerListStyle['d-luxury-header-black']}
133
132
  />
134
133
  ) : null}
135
134
  {typeof item?.renderExtendComponent === 'function'
136
135
  ? item?.renderExtendComponent(item?.floorExtendData)
137
136
  : null}
138
137
  <View
139
138
  className={classNames(
140
139
  shopContainerListStyle['d-container-item'],
141
140
  containerItemClass,
142
141
  )}
143
142
  id={getContainerId}
144
143
  key={item.containerId}
145
144
  data-container-id={item?.containerId}
146
145
  data-container-type={item?.typeCode}
147
146
  style={{
148
147
  marginBottom: item.marginBottom ? `${item.marginBottom}px` : 0,
149
148
  marginTop: item.marginTop ? `${item.marginTop}px` : 0,
150
149
  marginLeft: item.marginLeft ? `${item.marginLeft}px` : 0,
151
150
  marginRight: item.marginRight ? `${item.marginRight}px` : 0,
152
151
  borderTopLeftRadius: borderStyle?.borderTopLeftRadius || `0px`,
153
152
  borderTopRightRadius: borderStyle?.borderTopRightRadiu || `0px`,
154
153
  borderBottomLeftRadius: borderStyle?.borderBottomLeftRadius || `0px`,
155
154
  borderBottomRightRadius: borderStyle?.borderBottomRightRadius || `0px`,
156
155
  }}
157
156
  >
158
157
  {typeof item?.insertContainerStartComponent === 'function'
159
158
  ? item?.insertContainerStartComponent(item)
160
159
  : null}
161
160
  {item.floors &&
162
161
  item.floors.length > 0 &&
163
162
  item.floors?.map((floorItem, floorIndex) => {
164
163
  return index > lazyLoadStartIndex ? (
165
164
  <LazyLayoutLoad
166
165
  key={item.containerId}
167
166
  sectionType={sectionType}
168
167
  containerId={getContainerId}
169
168
  height={getFloorSetHeight(floorItem)}
170
169
  floorData={floorItem}
171
170
  >
172
171
  {renderFloorItem(
173
172
  item,
174
173
  floorItem,
175
174
  floorIndex,
176
175
  containerLayoutLeftRightMargin,
177
176
  true,
178
177
  index,
179
178
  borderStyle,
180
179
  )}
181
180
  </LazyLayoutLoad>
182
181
  ) : (
183
182
  renderFloorItem(
184
183
  item,
185
184
  floorItem,
186
185
  floorIndex,
187
186
  containerLayoutLeftRightMargin,
188
187
  false,
189
188
  index,
190
189
  borderStyle,
191
190
  )
192
191
  );
193
192
  })}
194
193
  </View>
195
194
  </React.Fragment>
196
195
  );
197
196
  })
198
197
  ) : (
199
198
  <View
200
199
  className={classNames(shopContainerListStyle['d-container-list-no-data'], {
201
200
  [shopContainerListStyle['d-sage-shop-no-data']]: hasLiveForSageShop,
202
201
  })}
203
202
  style={getNoDataContainerHeight()}
204
203
  >
205
204
  <NetworkDataError
206
205
  netWorkShowType={NetWorkShowType.PART}
207
206
  netWorkDataType={NETWORK_DATA_TYPE.DATA_ERROR}
208
207
  backgroundColorWhite={hasLiveForSageShop}
209
208
  refreshCallBackFn={refreshFloorListDataFn ? refreshFloorListDataFn : null}
210
209
  btnLabel={refreshFloorListDataBtnLabel || ''}
211
210
  />
212
211
  </View>
213
212
  )}
214
213
  </View>
215
214
  </View>
216
215
  );
217
216
  updateShopDataFn: null,
217
+ import React from 'react';
218
218
  NETWORK_DATA_TYPE,
219
219
  M_SHOP_DOWNLOAD_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT,
220
220
  APP_SHOP_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT,
221
221
  containerFloorListData: ComponentInterFace.ContainerItemData[];
222
222
  className?: string;
223
223
  containerItemClass?: object;
224
224
  style?: object;
225
225
  hasGoodsFeeds?: boolean;
226
226
  builtInComponents?: object;
227
227
  loadingEndComponentFn?: functionType;
228
228
  sectionType?: string;
229
229
  updateShopFloorDataFn?: functionType;
230
230
  updateContainerFloorListDataFn?: functionType;
231
231
  refreshFloorListDataFn?: functionType;
232
232
  refreshFloorListDataBtnLabel?: string;
233
233
  customErrorIsvFloorModule?: React.ReactElement;
234
234
  componentExtend?: React.ReactElement;
235
235
  luxuryFixedIndex?: number;
236
236
  isContainerListHasMarginBottom?: boolean;
237
237
  switchConfig?: {
238
238
  [key: string]: any;
239
239
  };
240
240
  const { windowHeight } = taroJdBaseInfo.info.sysInfo;
241
241
  const {
242
242
  className,
243
243
  style,
244
244
  containerItemClass = null,
245
245
  containerFloorListData,
246
246
  builtInComponents,
247
247
  loadingEndComponentFn,
248
248
  sectionType,
249
249
  updateShopFloorDataFn,
250
250
  updateContainerFloorListDataFn,
251
251
  refreshFloorListDataFn,
252
252
  refreshFloorListDataBtnLabel,
253
253
  customErrorIsvFloorModule,
254
254
  luxuryFixedIndex = -1,
255
255
  isContainerListHasMarginBottom,
256
256
  switchConfig,
257
257
  } = props;
258
258
  const emptyFloorListHidden = switchConfig?.emptyFloorListHidden || false;
259
259
  const isSageShop = taroJdBaseInfo.info?.pageInfo?.isSageShop;
260
260
  const isHasMarginBottom = isContainerListHasMarginBottom ?? !isSageShop;
261
261
 
262
262
  const hasLiveForSageShop =
263
263
  isSageShop && taroJdBaseInfo.info?.pageInfo?.isJdShowNativeImmersivePlayer;
264
264
 
265
265
  const renderFloorItem = (
266
266
  item,
267
267
  floorItem,
268
268
  floorIndex,
269
269
  containerLayoutLeftRightMargin,
270
270
  lazyLoadState = false,
271
271
  index,
272
272
  borderStyle,
273
273
  ) => {
274
274
  return (
275
275
  <View
276
276
  className={classNames(shopContainerListStyle['d-floor-item'])}
277
277
  data-floor-uid={floorItem?.uid}
278
278
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ''}
279
279
  data-lazy-load={lazyLoadState}
280
280
  key={floorItem.uid}
281
281
  id={`J_floor_${floorItem.uid}`}
282
282
  style={borderStyle}
283
283
  >
284
284
  {isChartH5 && (
285
285
  <View
286
286
  className={shopContainerListStyle['d-floor-chart-item']}
287
287
  id={`J_chart_floor_${floorItem?.uid}`}
288
288
  data-floor-uid={floorItem?.uid}
289
289
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ''}
290
290
  />
291
291
  )}
292
292
  <FloorListItem
293
293
  floorIndex={floorIndex}
294
294
  floorData={floorItem}
295
295
  layoutLeftRightMargin={containerLayoutLeftRightMargin}
296
296
  containerBorderRadius={borderStyle}
297
297
  updateShopFloorDataFn={updateShopFloorDataFn}
298
298
  loadingEndComponentFn={loadingEndComponentFn}
299
299
  key={floorItem.uid}
300
300
  builtInComponents={builtInComponents}
301
301
  updateContainerFloorListDataFn={updateContainerFloorListDataFn}
302
302
  customErrorIsvFloorModule={customErrorIsvFloorModule}
303
303
  />
304
304
  {index === luxuryFixedIndex ? props.children : null}
305
305
  </View>
306
306
  );
307
307
  };
308
308
 
309
309
  const getFloorSetHeight = (item) => {
310
310
  const getHeight = item?.floorExtInfo?.floorHeight
311
311
  ? Number(item?.floorExtInfo?.floorHeight)
312
312
  : 200;
313
313
  return getHeight > 0 ? getHeight : 200;
314
314
  };
315
315
  const containerFloorListDataLen = containerFloorListData.length;
316
316
 
317
317
  const getNoDataContainerHeight = () => {
318
318
  const changeHeight = hasLiveForSageShop
319
319
  ? windowHeight
320
320
  : windowHeight -
321
321
  (isJdApp
322
322
  ? APP_SHOP_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT
323
323
  : M_SHOP_DOWNLOAD_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT);
324
324
  return {
325
325
  height: `${changeHeight}px`,
326
326
  };
327
327
  };
328
328
  return (
329
329
  <View
330
330
  className={classNames(className, shopContainerListStyle['d-shop-container-list'])}
331
331
  style={style}
332
332
  >
333
333
  <View
334
334
  id="J_shopContainerFloorList"
335
335
  className={
336
336
  isHasMarginBottom
337
337
  ? shopContainerListStyle['d-container-list-with-margin-bottom']
338
338
  : shopContainerListStyle['d-container-list-no-margin-bottom']
339
339
  }
340
340
  >
341
341
  {containerFloorListDataLen > 0 ? (
342
342
  containerFloorListData.map((item, index) => {
343
343
  const containerLayoutLeftRightMargin = (item.marginLeft || 0) + (item.marginRight || 0);
344
344
  const getContainerId = `J_container_${item.containerId}`;
345
345
  const borderStyle = getBorderStyle(
346
346
  item,
347
347
  index,
348
348
  containerFloorListData,
349
349
  containerFloorListDataLen,
350
350
  );
351
351
  return (
352
352
  <React.Fragment key={item.containerId + index}>
353
353
  {item.addLuxuryStyle ? (
354
354
  <View className={shopContainerListStyle['d-luxury-header']} />
355
355
  ) : null}
356
356
  {item.addLuxuryBackupStyle ? (
357
357
  <View
358
358
  style={{
359
359
  height: taroJdBaseInfo?.info?.sysInfo?.jdNativeHeaderHeight + 'px',
360
360
  }}
361
361
  className={shopContainerListStyle['d-luxury-header-black']}
362
362
  />
363
363
  ) : null}
364
364
  {typeof item?.renderExtendComponent === 'function'
365
365
  ? item?.renderExtendComponent(item?.floorExtendData)
366
366
  : null}
367
367
  <View
368
368
  className={classNames(
369
369
  shopContainerListStyle['d-container-item'],
370
370
  containerItemClass,
371
371
  )}
372
372
  id={getContainerId}
373
373
  key={item.containerId}
374
374
  data-container-id={item?.containerId}
375
375
  data-container-type={item?.typeCode}
376
376
  style={{
377
377
  marginBottom: item.marginBottom ? `${item.marginBottom}px` : 0,
378
378
  marginTop: item.marginTop ? `${item.marginTop}px` : 0,
379
379
  marginLeft: item.marginLeft ? `${item.marginLeft}px` : 0,
380
380
  marginRight: item.marginRight ? `${item.marginRight}px` : 0,
381
381
  borderTopLeftRadius: borderStyle?.borderTopLeftRadius || `0px`,
382
382
  borderTopRightRadius: borderStyle?.borderTopRightRadiu || `0px`,
383
383
  borderBottomLeftRadius: borderStyle?.borderBottomLeftRadius || `0px`,
384
384
  borderBottomRightRadius: borderStyle?.borderBottomRightRadius || `0px`,
385
385
  }}
386
386
  >
387
387
  {typeof item?.insertContainerStartComponent === 'function'
388
388
  ? item?.insertContainerStartComponent(item)
389
389
  : null}
390
390
  {item.floors &&
391
391
  item.floors.length > 0 &&
392
392
  item.floors?.map((floorItem, floorIndex) => {
393
393
  return index > lazyLoadStartIndex ? (
394
394
  <LazyLayoutLoad
395
395
  key={item.containerId}
396
396
  sectionType={sectionType}
397
397
  containerId={getContainerId}
398
398
  height={getFloorSetHeight(floorItem)}
399
399
  floorData={floorItem}
400
400
  >
401
401
  {renderFloorItem(
402
402
  item,
403
403
  floorItem,
404
404
  floorIndex,
405
405
  containerLayoutLeftRightMargin,
406
406
  true,
407
407
  index,
408
408
  borderStyle,
409
409
  )}
410
410
  </LazyLayoutLoad>
411
411
  ) : (
412
412
  renderFloorItem(
413
413
  item,
414
414
  floorItem,
415
415
  floorIndex,
416
416
  containerLayoutLeftRightMargin,
417
417
  false,
418
418
  index,
419
419
  borderStyle,
420
420
  )
421
421
  );
422
422
  })}
423
423
  </View>
424
424
  </React.Fragment>
425
425
  );
426
426
  })
427
427
  ) : !emptyFloorListHidden ? (
428
428
  <View
429
429
  className={classNames(shopContainerListStyle['d-container-list-no-data'], {
430
430
  [shopContainerListStyle['d-sage-shop-no-data']]: hasLiveForSageShop,
431
431
  })}
432
432
  style={getNoDataContainerHeight()}
433
433
  >
434
434
  <NetworkDataError
435
435
  netWorkShowType={NetWorkShowType.PART}
436
436
  netWorkDataType={NETWORK_DATA_TYPE.DATA_ERROR}
437
437
  backgroundColorWhite={hasLiveForSageShop}
438
438
  refreshCallBackFn={refreshFloorListDataFn ? refreshFloorListDataFn : null}
439
439
  btnLabel={refreshFloorListDataBtnLabel || ''}
440
440
  />
441
441
  </View>
442
442
  ) : null}
443
443
  </View>
444
444
  </View>
445
445
  );
446
446
  updateShopDataFn: null,