@conecli/cone-render 0.10.1-shop3.71 → 0.10.1-shop3.73

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.
@@ -101,10 +101,41 @@ window.JdShopBridge = {
101
101
  console.error(`registerBackToTopClickCallback: "${callBackName}" is not a global function`);
102
102
  }
103
103
  },
104
+ // 初始化一个自定义icon
105
+ initCustomIcon: function({
106
+ iconKey, // 自定义按钮的key,唯一标识
107
+ iconUrl, // 自定义按钮图片地址,建议使用120*120大小的图片
108
+ clickCallbackName, // 点击回调方法名,必须是定义在全局作用域
109
+ } = {}){
110
+ if (iconKey && iconUrl && typeof window[clickCallbackName] === 'function') {
111
+ this.callNativeBridge('initCustomIcon', {
112
+ data: {
113
+ iconKey,
114
+ iconUrl,
115
+ clickCallbackName
116
+ },
117
+ });
118
+ } else {
119
+ console.error(`initCustomIcon: invalid argument`);
120
+ }
121
+ },
122
+ showCustomIcon: function (iconKey, isShow = true) {
123
+ if(iconKey){
124
+ this.callNativeBridge('showCustomIcon', {
125
+ data: {
126
+ iconKey,
127
+ isShow
128
+ },
129
+ });
130
+ }else{
131
+ console.error(`showCustomIcon: iconKey must be a non-empty string`);
132
+ }
133
+ },
104
134
  init: function () {
105
- console.log('JdShopBridge V1.0 初始化完成');
135
+ console.log('JdShopBridge V1.1 初始化完成');
106
136
  return this;
107
137
  },
138
+ version: 1.1
108
139
  };
109
140
  window.JdShopBridge = JdShopBridge.init();
110
141
 
@@ -117,3 +148,14 @@ window.JdShopBridge = JdShopBridge.init();
117
148
 
118
149
  // 更新页码icon页码信息示例
119
150
  // sentNativePageScrollPageInfo({"pageIdx":1,"totalPage":24})
