@conecli/cone-render 0.10.1-shop-beta.5 → 0.10.1-shop3.0

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 (37) hide show
  1. package/dist/api/index.ts +1 -1
  2. package/dist/common/const.ts +1 -1
  3. package/dist/common/index.h5.ts +1 -1
  4. package/dist/common/index.jd.ts +1 -1
  5. package/dist/common/index.ts +1 -1
  6. package/dist/common/index.weapp.ts +1 -1
  7. package/dist/common/pageType.ts +1 -1
  8. package/dist/common/sgmCustomCode.ts +1 -1
  9. package/dist/components/base/CustomVideo/common.ts +1 -0
  10. package/dist/components/base/CustomVideo/index.tsx +1 -1
  11. package/dist/components/base/LazyLoadImage/index.h5.module.scss +8 -4
  12. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  13. package/dist/components/base/Price/Base/index.tsx +1 -1
  14. package/dist/components/base/Price/Double/index.tsx +1 -1
  15. package/dist/components/floorItem.tsx +1 -1
  16. package/dist/components/isv/Floor/index.tsx +1 -1
  17. package/dist/interface/component.ts +1 -1
  18. package/dist/interface/jumpEventReport.ts +1 -1
  19. package/dist/interface/service.ts +1 -1
  20. package/dist/jumpEventReport/index.weapp.ts +1 -1
  21. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  22. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  23. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  24. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  25. package/dist/open/api/util.ts +1 -1
  26. package/dist/service/http/colorSign.ts +1 -1
  27. package/dist/service/http/h5Http.ts +1 -0
  28. package/dist/service/http/index.h5.ts +1 -0
  29. package/dist/service/requestServer.h5.ts +1 -0
  30. package/dist/service/requestServer.ts +1 -1
  31. package/dist/utils/connectNativeJsBridge.ts +1 -1
  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/utils.ts +1 -1
  37. package/package.json +1 -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}:", {type, data, text})
