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