151
+
152
+ // function myClickCallbackName(){
153
+ // console.log('myClickCallbackName() ~~')
154
+ // }
155
+
156
+ // JdShopBridge.initCustomIcon({
157
+ // iconKey: 'test9527', // 自定义按钮的key,唯一标识
158
+ // iconUrl: 'https://img13.360buyimg.com/imagetools/jfs/t1/387852/40/16687/6770/697820a6F4ae02234/03e60c80c818ff77.jpg', // 自定义按钮图片地址,建议使用120*120大小的图片
159
+ // clickCallbackName: 'myClickCallbackName', // 点击回调方法名,必须是定义在全局作用域
160
+ // })
161
+
@@ -1 +1 @@
1
- "use strict";window.JdShopBridge={_callRouterAndroid:function(o){o.routerURL;var a,i=o.routerParam,e=o.callBackName,t=void 0===e?"":e,r="window.".concat(t);null===(a=window)||void 0===a||null===(a=a.JDJshop)||void 0===a||a.wrtNative(JSON.stringify({routerParam:JSON.stringify(i),serialize:"1",callBackName:r,callBackId:"".concat(t,"Android")}))},_callRouterIOS:function(o){var a,i=o.routerURL,e=o.routerParam,t=o.callBackName,r=void 0===t?"":t,l=o.isSync,n=void 0!==l&&l,c={routerURL:i,serialize:"1",routerParam:e,callBackName:"window.".concat(r),callBackId:"".concat(r,"Ios")};null===(a=window)||void 0===a||null===(a=a.webkit)||void 0===a||null===(a=a.messageHandlers)||void 0===a||null===(a=a.JDAppUnite)||void 0===a||a.postMessage({method:n?"callSyncRouterModuleWithParams":"callRouterModuleWithParams",params:JSON.stringify(c)})},callNativeBridge:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pageReady",a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",e=navigator.userAgent,t="window.".concat(i),r={type:o,callBackName:t,newHomePage:!0};if(a&&Object.assign(r,a),/ip(hone|od)|ipad/i.test(e))console.log("调用店铺IOS桥"),this._callRouterIOS({routerURL:"router://JDShopModule/wrtNative",routerParam:r});else if(/android/i.test(e))console.log("调用店铺Android桥"),this._callRouterAndroid({routerURL:"router://JDJShopModule/wrtNative",routerParam:r});else if("harmony"===(e.split(";")[1]||"").toLowerCase()||/arkweb/i.test(e)){console.log("调用店铺Harmony桥");var l={routerURL:"",routerParam:r};window.XWebView&&window.XWebView.callNative("JdShopPlugin",o,JSON.stringify(l),t,"".concat(i,"HarmonyOS"))}},setPageInfo:function(o){this.callNativeBridge("pageCountInfo",{data:o})},showCartIcon:function(){var o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.callNativeBridge("showCartButton",{data:{isShow:o}})},showBackToTopIcon:function(){var o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.callNativeBridge("showBackToTop",{data:o})},registerBackToTopClickCallback:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";"function"==typeof window[o]?this.callNativeBridge("registerBackToTopClickCallback",{data:o}):console.error('registerBackToTopClickCallback: "'.concat(o,'" is not a global function'))},init:function(){return console.log("JdShopBridge V1.0 初始化完成"),this}},window.JdShopBridge=JdShopBridge.init();
1
+ "use strict";window.JdShopBridge={_callRouterAndroid:function(o){o.routerURL;var i,a=o.routerParam,t=o.callBackName,e=void 0===t?"":t,n="window.".concat(e);null===(i=window)||void 0===i||null===(i=i.JDJshop)||void 0===i||i.wrtNative(JSON.stringify({routerParam:JSON.stringify(a),serialize:"1",callBackName:n,callBackId:"".concat(e,"Android")}))},_callRouterIOS:function(o){var i,a=o.routerURL,t=o.routerParam,e=o.callBackName,n=void 0===e?"":e,r=o.isSync,l=void 0!==r&&r,c={routerURL:a,serialize:"1",routerParam:t,callBackName:"window.".concat(n),callBackId:"".concat(n,"Ios")};null===(i=window)||void 0===i||null===(i=i.webkit)||void 0===i||null===(i=i.messageHandlers)||void 0===i||null===(i=i.JDAppUnite)||void 0===i||i.postMessage({method:l?"callSyncRouterModuleWithParams":"callRouterModuleWithParams",params:JSON.stringify(c)})},callNativeBridge:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pageReady",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",t=navigator.userAgent,e="window.".concat(a),n={type:o,callBackName:e,newHomePage:!0};if(i&&Object.assign(n,i),/ip(hone|od)|ipad/i.test(t))console.log("调用店铺IOS桥"),this._callRouterIOS({routerURL:"router://JDShopModule/wrtNative",routerParam:n});else if(/android/i.test(t))console.log("调用店铺Android桥"),this._callRouterAndroid({routerURL:"router://JDJShopModule/wrtNative",routerParam:n});else if("harmony"===(t.split(";")[1]||"").toLowerCase()||/arkweb/i.test(t)){console.log("调用店铺Harmony桥");var r={routerURL:"",routerParam:n};window.XWebView&&window.XWebView.callNative("JdShopPlugin",o,JSON.stringify(r),e,"".concat(a,"HarmonyOS"))}},setPageInfo:function(o){this.callNativeBridge("pageCountInfo",{data:o})},showCartIcon:function(){var o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.callNativeBridge("showCartButton",{data:{isShow:o}})},showBackToTopIcon:function(){var o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.callNativeBridge("showBackToTop",{data:o})},registerBackToTopClickCallback:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";"function"==typeof window[o]?this.callNativeBridge("registerBackToTopClickCallback",{data:o}):console.error('registerBackToTopClickCallback: "'.concat(o,'" is not a global function'))},initCustomIcon:function(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=o.iconKey,a=o.iconUrl,t=o.clickCallbackName;i&&a&&"function"==typeof window[t]?this.callNativeBridge("initCustomIcon",{data:{iconKey:i,iconUrl:a,clickCallbackName:t}}):console.error("initCustomIcon: invalid argument")},showCustomIcon:function(o){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];o?this.callNativeBridge("showCustomIcon",{data:{iconKey:o,isShow:i}}):console.error("showCustomIcon: iconKey must be a non-empty string")},init:function(){return console.log("JdShopBridge V1.1 初始化完成"),this},version:1.1},window.JdShopBridge=JdShopBridge.init();
@@ -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
  extendInfoData?: object;
7
6
  className?: string;
8
7
  containerItemClass?: object;