107
107
  sgmCustomReport({
108
108
  code: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_${type}`),
109
109
  msg: {
110
110
  type,
111
111
  data,
112
112
  text: '[双价格组件]' + text
113
113
  },
114
114
  })
115
115
  return rest.some(item => item === undefined || item === '')
116
116
  const numPrice = Number(strPrice)
117
117
  if(isNaN(numPrice)){
118
118
  reportException({
119
119
  type: 'isNotNumericType',
120
120
  data: props,
121
121
  text: `传入价格字段值“${strPrice}”转换数字报错`
122
122
  })
123
123
  return false
124
124
  }
125
125
  else if(numPrice <= 0){
126
126
  reportException({
127
127
  type: 'isNotPositiveNumber',
128
128
  data: props,
129
129
  text: `传入价格字段值“${strPrice}”不是一个正数`
130
130
  })
131
131
  return false
132
132
  }
133
133
  const result = numPrice.toString().match(/(\d+)(\.(\d+))?/)
134
134
  if(result && result[3]?.length > 2){
135
135
  reportException({
136
136
  type: 'decimalPlaceTooLong',
137
137
  data: props,
138
138
  text: `传入价格字段值“${strPrice}”小数位不能超过2位`
139
139
  })
140
140
  return false
141
141
  }
142
142
  if(/^\d+(\.\d+)?[eE][+-]?\d+$/.test(strPrice)){
143
143
  reportException({
144
144
  type: 'findScientificNotation',
145
145
  data: props,
146
146
  text: `传入价格字段值“${strPrice}”是一个科学计数法格式`
147
147
  })
148
148
  }
149
149
  return true
150
150
  const {jdPrice, finalPrice} = props
151
151
  if(jdPrice && finalPrice && Number(jdPrice) <= Number(finalPrice)){
152
152
  reportException({
153
153
  type: 'pricesCompareException',
154
154
  data: props,
155
155
  text: `身份/到手价必须小于松果价`
156
156
  })
157
157
  return false
158
158
  }else{
159
159
  return true
160
160
  }
161
161
  const numPrice = Number(strPrice)
162
162
  const result = numPrice.toString().match(/(\d+)(\.(\d+))?/)
163
163
  if(result){
164
164
  return {
165
165
  integerPrice: result[1],
166
166
  decimalPrice: (result[3] || '').replace(/0+$/, '')
167
167
  }
168
168
  }else{
169
169
  reportException({
170
170
  type: 'deconstructException',
171
171
  data: props,
172
172
  text: `解构传入价格字段值“${strPrice}”解构发生异常`
173
173
  })
174
174
  return null
175
175
  }
176
176
  const {
177
177
  jdPrice,
178
178
  finalPrice,
179
179
  priceText = '',
180
180
  priceType,
181
181
  hitUserIdentity = false,
182
182
  fallbackRender = null,
183
183
  className = null,
184
184
  style = {},
185
185
  childrenClassName = null,
186
186
  bigNoPriceClassName = null,
187
187
  bigSymbolClassName = null,
188
188
  bigIntegerClassName = null,
189
189
  bigDecimalClassName = null,
190
190
  priceDescClassName = null,
191
191
  smallPriceClassName = null,
192
192
  lineNumber = 1,
193
193
  size = 'M',
194
194
  isDefaultRemoveSmallPrice = false
195
195
  } = props
196
196
  let useBackstop = false
197
197
  if(isNull(props.jdPrice, props.priceType)){
198
198
  useBackstop = true
199
199
  reportException({
200
200
  type: 'paramMiss',
201
201
  data: props,
202
202
  text: '缺少必要入参:jdPrice、priceType'
203
203
  })
204
204
  }else if(!allowedNoHitUserIdentityTypes.includes(props.priceType) && props.hitUserIdentity === undefined){
205
205
  useBackstop = true
206
206
  reportException({
207
207
  type: 'paramMiss',
208
208
  data: props,
209
209
  text: `价格类型${props.priceType}缺少必要入参:hitUserIdentity`
210
210
  })
211
211
  }
212
212
  const especialHitStyleType = {
213
213
  7: 'plusStyle',
214
214
  9: 'samStyle'
215
215
  }
216
216
  const especialMissStyleType = {
217
217
  7: 'plusStyle',
218
218
  8: 'fansStyle',
219
219
  9: 'samStyle',
220
220
  10: 'studentStyle',
221
221
  12: 'yhdStyle',
222
222
  13: 'memberStyle'
223
223
  }
224
224
  const isTextPrice = priceType === 4
225
225
  if(!isTextPrice && !useBackstop){
226
226
  if(finalPrice && !numericPriceValidate(finalPrice, props)){
227
227
  useBackstop = true
228
228
  }else if(!numericPriceValidate(jdPrice, props)){
229
229
  useBackstop = true
230
230
  }
231
231
  if(!useBackstop && !pricesCompareValidate(props)){
232
232
  useBackstop = true
233
233
  }
234
234
  }
235
235
  const isUseFinalPriceAsBigPrice = allowedNoHitUserIdentityTypes.includes(priceType)
236
236
  const isEquivalentHit = isUseFinalPriceAsBigPrice || hitUserIdentity
237
237
  const bigPriceObj = (isTextPrice || useBackstop)? {}: getDeconstructPrice(isEquivalentHit && !isNull(finalPrice)? finalPrice: jdPrice, props)
238
238
  const {integerPrice = '', decimalPrice = ''} = bigPriceObj || {}
239
239
  const isOnlyShowBigPrice = priceType === 3 || isNull(finalPrice)
240
240
  const smallPrice = isEquivalentHit? jdPrice: finalPrice
241
241
  const isHideSmallPrice = priceType === 14 || isDefaultRemoveSmallPrice || isNaN(Number(smallPrice))
242
242
  const isPriceDescInFront = isEquivalentHit
243
243
  const hitColorStyle = isEquivalentHit? styles[especialHitStyleType[priceType]]: null
244
244
  const missColorStyle = isEquivalentHit? null: styles[especialMissStyleType[priceType]]
245
245
  const isBigPriceHasDecimal = decimalPrice !== '' && !/^0+$/.test(decimalPrice)
246
246
  const sizeLineHeight = {
247
247
  'XS': 28,
248
248
  'S': 34,
249
249
  'M': 40,
250
250
  'L': 46,
251
251
  'XL': 52
252
252
  }
253
253
  const lineHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25)
254
254
  const wrapHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25 * lineNumber)
255
255
  const computedHeightStyle = {
256
256
  height: wrapHeight
257
257
  }
258
258
  const itemCommonStyle = {
259
259
  height: lineHeight
260
260
  }
261
261
  const needSizeStyles = ['bigNoPrice', 'bigSymbol', 'bigInteger', 'bigDecimal', 'priceDesc', 'smallPrice']
262
262
  const sizeStyles = needSizeStyles.reduce((acc, cur) => {
263
263
  acc[cur] = styles[cur + size]
264
264
  return acc
265
265
  }, {})
266
266
  const finalFallbackText = '暂无报价'
267
267
  const noPriceShowText = priceText || (/^[\u4e00-\u9fa5]+$/.test(jdPrice)? jdPrice: finalFallbackText)
268
268
  if(useBackstop && fallbackRender){
269
269
  return fallbackRender
270
270
  }
271
271
  return (
272
272
  <View className={classNames(styles.wrap, className)} style={{...computedHeightStyle, ...style}}>
273
273
  {isTextPrice || useBackstop?
274
274
  <Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigNoPrice, sizeStyles['bigNoPrice'], childrenClassName, bigNoPriceClassName)} style={{...itemCommonStyle}}>{useBackstop? finalFallbackText: noPriceShowText}</Text>
275
275
  :
276
276
  [
277
277
  <Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigSymbol, sizeStyles['bigSymbol'], hitColorStyle, childrenClassName, bigSymbolClassName)} key="bigSymbol" style={{...itemCommonStyle}}>¥</Text>,
278
278
  <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>,
279
279
  isBigPriceHasDecimal?
280
280
  <Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigDecimal, sizeStyles['bigDecimal'], hitColorStyle, isPriceDescInFront ? null : styles.rightMargin, childrenClassName, bigDecimalClassName)} key="bigDecimal" style={{...itemCommonStyle}}>.{decimalPrice}</Text>
281
281
  :
282
282
  null
283
283
  ,
284
284
  !isOnlyShowBigPrice && [
285
285
  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>,
286
286
  <view style={{
287
287
  display: 'inline-flex'
288
288
  }}>
289
289
  {smallPrice && !isHideSmallPrice ? <Text className={classNames(styles.childStyle, styles.smallPrice, sizeStyles['smallPrice'], styles.smallStyle, missColorStyle, childrenClassName, smallPriceClassName)} key="smallPrice" style={{...itemCommonStyle}}>¥{Number(smallPrice)}</Text> : null}
290
290
  {!isPriceDescInFront && !isHideSmallPrice && <Text className={classNames(styles.childStyle, styles.priceDesc, sizeStyles['priceDesc'], styles.smallStyle, styles.missPriceDesc, missColorStyle, childrenClassName, priceDescClassName)} key="descBack" style={{...itemCommonStyle}}>{priceText}</Text>}
291
291
  </view>
292
292
  ]
293
293
  ]
294
294
  }
295
295
  </View>
296
296
  )
@@ -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
  })
@@ -1 +1 @@
1
- import React, { useCallback } from 'react'
2
1
  const {
3
2
  style,
4
3
  dataDefines,
5
4
  containerBorderRadius,
6
5
  floorData,
7
6
  isRealTimeRender,
8
7
  forceRenderTime,
9
8
  } = props
10
9
  const getRenderRealTimeKeyObj = {
11
10
  key: isRealTimeRender ? Date.now() : forceRenderTime,
12
11
  }
13
12
  console.log('远程加载楼层渲染key信息', getRenderRealTimeKeyObj)
14
13
  return (
15
14
  <View className={floorStyle['wrap']} style={style}>
16
15
  {floorData?.showCommonFloorHead === false ? null : (
17
16
  <CommonFloorHead
18
17
  dataDefines={dataDefines}
19
18
  floorData={floorData}
20
19
  {...getRenderRealTimeKeyObj}
21
20
  />
22
21
  )}
23
22
  <View
24
23
  className={floorStyle['wrap']}
25
24
  style={
26
25
  containerBorderRadius
27
26
  ? {
28
27
  borderRadius: containerBorderRadius + 'px',
29
28
  }
30
29
  : {}
31
30
  }
32
31
  >
33
32
  {}
34
33
  {props.children &&
35
34
  React.cloneElement(props.children, {
36
35
  dataDefines: dataDefines,
37
36
  ...getRenderRealTimeKeyObj,
38
37
  })}
39
38
  </View>
40
39
  </View>
41
40
  )
42
41
  isRealTimeRender: false,
43
42
  forceRenderTime: 1,
43
+ import React, { useCallback } from 'react'
44
44
  const {
45
45
  style,
46
46
  dataDefines,
47
47
  containerBorderRadius,
48
48
  floorData,
49
49
  isRealTimeRender,
50
50
  forceRenderTime,
51
51
  } = props
52
52
  const getRenderRealTimeKeyObj = {
53
53
  key: isRealTimeRender ? Date.now() : forceRenderTime,
54
54
  }
55
55
  console.log('远程加载楼层渲染key信息', getRenderRealTimeKeyObj)
56
56
  return (
57
57
  <View className={floorStyle['wrap']} style={style}>
58
58
  {floorData?.showCommonFloorHead === false ? null : (
59
59
  <CommonFloorHead
60
60
  dataDefines={dataDefines}
61
61
  floorData={floorData}
62
62
  {...getRenderRealTimeKeyObj}
63
63
  />
64
64
  )}
65
65
  <View
66
66
  className={floorStyle['wrap']}
67
67
  style={
68
68
  typeof containerBorderRadius === 'number'
69
69
  ? {
70
70
  borderRadius: containerBorderRadius + 'px',
71
71
  }
72
72
  : containerBorderRadius
73
73
  }
74
74
  >
75
75
  {}
76
76
  {props.children &&
77
77
  React.cloneElement(props.children, {
78
78
  dataDefines: dataDefines,
79
79
  ...getRenderRealTimeKeyObj,
80
80
  })}
81
81
  </View>
82
82
  </View>
83
83
  )
84
84
  isRealTimeRender: false,
85
85
  forceRenderTime: 1,
@@ -1 +1 @@
1
- import React from 'react'
2
1
  subMessage?: string
3
2
  viewMaxHeight?: string
4
3
  noPosition?: boolean
5
4
  floorLoadWay?: number
6
5
  floorKind?: number
7
6
  shopId?: string
8
7
  moduleDesignerType?: string
9
8
  showCommonFloorHead?: boolean
10
9
  borderRadius: number
11
10
  borderTopLeftRadius?: number
12
11
  borderTopRightRadius?: number
13
12
  borderBottomLeftRadius?: number
14
13
  borderBottomRightRadius?: number
15
14
  marginTop?: number
16
15
  marginBottom?: number
17
16
  marginLeft?: number
18
17
  marginRight?: number
19
18
  paddingTop?: number
20
19
  paddingBottom?: number
21
20
  paddingLeft?: number
22
21
  paddingRight?: number
23
22
  containerId: string
24
23
  background?: string
25
24
  containerPosition?: string
26
25
  key?: string
27
26
  floors: floorItemData[]
28
27
  includeUids: string[]
29
28
  typeCn: string
30
29
  typeCode?: string
31
30
  addLuxuryStyle?: boolean
32
31
  addLuxuryBackupStyle?: boolean
33
32
  renderExtendComponent?: Function
34
33
  insertContainerStartComponent?: Function
35
34
  floorExtendData?: any
36
35
  }
37
36
  isRealTimeRender: boolean
38
37
  forceRenderTime: number
39
38
  luxuryFixed?: boolean
40
39
  customErrorIsvFloorModule?: React.ReactElement | undefined
41
40
  containerIndex?: number
42
41
  containerData?: any
43
42
  shopTotalInfo?: any
44
43
  selectContainerFn?: Function
45
44
  selectContainerId?: string
46
45
  placeHolderPreContainerId?: string
47
46
  children?: any
48
47
  luxuryFixed?: boolean
49
48
  style?: {
50
49
  [key: string]: any
51
50
  };
52
51
  layoutLeftRightMargin?: number
53
52
  }
54
53
  isShowPlaceHolder?: boolean
55
54
  showDayToSecondState?: boolean
56
55
  onFormSubmit?: Function
57
56
  onFormReset?: Function
58
57
  isFormDialog?: boolean
59
58
  forbiddenBgScrollState?: boolean
60
59
  evenList: any[]
61
60
  oddList: any[]
61
+ import React from 'react'
62
62
  subMessage?: string
63
63
  viewMaxHeight?: string
64
64
  noPosition?: boolean
65
65
  floorLoadWay?: number
66
66
  floorKind?: number
67
67
  shopId?: string
68
68
  moduleDesignerType?: string
69
69
  showCommonFloorHead?: boolean
70
70
  borderRadius: number
71
71
  borderTopLeftRadius?: number
72
72
  borderTopRightRadius?: number
73
73
  borderBottomLeftRadius?: number
74
74
  borderBottomRightRadius?: number
75
75
  marginTop?: number
76
76
  marginBottom?: number
77
77
  marginLeft?: number
78
78
  marginRight?: number
79
79
  paddingTop?: number
80
80
  paddingBottom?: number
81
81
  paddingLeft?: number
82
82
  paddingRight?: number
83
83
  containerId: string
84
84
  background?: string
85
85
  containerPosition?: string
86
86
  key?: string
87
87
  floors: floorItemData[]
88
88
  includeUids: string[]
89
89
  typeCn: string
90
90
  typeCode?: string
91
91
  addLuxuryStyle?: boolean
92
92
  addLuxuryBackupStyle?: boolean
93
93
  renderExtendComponent?: Function
94
94
  insertContainerStartComponent?: Function
95
95
  floorExtendData?: any
96
96
  }
97
97
  isRealTimeRender: boolean
98
98
  forceRenderTime: number
99
99
  luxuryFixed?: boolean
100
100
  customErrorIsvFloorModule?: React.ReactElement | undefined
101
101
  containerIndex?: number
102
102
  containerData?: any
103
103
  shopTotalInfo?: any
104
104
  selectContainerFn?: Function
105
105
  selectContainerId?: string
106
106
  placeHolderPreContainerId?: string
107
107
  children?: any
108
108
  luxuryFixed?: boolean
109
109
  style?: {
110
110
  [key: string]: any
111
111
  };
112
112
  layoutLeftRightMargin?: number
113
113
  }
114
114
  isShowPlaceHolder?: boolean
115
115
  showDayToSecondState?: boolean
116
116
  onFormSubmit?: Function
117
117
  onFormReset?: Function
118
118
  isFormDialog?: boolean
119
119
  forbiddenBgScrollState?: boolean
120
120
  evenList: any[]
121
121
  oddList: any[]