@conecli/cone-render 0.10.1-beta.5 → 0.10.1-beta.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.
- package/dist/api/index.ts +1 -1
- package/dist/common/const.ts +1 -1
- package/dist/common/environmentType.ts +1 -1
- package/dist/common/index.h5.ts +1 -1
- package/dist/common/index.jd.ts +1 -1
- package/dist/common/index.ts +1 -1
- package/dist/common/index.weapp.ts +1 -1
- package/dist/common/pageType.ts +1 -1
- package/dist/common/sgmCustomCode.ts +1 -1
- package/dist/components/base/CountDown/index.module.scss +49 -44
- package/dist/components/base/CountDown/index.tsx +1 -1
- package/dist/components/base/CustomVideo/common.ts +1 -0
- package/dist/components/base/CustomVideo/index.tsx +1 -1
- package/dist/components/base/LazyLoadImage/index.h5.module.scss +11 -6
- package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
- package/dist/components/base/Price/Base/index.tsx +1 -1
- package/dist/components/base/Price/Double/index.module.scss +8 -0
- package/dist/components/base/Price/Double/index.tsx +1 -1
- package/dist/components/floorItem.tsx +1 -1
- package/dist/components/isv/Floor/index.tsx +1 -1
- package/dist/interface/component.ts +1 -1
- package/dist/interface/jumpEventReport.ts +1 -1
- package/dist/interface/service.ts +1 -1
- package/dist/jumpEventReport/base.ts +1 -1
- package/dist/jumpEventReport/index.jd.ts +1 -1
- package/dist/jumpEventReport/index.weapp.ts +1 -1
- package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
- package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
- package/dist/jumpEventReport/logEventConfig.ts +1 -1
- package/dist/jumpEventReport/web.base.ts +1 -1
- package/dist/jumpEventReport/web.jd.ts +1 -1
- package/dist/jumpEventReport/web.jdb.ts +1 -1
- package/dist/jumpEventReport/web.jdjch.ts +1 -1
- package/dist/jumpEventReport/web.jxwxapp.ts +1 -1
- package/dist/jumpEventReport/web.pc.ts +1 -1
- package/dist/jumpEventReport/web.tjapp.ts +1 -1
- package/dist/jumpEventReport/web.tjm.ts +1 -1
- package/dist/jumpEventReport/web.wxapp.ts +1 -1
- package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
- package/dist/modules/ContainerFloorList/index.tsx +1 -1
- package/dist/open/api/util.ts +1 -1
- package/dist/sass/base.scss +142 -141
- package/dist/service/fetchGateway.ts +1 -1
- package/dist/service/http/colorSign.ts +1 -1
- package/dist/service/http/h5Http.ts +1 -0
- package/dist/service/http/index.h5.ts +1 -0
- package/dist/service/requestServer.h5.ts +1 -0
- package/dist/service/requestServer.ts +1 -1
- package/dist/utils/connectNativeJsBridge.ts +1 -1
- package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
- package/dist/utils/h5Utils.ts +1 -1
- package/dist/utils/index.h5.ts +1 -1
- package/dist/utils/index.ts +1 -1
- package/dist/utils/index.weapp.ts +1 -1
- package/dist/utils/utils.ts +1 -1
- package/package.json +35 -29
- package/dist/utils/memberFormatUtils.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
priceLabelText: "到手价"
|
|
2
|
+
import React from 'react'
|
|
3
3
|
if(/^\d+(\.\d+)?[eE][+-]?\d+$/.test(value)){
|
|
4
4
|
sgmCustomReport({
|
|
5
5
|
code: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_basePrice`),
|
|
6
6
|
msg: {
|
|
7
7
|
price: value,
|
|
8
8
|
originalPrice: initValue,
|
|
9
9
|
msg: "当前价格为科学计数数据,上报关注该价格"
|
|
10
10
|
},
|
|
11
11
|
})
|
|
12
12
|
}
|
|
13
13
|
if(value === "NaN"){
|
|
14
14
|
sgmCustomReport({
|
|
15
15
|
code: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_basePrice`),
|
|
16
16
|
msg: {
|
|
17
17
|
price: value,
|
|
18
18
|
originalPrice: initValue,
|
|
19
19
|
msg: "价格转换异常,兜底展示暂无报价"
|
|
20
20
|
},
|
|
21
21
|
})
|
|
22
22
|
value = "暂无报价"
|
|
23
23
|
}
|
|
24
24
|
priceLabelText: "到手价"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
const result = String(strPrice).match(/(-?\d+)\.?(\d+)?/);
|
|
3
2
|
if(result && Number(result[0]) > 0){
|
|
4
3
|
return {
|
|
5
4
|
integerPrice: result[1],
|
|
6
5
|
decimalPrice: (result[2] || '').replace(/0+$/, '')
|
|
7
6
|
}
|
|
8
7
|
}else{
|
|
9
8
|
return null;
|
|
10
9
|
}
|
|
11
10
|
const {
|
|
12
11
|
jdPrice,
|
|
13
12
|
finalPrice,
|
|
14
13
|
priceText = '',
|
|
15
14
|
priceType,
|
|
16
15
|
hitUserIdentity = false,
|
|
17
16
|
isAuctionWare,
|
|
18
17
|
fallbackRender = null,
|
|
19
18
|
className = null,
|
|
20
19
|
style = {},
|
|
21
20
|
childrenClassName = null,
|
|
22
21
|
bigNoPriceClassName = null,
|
|
23
22
|
bigSymbolClassName = null,
|
|
24
23
|
bigIntegerClassName = null,
|
|
25
24
|
bigDecimalClassName = null,
|
|
26
25
|
priceDescClassName = null,
|
|
27
26
|
smallPriceClassName = null,
|
|
28
27
|
lineNumber = 1,
|
|
29
28
|
size = 'M',
|
|
30
29
|
isDefaultRemoveSmallPrice = false
|
|
31
30
|
} = props
|
|
32
31
|
const especialHitStyleType = {
|
|
33
32
|
7: 'plusStyle',
|
|
34
33
|
9: 'samStyle'
|
|
35
34
|
}
|
|
36
35
|
const especialMissStyleType = {
|
|
37
36
|
7: 'plusStyle',
|
|
38
37
|
8: 'fansStyle',
|
|
39
38
|
9: 'samStyle',
|
|
40
39
|
10: 'studentStyle',
|
|
41
40
|
12: 'yhdStyle',
|
|
42
41
|
13: 'memberStyle'
|
|
43
42
|
}
|
|
44
43
|
const isNoPrice = priceType === 4
|
|
45
44
|
const isUseFinalPriceAsBigPrice = [1, 2, 6, 14, 16, 17, 18].includes(priceType)
|
|
46
45
|
const isEquivalentHit = isUseFinalPriceAsBigPrice || hitUserIdentity
|
|
47
46
|
const bigPriceObj = getDeconstructPrice(isEquivalentHit? finalPrice: jdPrice)
|
|
48
47
|
if(isAuctionWare || (!isNoPrice && bigPriceObj === null)){
|
|
49
48
|
return fallbackRender
|
|
50
49
|
}
|
|
51
50
|
const {integerPrice, decimalPrice = ''} = bigPriceObj || {}
|
|
52
51
|
const isOnlyShowBigPrice = priceType === 3
|
|
53
52
|
const isHideSmallPrice = priceType === 14 || isDefaultRemoveSmallPrice
|
|
54
53
|
const smallPrice = isEquivalentHit? jdPrice: finalPrice
|
|
55
54
|
const isPriceDescInFront = isEquivalentHit
|
|
56
55
|
const hitColorStyle = isEquivalentHit? styles[especialHitStyleType[priceType]]: null
|
|
57
56
|
const missColorStyle = isEquivalentHit? null: styles[especialMissStyleType[priceType]]
|
|
58
57
|
const isBigPriceHasDecimal = decimalPrice !== '' && !/^0+$/.test(decimalPrice)
|
|
59
58
|
const sizeLineHeight = {
|
|
60
59
|
'XS': 28,
|
|
61
60
|
'S': 34,
|
|
62
61
|
'M': 40,
|
|
63
62
|
'L': 46,
|
|
64
63
|
'XL': 52
|
|
65
64
|
}
|
|
66
65
|
const lineHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25)
|
|
67
66
|
const wrapHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25 * lineNumber)
|
|
68
67
|
const computedHeightStyle = {
|
|
69
68
|
height: wrapHeight
|
|
70
69
|
}
|
|
71
70
|
const itemCommonStyle = {
|
|
72
71
|
height: lineHeight
|
|
73
72
|
}
|
|
74
73
|
const needSizeStyles = ['bigNoPrice', 'bigSymbol', 'bigInteger', 'bigDecimal', 'priceDesc', 'smallPrice']
|
|
75
74
|
const sizeStyles = needSizeStyles.reduce((acc, cur) => {
|
|
76
75
|
acc[cur] = styles[cur + size]
|
|
77
76
|
return acc
|
|
78
77
|
}, {})
|
|
79
78
|
const noPriceShowText = priceText || (/^[\u4e00-\u9fa5]+$/.test(jdPrice)? jdPrice: '')
|
|
80
79
|
return (
|
|
81
80
|
<View className={classNames(styles.wrap, className)} style={{...computedHeightStyle, ...style}}>
|
|
82
81
|
{isNoPrice?
|
|
83
82
|
<Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigNoPrice, sizeStyles['bigNoPrice'], childrenClassName, bigNoPriceClassName)} style={{...itemCommonStyle}}>{noPriceShowText}</Text>
|
|
84
83
|
:
|
|
85
84
|
[
|
|
86
85
|
<Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigSymbol, sizeStyles['bigSymbol'], hitColorStyle, childrenClassName, bigSymbolClassName)} key="bigSymbol" style={{...itemCommonStyle}}>¥</Text>,
|
|
87
86
|
<Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigInteger, sizeStyles['bigInteger'], hitColorStyle, !isOnlyShowBigPrice && !isBigPriceHasDecimal && !isPriceDescInFront ? styles.rightMargin : null, childrenClassName, bigIntegerClassName)} key="bigInteger" style={{...itemCommonStyle}}>{integerPrice}</Text>,
|
|
88
87
|
isBigPriceHasDecimal?
|
|
89
88
|
<Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigDecimal, sizeStyles['bigDecimal'], hitColorStyle, isPriceDescInFront ? null : styles.rightMargin, childrenClassName, bigDecimalClassName)} key="bigDecimal" style={{...itemCommonStyle}}>.{decimalPrice}</Text>
|
|
90
89
|
:
|
|
91
90
|
null
|
|
92
91
|
,
|
|
93
92
|
!isOnlyShowBigPrice && [
|
|
94
93
|
isPriceDescInFront && <Text className={classNames(styles.childStyle, styles.priceDesc, sizeStyles['priceDesc'], styles.bigStyle, hitColorStyle, isPriceDescInFront ? styles.rightMargin : null, childrenClassName, priceDescClassName)} key="descFront" style={{...itemCommonStyle}}>{priceText}</Text>,
|
|
95
94
|
<view style={{
|
|
96
95
|
display: 'inline-flex'
|
|
97
96
|
}}>
|
|
98
97
|
{smallPrice && !isHideSmallPrice ? <Text className={classNames(styles.childStyle, styles.smallPrice, sizeStyles['smallPrice'], styles.smallStyle, missColorStyle, childrenClassName, smallPriceClassName)} key="smallPrice" style={{...itemCommonStyle}}>¥{smallPrice}</Text> : null}
|
|
99
98
|
{!isPriceDescInFront && !isHideSmallPrice && <Text className={classNames(styles.childStyle, styles.priceDesc, sizeStyles['priceDesc'], styles.smallStyle, styles.missPriceDesc, missColorStyle, childrenClassName, priceDescClassName)} key="descBack" style={{...itemCommonStyle}}>{priceText}</Text>}
|
|
100
99
|
</view>
|
|
101
100
|
]
|
|
102
101
|
]
|
|
103
102
|
}
|
|
104
103
|
</View>
|
|
105
104
|
)
|
|
105
|
+
import React from 'react';
|
|
106
106
|
console.warn('🚗 ~~ file: index.tsx:22 ~~ reportException() ~~ {type, detail, text}:', {
|
|
107
107
|
type,
|
|
108
108
|
data,
|
|
109
109
|
text,
|
|
110
110
|
});
|
|
111
111
|
sgmCustomReport({
|
|
112
112
|
code: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_${type}`),
|
|
113
113
|
msg: {
|
|
114
114
|
type,
|
|
115
115
|
data,
|
|
116
116
|
text: '[双价格组件]' + text,
|
|
117
117
|
},
|
|
118
118
|
});
|
|
119
119
|
return rest.some((item) => item === undefined || item === '');
|
|
120
120
|
const numPrice = Number(strPrice);
|
|
121
121
|
if (isNaN(numPrice)) {
|
|
122
122
|
reportException({
|
|
123
123
|
type: 'isNotNumericType',
|
|
124
124
|
data: props,
|
|
125
125
|
text: `传入价格字段值“${strPrice}”转换数字报错`,
|
|
126
126
|
});
|
|
127
127
|
return false;
|
|
128
128
|
}
|
|
129
129
|
else if (numPrice <= 0) {
|
|
130
130
|
reportException({
|
|
131
131
|
type: 'isNotPositiveNumber',
|
|
132
132
|
data: props,
|
|
133
133
|
text: `传入价格字段值“${strPrice}”不是一个正数`,
|
|
134
134
|
});
|
|
135
135
|
return false;
|
|
136
136
|
}
|
|
137
137
|
const result = numPrice.toString().match(/(\d+)(\.(\d+))?/);
|
|
138
138
|
if (result && result[3]?.length > 2) {
|
|
139
139
|
reportException({
|
|
140
140
|
type: 'decimalPlaceTooLong',
|
|
141
141
|
data: props,
|
|
142
142
|
text: `传入价格字段值“${strPrice}”小数位不能超过2位`,
|
|
143
143
|
});
|
|
144
144
|
return false;
|
|
145
145
|
}
|
|
146
146
|
if (/^\d+(\.\d+)?[eE][+-]?\d+$/.test(strPrice)) {
|
|
147
147
|
reportException({
|
|
148
148
|
type: 'findScientificNotation',
|
|
149
149
|
data: props,
|
|
150
150
|
text: `传入价格字段值“${strPrice}”是一个科学计数法格式`,
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
153
|
return true;
|
|
154
154
|
const { jdPrice, finalPrice } = props;
|
|
155
155
|
if (jdPrice && finalPrice && Number(jdPrice) <= Number(finalPrice)) {
|
|
156
156
|
reportException({
|
|
157
157
|
type: 'pricesCompareException',
|
|
158
158
|
data: props,
|
|
159
159
|
text: `身份/到手价必须小于松果价`,
|
|
160
160
|
});
|
|
161
161
|
return false;
|
|
162
162
|
} else {
|
|
163
163
|
return true;
|
|
164
164
|
}
|
|
165
165
|
const numPrice = Number(strPrice);
|
|
166
166
|
const result = numPrice.toString().match(/(\d+)(\.(\d+))?/);
|
|
167
167
|
if (result) {
|
|
168
168
|
return {
|
|
169
169
|
integerPrice: result[1],
|
|
170
170
|
decimalPrice: (result[3] || '').replace(/0+$/, ''),
|
|
171
171
|
};
|
|
172
172
|
} else {
|
|
173
173
|
reportException({
|
|
174
174
|
type: 'deconstructException',
|
|
175
175
|
data: props,
|
|
176
176
|
text: `解构传入价格字段值“${strPrice}”解构发生异常`,
|
|
177
177
|
});
|
|
178
178
|
return null;
|
|
179
179
|
}
|
|
180
180
|
const {
|
|
181
181
|
jdPrice,
|
|
182
182
|
finalPrice,
|
|
183
183
|
priceText = '',
|
|
184
184
|
priceType,
|
|
185
185
|
hitUserIdentity = false,
|
|
186
186
|
fallbackRender = null,
|
|
187
187
|
className = null,
|
|
188
188
|
style = {},
|
|
189
189
|
childrenClassName = null,
|
|
190
190
|
bigNoPriceClassName = null,
|
|
191
191
|
bigSymbolClassName = null,
|
|
192
192
|
bigIntegerClassName = null,
|
|
193
193
|
bigDecimalClassName = null,
|
|
194
194
|
priceDescClassName = null,
|
|
195
195
|
smallPriceClassName = null,
|
|
196
196
|
lineNumber = 1,
|
|
197
197
|
size = 'M',
|
|
198
198
|
isDefaultRemoveSmallPrice = false,
|
|
199
199
|
} = props;
|
|
200
200
|
let useBackstop = false;
|
|
201
201
|
if (isNull(props.jdPrice, props.priceType)) {
|
|
202
202
|
useBackstop = true;
|
|
203
203
|
reportException({
|
|
204
204
|
type: 'paramMiss',
|
|
205
205
|
data: props,
|
|
206
206
|
text: '缺少必要入参:jdPrice、priceType',
|
|
207
207
|
});
|
|
208
208
|
} else if (
|
|
209
209
|
!allowedNoHitUserIdentityTypes.includes(props.priceType) &&
|
|
210
210
|
props.hitUserIdentity === undefined
|
|
211
211
|
) {
|
|
212
212
|
useBackstop = true;
|
|
213
213
|
reportException({
|
|
214
214
|
type: 'paramMiss',
|
|
215
215
|
data: props,
|
|
216
216
|
text: `价格类型${props.priceType}缺少必要入参:hitUserIdentity`,
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
219
|
const especialHitStyleType = {
|
|
220
220
|
7: 'plusStyle',
|
|
221
221
|
9: 'samStyle',
|
|
222
222
|
};
|
|
223
223
|
const especialMissStyleType = {
|
|
224
224
|
7: 'plusStyle',
|
|
225
225
|
8: 'fansStyle',
|
|
226
226
|
9: 'samStyle',
|
|
227
227
|
10: 'studentStyle',
|
|
228
228
|
12: 'yhdStyle',
|
|
229
229
|
13: 'memberStyle',
|
|
230
230
|
};
|
|
231
231
|
const isUseFinalPriceAsBigPrice = allowedNoHitUserIdentityTypes.includes(priceType);
|
|
232
232
|
const isEquivalentHit = isUseFinalPriceAsBigPrice || hitUserIdentity;
|
|
233
233
|
const isOnlyShowBigPrice = priceType === 3 || isNull(finalPrice);
|
|
234
234
|
const smallPrice = isEquivalentHit ? jdPrice : finalPrice;
|
|
235
235
|
const isHideSmallPrice =
|
|
236
236
|
priceType === 14 || isDefaultRemoveSmallPrice || isNaN(Number(smallPrice));
|
|
237
237
|
const isTextPrice = priceType === 4;
|
|
238
238
|
if (!isTextPrice && !useBackstop) {
|
|
239
239
|
if (finalPrice && !numericPriceValidate(finalPrice, props)) {
|
|
240
240
|
useBackstop = true;
|
|
241
241
|
} else if (!numericPriceValidate(jdPrice, props)) {
|
|
242
242
|
useBackstop = true;
|
|
243
243
|
}
|
|
244
244
|
if (!useBackstop && !isOnlyShowBigPrice && !isHideSmallPrice && !pricesCompareValidate(props)) {
|
|
245
245
|
useBackstop = true;
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
const bigPriceObj =
|
|
249
249
|
isTextPrice || useBackstop
|
|
250
250
|
? {}
|
|
251
251
|
: getDeconstructPrice(isEquivalentHit && !isNull(finalPrice) ? finalPrice : jdPrice, props);
|
|
252
252
|
const { integerPrice = '', decimalPrice = '' } = bigPriceObj || {};
|
|
253
253
|
const isPriceDescInFront = isEquivalentHit;
|
|
254
254
|
const hitColorStyle = isEquivalentHit ? styles[especialHitStyleType[priceType]] : null;
|
|
255
255
|
const missColorStyle = isEquivalentHit ? null : styles[especialMissStyleType[priceType]];
|
|
256
256
|
const isBigPriceHasDecimal = decimalPrice !== '' && !/^0+$/.test(decimalPrice);
|
|
257
257
|
const sizeLineHeight = {
|
|
258
258
|
XS: 28,
|
|
259
259
|
S: 34,
|
|
260
260
|
M: 40,
|
|
261
261
|
L: 46,
|
|
262
262
|
XL: 52,
|
|
263
263
|
};
|
|
264
264
|
const lineHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25);
|
|
265
265
|
const wrapHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25 * lineNumber);
|
|
266
266
|
const computedHeightStyle = {
|
|
267
267
|
height: wrapHeight,
|
|
268
268
|
};
|
|
269
269
|
const itemCommonStyle = {
|
|
270
270
|
height: lineHeight,
|
|
271
271
|
};
|
|
272
272
|
const needSizeStyles = [
|
|
273
273
|
'bigNoPrice',
|
|
274
274
|
'bigSymbol',
|
|
275
275
|
'bigInteger',
|
|
276
276
|
'bigDecimal',
|
|
277
277
|
'priceDesc',
|
|
278
278
|
'smallPrice',
|
|
279
279
|
];
|
|
280
280
|
const sizeStyles = needSizeStyles.reduce((acc, cur) => {
|
|
281
281
|
acc[cur] = styles[cur + size];
|
|
282
282
|
return acc;
|
|
283
283
|
}, {});
|
|
284
284
|
const finalFallbackText = !isLanguageForEn ? '暂无报价' : 'Unpriced';
|
|
285
285
|
const noPriceShowText =
|
|
286
286
|
priceText || (/^[\u4e00-\u9fa5]+$/.test(jdPrice) ? jdPrice : finalFallbackText);
|
|
287
287
|
if (useBackstop && fallbackRender) {
|
|
288
288
|
return fallbackRender;
|
|
289
289
|
}
|
|
290
290
|
return (
|
|
291
291
|
<View
|
|
292
292
|
className={classNames(styles.wrap, className)}
|
|
293
293
|
style={{ ...computedHeightStyle, ...style }}
|
|
294
294
|
>
|
|
295
295
|
{isTextPrice || useBackstop ? (
|
|
296
296
|
<Text
|
|
297
297
|
className={classNames(
|
|
298
298
|
styles.childStyle,
|
|
299
299
|
styles.bigStyle,
|
|
300
300
|
styles.bigNoPrice,
|
|
301
301
|
sizeStyles['bigNoPrice'],
|
|
302
302
|
childrenClassName,
|
|
303
303
|
bigNoPriceClassName,
|
|
304
304
|
)}
|
|
305
305
|
style={{ ...itemCommonStyle }}
|
|
306
306
|
>
|
|
307
307
|
{useBackstop ? finalFallbackText : noPriceShowText}
|
|
308
308
|
</Text>
|
|
309
309
|
) : (
|
|
310
310
|
[
|
|
311
311
|
<Text
|
|
312
312
|
className={classNames(
|
|
313
313
|
styles.childStyle,
|
|
314
314
|
styles.bigStyle,
|
|
315
315
|
styles.bigSymbol,
|
|
316
316
|
sizeStyles['bigSymbol'],
|
|
317
317
|
hitColorStyle,
|
|
318
318
|
childrenClassName,
|
|
319
319
|
bigSymbolClassName,
|
|
320
320
|
)}
|
|
321
321
|
key="bigSymbol"
|
|
322
322
|
style={{ ...itemCommonStyle }}
|
|
323
323
|
>
|
|
324
324
|
¥
|
|
325
325
|
</Text>,
|
|
326
326
|
<Text
|
|
327
327
|
className={classNames(
|
|
328
328
|
styles.childStyle,
|
|
329
329
|
styles.bigStyle,
|
|
330
330
|
styles.bigInteger,
|
|
331
331
|
sizeStyles['bigInteger'],
|
|
332
332
|
hitColorStyle,
|
|
333
333
|
!isOnlyShowBigPrice && !isBigPriceHasDecimal && !isPriceDescInFront
|
|
334
334
|
? styles.rightMargin
|
|
335
335
|
: null,
|
|
336
336
|
childrenClassName,
|
|
337
337
|
bigIntegerClassName,
|
|
338
338
|
)}
|
|
339
339
|
key="bigInteger"
|
|
340
340
|
style={{ ...itemCommonStyle }}
|
|
341
341
|
>
|
|
342
342
|
{integerPrice}
|
|
343
343
|
</Text>,
|
|
344
344
|
isBigPriceHasDecimal ? (
|
|
345
345
|
<Text
|
|
346
346
|
className={classNames(
|
|
347
347
|
styles.childStyle,
|
|
348
348
|
styles.bigStyle,
|
|
349
349
|
styles.bigDecimal,
|
|
350
350
|
sizeStyles['bigDecimal'],
|
|
351
351
|
hitColorStyle,
|
|
352
352
|
isPriceDescInFront ? null : styles.rightMargin,
|
|
353
353
|
childrenClassName,
|
|
354
354
|
bigDecimalClassName,
|
|
355
355
|
)}
|
|
356
356
|
key="bigDecimal"
|
|
357
357
|
style={{ ...itemCommonStyle }}
|
|
358
358
|
>
|
|
359
359
|
.{decimalPrice}
|
|
360
360
|
</Text>
|
|
361
361
|
) : null,
|
|
362
362
|
!isOnlyShowBigPrice && [
|
|
363
363
|
isPriceDescInFront && (
|
|
364
364
|
<Text
|
|
365
365
|
className={classNames(
|
|
366
366
|
styles.childStyle,
|
|
367
367
|
styles.priceDesc,
|
|
368
368
|
{
|
|
369
369
|
[styles['priceEnDesc']]: isLanguageForEn,
|
|
370
370
|
},
|
|
371
371
|
{
|
|
372
372
|
[styles['priceHiddenDesc']]: priceText === '',
|
|
373
373
|
},
|
|
374
374
|
sizeStyles['priceDesc'],
|
|
375
375
|
styles.bigStyle,
|
|
376
376
|
hitColorStyle,
|
|
377
377
|
isPriceDescInFront ? styles.rightMargin : null,
|
|
378
378
|
childrenClassName,
|
|
379
379
|
priceDescClassName,
|
|
380
380
|
)}
|
|
381
381
|
key="descFront"
|
|
382
382
|
style={{ ...itemCommonStyle }}
|
|
383
383
|
>
|
|
384
384
|
{priceText === '' ? '_' : priceText}
|
|
385
385
|
</Text>
|
|
386
386
|
),
|
|
387
387
|
<View
|
|
388
388
|
style={{
|
|
389
389
|
display: 'inline-flex',
|
|
390
390
|
}}
|
|
391
391
|
>
|
|
392
392
|
{smallPrice && !isHideSmallPrice ? (
|
|
393
393
|
<Text
|
|
394
394
|
className={classNames(
|
|
395
395
|
styles.childStyle,
|
|
396
396
|
styles.smallPrice,
|
|
397
397
|
sizeStyles['smallPrice'],
|
|
398
398
|
styles.smallStyle,
|
|
399
399
|
missColorStyle,
|
|
400
400
|
childrenClassName,
|
|
401
401
|
smallPriceClassName,
|
|
402
402
|
)}
|
|
403
403
|
key="smallPrice"
|
|
404
404
|
style={{ ...itemCommonStyle }}
|
|
405
405
|
>
|
|
406
406
|
¥{Number(smallPrice)}
|
|
407
407
|
</Text>
|
|
408
408
|
) : null}
|
|
409
409
|
{!isPriceDescInFront && !isHideSmallPrice && (
|
|
410
410
|
<Text
|
|
411
411
|
className={classNames(
|
|
412
412
|
styles.childStyle,
|
|
413
413
|
styles.priceDesc,
|
|
414
414
|
{
|
|
415
415
|
[styles['priceEnDesc']]: isLanguageForEn,
|
|
416
416
|
},
|
|
417
417
|
{
|
|
418
418
|
[styles['priceHiddenDesc']]: priceText === '',
|
|
419
419
|
},
|
|
420
420
|
sizeStyles['priceDesc'],
|
|
421
421
|
styles.smallStyle,
|
|
422
422
|
styles.missPriceDesc,
|
|
423
423
|
missColorStyle,
|
|
424
424
|
childrenClassName,
|
|
425
425
|
priceDescClassName,
|
|
426
426
|
)}
|
|
427
427
|
key="descBack"
|
|
428
428
|
style={{ ...itemCommonStyle }}
|
|
429
429
|
>
|
|
430
430
|
{priceText === '' ? '_' : priceText}
|
|
431
431
|
</Text>
|
|
432
432
|
)}
|
|
433
433
|
</View>,
|
|
434
434
|
],
|
|
435
435
|
]
|
|
436
436
|
)}
|
|
437
437
|
</View>
|
|
438
438
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
const {
|
|
3
2
|
floorData,
|
|
4
3
|
renderSourceType = BUSINESS_TYPE.ONLINE,
|
|
5
4
|
builtInComponents = {},
|
|
6
5
|
} = props
|
|
7
6
|
const isDevMode = renderSourceType === BUSINESS_TYPE.DECORATE
|
|
8
7
|
const specificModuleFlag = ['mHeaderVideo']
|
|
9
8
|
const frontEndSpecificModuleFlag = ['header_mVideo']
|
|
10
9
|
const luxuryContainerPosition = 'luxuryFixed'
|
|
11
10
|
const floorPosition = floorData?.floorPosition
|
|
12
11
|
let floorModuleType: any = floorData?.floorExtInfo?.moduleFlag
|
|
13
12
|
specificModuleFlag.includes(floorModuleType) && floorPosition === luxuryContainerPosition && (floorModuleType = frontEndSpecificModuleFlag)
|
|
14
13
|
const FloorContentItem =
|
|
15
14
|
(floorModuleType && builtInComponents[floorModuleType]) || null
|
|
16
15
|
const dataDefines = getFloorDataToDataDefines(floorData)
|
|
17
16
|
|
|
18
17
|
const renderDecorateDefaultModule = () => {
|
|
19
18
|
return (
|
|
20
19
|
<View
|
|
21
20
|
style={{
|
|
22
21
|
lineHeight: '120px',
|
|
23
22
|
textAlign: 'center',
|
|
24
23
|
}}
|
|
25
24
|
>
|
|
26
25
|
当前模块是{floorData.moduleName}
|
|
27
26
|
</View>
|
|
28
27
|
)
|
|
29
28
|
}
|
|
30
29
|
if (
|
|
31
30
|
floorModuleType &&
|
|
32
31
|
(RemoteLoadFloorList.includes(floorModuleType) ||
|
|
33
32
|
floorData?.floorExtInfo?.floorLoadWay === 2)
|
|
34
33
|
) {
|
|
35
34
|
return (
|
|
36
35
|
<RemoteFloorItem {...props} dataDefines={dataDefines}></RemoteFloorItem>
|
|
37
36
|
)
|
|
38
37
|
} else {
|
|
39
38
|
return FloorContentItem ? (
|
|
40
39
|
<ErrorBoundary {...props}>
|
|
41
40
|
<FloorContentItem {...props} dataDefines={dataDefines} />
|
|
42
41
|
</ErrorBoundary>
|
|
43
42
|
) : isDevMode ? (
|
|
44
43
|
renderDecorateDefaultModule()
|
|
45
44
|
) : null
|
|
46
45
|
}
|
|
47
46
|
switch (moduleId) {
|
|
48
47
|
case 83158:
|
|
49
48
|
return 'freeLayout'
|
|
50
49
|
case 99654:
|
|
51
50
|
return 'activeText'
|
|
52
51
|
case 100382:
|
|
53
52
|
return 'superGoods'
|
|
54
53
|
}
|
|
55
54
|
floorList.map((item) => {
|
|
56
55
|
if (!item.floorExtInfo) {
|
|
57
56
|
return null
|
|
58
57
|
}
|
|
59
58
|
const moduleFlag = item.floorExtInfo.moduleFlag
|
|
60
59
|
if (!moduleFlag) {
|
|
61
60
|
const newModuleFlag = moduleId2ModuleFlag(item.moduleId)
|
|
62
61
|
if (newModuleFlag) {
|
|
63
62
|
item.floorExtInfo.moduleFlag = newModuleFlag
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
65
|
})
|
|
66
|
+
import React from 'react'
|
|
67
67
|
const {
|
|
68
68
|
floorData,
|
|
69
69
|
renderSourceType = BUSINESS_TYPE.ONLINE,
|
|
70
70
|
builtInComponents = {},
|
|
71
71
|
} = props
|
|
72
72
|
const isDevMode = renderSourceType === BUSINESS_TYPE.DECORATE
|
|
73
73
|
const specificModuleFlag = ['mHeaderVideo']
|
|
74
74
|
const frontEndSpecificModuleFlag = ['header_mVideo']
|
|
75
75
|
const luxuryContainerPosition = 'luxuryFixed'
|
|
76
76
|
const floorPosition = floorData?.floorPosition
|
|
77
77
|
let floorModuleType: any = floorData?.floorExtInfo?.moduleFlag
|
|
78
78
|
specificModuleFlag.includes(floorModuleType) &&
|
|
79
79
|
floorPosition === luxuryContainerPosition &&
|
|
80
80
|
(floorModuleType = frontEndSpecificModuleFlag)
|
|
81
81
|
const FloorContentItem =
|
|
82
82
|
(floorModuleType && builtInComponents[floorModuleType]) || null
|
|
83
83
|
const dataDefines = getFloorDataToDataDefines(floorData)
|
|
84
84
|
|
|
85
85
|
const renderDecorateDefaultModule = () => {
|
|
86
86
|
return (
|
|
87
87
|
<View
|
|
88
88
|
style={{
|
|
89
89
|
lineHeight: '120px',
|
|
90
90
|
textAlign: 'center',
|
|
91
91
|
}}
|
|
92
92
|
>
|
|
93
93
|
当前模块是{floorData.moduleName}
|
|
94
94
|
</View>
|
|
95
95
|
)
|
|
96
96
|
}
|
|
97
97
|
if (
|
|
98
98
|
floorModuleType &&
|
|
99
99
|
(RemoteLoadFloorList.includes(floorModuleType) ||
|
|
100
100
|
floorData?.floorExtInfo?.floorLoadWay === 2)
|
|
101
101
|
) {
|
|
102
102
|
return (
|
|
103
103
|
<RemoteFloorItem {...props} dataDefines={dataDefines}></RemoteFloorItem>
|
|
104
104
|
)
|
|
105
105
|
} else {
|
|
106
106
|
return FloorContentItem ? (
|
|
107
107
|
<ErrorBoundary {...props}>
|
|
108
108
|
<FloorContentItem {...props} dataDefines={dataDefines} />
|
|
109
109
|
</ErrorBoundary>
|
|
110
110
|
) : isDevMode ? (
|
|
111
111
|
renderDecorateDefaultModule()
|
|
112
112
|
) : null
|
|
113
113
|
}
|
|
114
114
|
switch (moduleId) {
|
|
115
115
|
case 83158:
|
|
116
116
|
return 'freeLayout'
|
|
117
117
|
case 99654:
|
|
118
118
|
return 'activeText'
|
|
119
119
|
case 100382:
|
|
120
120
|
return 'superGoods'
|
|
121
121
|
}
|
|
122
122
|
floorList.map((item) => {
|
|
123
123
|
if (!item.floorExtInfo) {
|
|
124
124
|
return null
|
|
125
125
|
}
|
|
126
126
|
const moduleFlag = item.floorExtInfo.moduleFlag
|
|
127
127
|
if (!moduleFlag) {
|
|
128
128
|
const newModuleFlag = moduleId2ModuleFlag(item.moduleId)
|
|
129
129
|
if (newModuleFlag) {
|
|
130
130
|
item.floorExtInfo.moduleFlag = newModuleFlag
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
})
|