9
8
  style?: object;
10
9
  hasGoodsFeeds?: boolean;
11
10
  builtInComponents?: object;
12
11
  loadingEndComponentFn?: functionType;
13
12
  sectionType?: string;
14
13
  updateShopFloorDataFn?: functionType;
15
14
  updateContainerFloorListDataFn?: functionType;
16
15
  refreshFloorListDataFn?: functionType;
17
16
  refreshFloorListDataBtnLabel?: string;
18
17
  customErrorIsvFloorModule?: React.ReactElement;
19
18
  componentExtend?: React.ReactElement;
20
19
  luxuryFixedIndex?: number;
21
20
  isContainerListHasMarginBottom?: boolean;
22
21
  switchConfig?: {
23
22
  [key: string]: any;
24
23
  };
25
24
  const { windowHeight, screenHeight } = taroJdBaseInfo.info.sysInfo;
26
25
  const {
27
26
  className,
28
27
  style,
29
28
  containerItemClass = null,
30
29
  containerFloorListData,
31
30
  extendInfoData,
32
31
  builtInComponents,
33
32
  loadingEndComponentFn,
34
33
  sectionType,
35
34
  updateShopFloorDataFn,
36
35
  updateContainerFloorListDataFn,
37
36
  refreshFloorListDataFn,
38
37
  refreshFloorListDataBtnLabel,
39
38
  customErrorIsvFloorModule,
40
39
  luxuryFixedIndex = -1,
41
40
  isContainerListHasMarginBottom,
42
41
  switchConfig,
43
42
  } = props;
44
43
  const emptyFloorListHidden = switchConfig?.emptyFloorListHidden || false;
45
44
  const isSageShop = taroJdBaseInfo.info?.pageInfo?.isSageShop;
46
45
  const isHasMarginBottom = isContainerListHasMarginBottom ?? !isSageShop;
47
46
 
48
47
  const hasLiveForSageShop =
49
48
  isSageShop && taroJdBaseInfo.info?.pageInfo?.isJdShowNativeImmersivePlayer;
50
49
 
51
50
  const renderFloorItem = (
52
51
  item,
53
52
  floorItem,
54
53
  floorIndex,
55
54
  containerLayoutLeftRightMargin,
56
55
  lazyLoadState = false,
57
56
  index,
58
57
  borderStyle,
59
58
  ) => {
60
59
  return (
61
60
  <View
62
61
  className={classNames(shopContainerListStyle['d-floor-item'])}
63
62
  data-floor-uid={floorItem?.uid}
64
63
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ''}
65
64
  data-lazy-load={lazyLoadState}
66
65
  key={floorItem.uid}
67
66
  id={`J_floor_${floorItem.uid}`}
68
67
  style={borderStyle}
69
68
  >
70
69
  {isChartH5 && (
71
70
  <View
72
71
  className={shopContainerListStyle['d-floor-chart-item']}
73
72
  id={`J_chart_floor_${floorItem?.uid}`}
74
73
  data-floor-uid={floorItem?.uid}
75
74
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ''}
76
75
  />
77
76
  )}
78
77
  <FloorListItem
79
78
  floorIndex={floorIndex}
80
79
  floorData={floorItem}
81
80
  layoutLeftRightMargin={containerLayoutLeftRightMargin}
82
81
  containerBorderRadius={borderStyle}
83
82
  updateShopFloorDataFn={updateShopFloorDataFn}
84
83
  loadingEndComponentFn={loadingEndComponentFn}
85
84
  extendInfoData={
86
85
  passExtendInfoModuleWhiteList.includes(floorItem?.floorExtInfo?.moduleFlag)
87
86
  ? extendInfoData
88
87
  : undefined
89
88
  }
90
89
  key={floorItem.uid}
91
90
  builtInComponents={builtInComponents}
92
91
  updateContainerFloorListDataFn={updateContainerFloorListDataFn}
93
92
  customErrorIsvFloorModule={customErrorIsvFloorModule}
94
93
  />
95
94
  {index === luxuryFixedIndex ? props.children : null}
96
95
  {floorItem?.inspectResult === '1' && (
97
96
  <View className={shopContainerListStyle['d-floor-inspect-mask']} />
98
97
  )}
99
98
  </View>
100
99
  );
101
100
  };
102
101
 
103
102
  const getFloorSetHeight = (item) => {
104
103
  const getHeight = item?.floorExtInfo?.floorHeight
105
104
  ? Number(item?.floorExtInfo?.floorHeight)
106
105
  : 200;
107
106
  return getHeight > 0 ? getHeight : 200;
108
107
  };
109
108
  const containerFloorListDataLen = containerFloorListData.length;
110
109
 
111
110
  const getNoDataContainerHeight = () => {
112
111
  const getWindowHeight = windowHeight > 10 ? windowHeight : screenHeight;
113
112
  const changeHeight = hasLiveForSageShop
114
113
  ? getWindowHeight
115
114
  : getWindowHeight -
116
115
  (isJdApp
117
116
  ? APP_SHOP_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT
118
117
  : M_SHOP_DOWNLOAD_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT);
119
118
  return {
120
119
  height: `${changeHeight}px`,
121
120
  };
122
121
  };
123
122
  return (
124
123
  <View
125
124
  className={classNames(className, shopContainerListStyle['d-shop-container-list'])}
126
125
  style={style}
127
126
  >
128
127
  <View
129
128
  id="J_shopContainerFloorList"
130
129
  className={
131
130
  isHasMarginBottom
132
131
  ? shopContainerListStyle['d-container-list-with-margin-bottom']
133
132
  : shopContainerListStyle['d-container-list-no-margin-bottom']
134
133
  }
135
134
  >
136
135
  {containerFloorListDataLen > 0 ? (
137
136
  containerFloorListData.map((item, index) => {
138
137
  const containerLayoutLeftRightMargin = (item.marginLeft || 0) + (item.marginRight || 0);
139
138
  const getContainerId = `J_container_${item.containerId}`;
140
139
  const borderStyle = getBorderStyle(
141
140
  item,
142
141
  index,
143
142
  containerFloorListData,
144
143
  containerFloorListDataLen,
145
144
  );
146
145
  return (
147
146
  <React.Fragment key={item.containerId + index}>
148
147
  {item.addLuxuryStyle ? (
149
148
  <View className={shopContainerListStyle['d-luxury-header']} />
150
149
  ) : null}
151
150
  {item.addLuxuryBackupStyle ? (
152
151
  <View
153
152
  style={{
154
153
  height: taroJdBaseInfo?.info?.sysInfo?.jdNativeHeaderHeight + 'px',
155
154
  }}
156
155
  className={shopContainerListStyle['d-luxury-header-black']}
157
156
  />
158
157
  ) : null}
159
158
  {typeof item?.renderExtendComponent === 'function'
160
159
  ? item?.renderExtendComponent(item?.floorExtendData)
161
160
  : null}
162
161
  <View
163
162
  className={classNames(
164
163
  shopContainerListStyle['d-container-item'],
165
164
  containerItemClass,
166
165
  )}
167
166
  id={getContainerId}
168
167
  key={item.containerId}
169
168
  data-container-id={item?.containerId}
170
169
  data-container-type={item?.typeCode}
171
170
  data-container-index={index}
172
171
  style={{
173
172
  marginBottom: item.marginBottom ? `${item.marginBottom}px` : 0,
174
173
  marginTop: item.marginTop ? `${item.marginTop}px` : 0,
175
174
  marginLeft: item.marginLeft ? `${item.marginLeft}px` : 0,
176
175
  marginRight: item.marginRight ? `${item.marginRight}px` : 0,
177
176
  borderTopLeftRadius: borderStyle?.borderTopLeftRadius || `0px`,
178
177
  borderTopRightRadius: borderStyle?.borderTopRightRadiu || `0px`,
179
178
  borderBottomLeftRadius: borderStyle?.borderBottomLeftRadius || `0px`,
180
179
  borderBottomRightRadius: borderStyle?.borderBottomRightRadius || `0px`,
181
180
  '--container-layout-left-right-margin': `${containerLayoutLeftRightMargin}px`,
182
181
  }}
183
182
  >
184
183
  {typeof item?.insertContainerStartComponent === 'function'
185
184
  ? item?.insertContainerStartComponent(item)
186
185
  : null}
187
186
  {item.floors &&
188
187
  item.floors.length > 0 &&
189
188
  item.floors?.map((floorItem, floorIndex) => {
190
189
  return index > lazyLoadStartIndex ? (
191
190
  <LazyLayoutLoad
192
191
  key={item.containerId}
193
192
  sectionType={sectionType}
194
193
  containerId={getContainerId}
195
194
  height={getFloorSetHeight(floorItem)}
196
195
  floorData={floorItem}
197
196
  >
198
197
  {renderFloorItem(
199
198
  item,
200
199
  floorItem,
201
200
  floorIndex,
202
201
  containerLayoutLeftRightMargin,
203
202
  true,
204
203
  index,
205
204
  borderStyle,
206
205
  )}
207
206
  </LazyLayoutLoad>
208
207
  ) : (
209
208
  renderFloorItem(
210
209
  item,
211
210
  floorItem,
212
211
  floorIndex,
213
212
  containerLayoutLeftRightMargin,
214
213
  false,
215
214
  index,
216
215
  borderStyle,
217
216
  )
218
217
  );
219
218
  })}
220
219
  </View>
221
220
  </React.Fragment>
222
221
  );
223
222
  })
224
223
  ) : !emptyFloorListHidden ? (
225
224
  <View
226
225
  className={classNames(shopContainerListStyle['d-container-list-no-data'], {
227
226
  [shopContainerListStyle['d-sage-shop-no-data']]: hasLiveForSageShop,
228
227
  })}
229
228
  style={getNoDataContainerHeight()}
230
229
  >
231
230
  <NetworkDataError
232
231
  netWorkShowType={NetWorkShowType.PART}
233
232
  netWorkDataType={NETWORK_DATA_TYPE.DATA_ERROR}
234
233
  backgroundColorWhite={hasLiveForSageShop}
235
234
  refreshCallBackFn={refreshFloorListDataFn ? refreshFloorListDataFn : null}
236
235
  btnLabel={refreshFloorListDataBtnLabel || ''}
237
236
  />
238
237
  </View>
239
238
  ) : null}
240
239
  </View>
241
240
  </View>
242
241
  );
243
242
  updateShopDataFn: null,
243
+ import React from 'react';
244
244
  NETWORK_DATA_TYPE,
245
245
  M_SHOP_DOWNLOAD_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT,
246
246
  APP_SHOP_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT,
247
247
  source?: string;
248
248
  containerFloorListData: ComponentInterFace.ContainerItemData[];
249
249
  extendInfoData?: object;
250
250
  className?: string;
251
251
  containerItemClass?: object;
252
252
  style?: object;
253
253
  hasGoodsFeeds?: boolean;
254
254
  builtInComponents?: object;
255
255
  loadingEndComponentFn?: functionType;
256
256
  sectionType?: string;
257
257
  updateShopFloorDataFn?: functionType;
258
258
  updateContainerFloorListDataFn?: functionType;
259
259
  refreshFloorListDataFn?: functionType;
260
260
  refreshFloorListDataBtnLabel?: string;
261
261
  customErrorIsvFloorModule?: React.ReactElement;
262
262
  componentExtend?: React.ReactElement;
263
263
  luxuryFixedIndex?: number;
264
264
  isContainerListHasMarginBottom?: boolean;
265
265
  switchConfig?: {
266
266
  [key: string]: any;
267
267
  };
268
268
  const { windowHeight, screenHeight } = taroJdBaseInfo.info.sysInfo;
269
269
  const {
270
270
  source,
271
271
  className,
272
272
  style,
273
273
  containerItemClass = null,
274
274
  containerFloorListData,
275
275
  extendInfoData,
276
276
  builtInComponents,
277
277
  loadingEndComponentFn,
278
278
  sectionType,
279
279
  updateShopFloorDataFn,
280
280
  updateContainerFloorListDataFn,
281
281
  refreshFloorListDataFn,
282
282
  refreshFloorListDataBtnLabel,
283
283
  customErrorIsvFloorModule,
284
284
  luxuryFixedIndex = -1,
285
285
  isContainerListHasMarginBottom,
286
286
  switchConfig,
287
287
  } = props;
288
288
  const emptyFloorListHidden = switchConfig?.emptyFloorListHidden || false;
289
289
  const isSageShop = taroJdBaseInfo.info?.pageInfo?.isSageShop;
290
290
  const isHasMarginBottom = isContainerListHasMarginBottom ?? !isSageShop;
291
291
 
292
292
  const hasLiveForSageShop =
293
293
  isSageShop && taroJdBaseInfo.info?.pageInfo?.isJdShowNativeImmersivePlayer;
294
294
 
295
295
  const renderFloorItem = (
296
296
  item,
297
297
  floorItem,
298
298
  floorIndex,
299
299
  containerLayoutLeftRightMargin,
300
300
  lazyLoadState = false,
301
301
  index,
302
302
  borderStyle,
303
303
  ) => {
304
304
  return (
305
305
  <View
306
306
  className={classNames(shopContainerListStyle['d-floor-item'])}
307
307
  data-floor-uid={floorItem?.uid}
308
308
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ''}
309
309
  data-lazy-load={lazyLoadState}
310
310
  key={floorItem.uid}
311
311
  id={`J_floor_${floorItem.uid}`}
312
312
  style={borderStyle}
313
313
  >
314
314
  {isChartH5 && (
315
315
  <View
316
316
  className={shopContainerListStyle['d-floor-chart-item']}
317
317
  id={`J_chart_floor_${floorItem?.uid}`}
318
318
  data-floor-uid={floorItem?.uid}
319
319
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ''}
320
320
  />
321
321
  )}
322
322
  <FloorListItem
323
323
  source={source}
324
324
  floorIndex={floorIndex}
325
325
  floorData={floorItem}
326
326
  containerIndex={index}
327
327
  layoutLeftRightMargin={containerLayoutLeftRightMargin}
328
328
  containerBorderRadius={borderStyle}
329
329
  updateShopFloorDataFn={updateShopFloorDataFn}
330
330
  loadingEndComponentFn={loadingEndComponentFn}
331
331
  extendInfoData={
332
332
  passExtendInfoModuleWhiteList.includes(floorItem?.floorExtInfo?.moduleFlag)
333
333
  ? extendInfoData
334
334
  : undefined
335
335
  }
336
336
  key={floorItem.uid}
337
337
  builtInComponents={builtInComponents}
338
338
  updateContainerFloorListDataFn={updateContainerFloorListDataFn}
339
339
  customErrorIsvFloorModule={customErrorIsvFloorModule}
340
340
  />
341
341
  {index === luxuryFixedIndex ? props.children : null}
342
342
  {floorItem?.inspectResult === '1' && (
343
343
  <View className={shopContainerListStyle['d-floor-inspect-mask']} />
344
344
  )}
345
345
  </View>
346
346
  );
347
347
  };
348
348
 
349
349
  const getFloorSetHeight = (item) => {
350
350
  const getHeight = item?.floorExtInfo?.floorHeight
351
351
  ? Number(item?.floorExtInfo?.floorHeight)
352
352
  : 200;
353
353
  return getHeight > 0 ? getHeight : 200;
354
354
  };
355
355
  const containerFloorListDataLen = containerFloorListData.length;
356
356
 
357
357
  const getNoDataContainerHeight = () => {
358
358
  const getWindowHeight = windowHeight > 10 ? windowHeight : screenHeight;
359
359
  const changeHeight = hasLiveForSageShop
360
360
  ? getWindowHeight
361
361
  : getWindowHeight -
362
362
  (isJdApp
363
363
  ? APP_SHOP_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT
364
364
  : M_SHOP_DOWNLOAD_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT);
365
365
  return {
366
366
  height: `${changeHeight}px`,
367
367
  };
368
368
  };
369
369
  return (
370
370
  <View
371
371
  id="J_shopContainerFloorList"
372
372
  className={classNames(
373
373
  className,
374
374
  shopContainerListStyle['d-shop-container-list'],
375
375
  isHasMarginBottom
376
376
  ? shopContainerListStyle['d-container-list-with-margin-bottom']
377
377
  : shopContainerListStyle['d-container-list-no-margin-bottom'],
378
378
  )}
379
379
  style={style}
380
380
  >
381
381
  {containerFloorListDataLen > 0 ? (
382
382
  <>
383
383
  {containerFloorListData.map((item, index) => {
384
384
  const containerLayoutLeftRightMargin = (item.marginLeft || 0) + (item.marginRight || 0);
385
385
  const getContainerId = `J_container_${item.containerId}`;
386
386
  const borderStyle = getBorderStyle(
387
387
  item,
388
388
  index,
389
389
  containerFloorListData,
390
390
  containerFloorListDataLen,
391
391
  );
392
392
  return (
393
393
  <React.Fragment key={item.containerId + index}>
394
394
  {item.addLuxuryStyle ? (
395
395
  <View className={shopContainerListStyle['d-luxury-header']} />
396
396
  ) : null}
397
397
  {item.addLuxuryBackupStyle ? (
398
398
  <View
399
399
  style={{
400
400
  height: taroJdBaseInfo?.info?.sysInfo?.jdNativeHeaderHeight + 'px',
401
401
  }}
402
402
  className={shopContainerListStyle['d-luxury-header-black']}
403
403
  />
404
404
  ) : null}
405
405
  {typeof item?.renderExtendComponent === 'function'
406
406
  ? item?.renderExtendComponent(item?.floorExtendData)
407
407
  : null}
408
408
  <View
409
409
  className={classNames(
410
410
  shopContainerListStyle['d-container-item'],
411
411
  containerItemClass,
412
412
  )}
413
413
  id={getContainerId}
414
414
  key={item.containerId}
415
415
  data-container-id={item?.containerId}
416
416
  data-container-type={item?.typeCode}
417
417
  data-container-index={index}
418
418
  style={{
419
419
  marginBottom: item.marginBottom ? `${item.marginBottom}px` : 0,
420
420
  marginTop: item.marginTop ? `${item.marginTop}px` : 0,
421
421
  marginLeft: item.marginLeft ? `${item.marginLeft}px` : 0,
422
422
  marginRight: item.marginRight ? `${item.marginRight}px` : 0,
423
423
  borderTopLeftRadius: borderStyle?.borderTopLeftRadius || `0px`,
424
424
  borderTopRightRadius: borderStyle?.borderTopRightRadiu || `0px`,
425
425
  borderBottomLeftRadius: borderStyle?.borderBottomLeftRadius || `0px`,
426
426
  borderBottomRightRadius: borderStyle?.borderBottomRightRadius || `0px`,
427
427
  '--container-layout-left-right-margin': `${containerLayoutLeftRightMargin}px`,
428
428
  }}
429
429
  >
430
430
  {typeof item?.insertContainerStartComponent === 'function'
431
431
  ? item?.insertContainerStartComponent(item)
432
432
  : null}
433
433
  {item.floors &&
434
434
  item.floors.length > 0 &&
435
435
  item.floors?.map((floorItem, floorIndex) => {
436
436
  return index > lazyLoadStartIndex ? (
437
437
  <LazyLayoutLoad
438
438
  key={item.containerId}
439
439
  sectionType={sectionType}
440
440
  containerId={getContainerId}
441
441
  height={getFloorSetHeight(floorItem)}
442
442
  floorData={floorItem}
443
443
  >
444
444
  {renderFloorItem(
445
445
  item,
446
446
  floorItem,
447
447
  floorIndex,
448
448
  containerLayoutLeftRightMargin,
449
449
  true,
450
450
  index,
451
451
  borderStyle,
452
452
  )}
453
453
  </LazyLayoutLoad>
454
454
  ) : (
455
455
  renderFloorItem(
456
456
  item,
457
457
  floorItem,
458
458
  floorIndex,
459
459
  containerLayoutLeftRightMargin,
460
460
  false,
461
461
  index,
462
462
  borderStyle,
463
463
  )
464
464
  );
465
465
  })}
466
466
  </View>
467
467
  </React.Fragment>
468
468
  );
469
469
  })}
470
470
  </>
471
471
  ) : !emptyFloorListHidden ? (
472
472
  <View
473
473
  className={classNames(shopContainerListStyle['d-container-list-no-data'], {
474
474
  [shopContainerListStyle['d-sage-shop-no-data']]: hasLiveForSageShop,
475
475
  })}
476
476
  style={getNoDataContainerHeight()}
477
477
  >
478
478
  <NetworkDataError
479
479
  netWorkShowType={NetWorkShowType.PART}
480
480
  netWorkDataType={NETWORK_DATA_TYPE.DATA_ERROR}
481
481
  backgroundColorWhite={hasLiveForSageShop}
482
482
  refreshCallBackFn={refreshFloorListDataFn ? refreshFloorListDataFn : null}
483
483
  btnLabel={refreshFloorListDataBtnLabel || ''}
484
484
  />
485
485
  </View>
486
486
  ) : null}
487
487
  </View>
488
488
  );
489
489
  updateShopDataFn: null,