@conecli/cone-render 0.9.1-isv2.0 → 0.9.1-isv2.1

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 (102) hide show
  1. package/dist/api/index.ts +1 -1
  2. package/dist/common/const.ts +1 -1
  3. package/dist/common/environmentType.ts +1 -0
  4. package/dist/common/index.h5.ts +1 -1
  5. package/dist/common/index.jd.ts +1 -1
  6. package/dist/common/index.ts +1 -1
  7. package/dist/common/index.weapp.ts +1 -1
  8. package/dist/common/jdplayerSdk.ts +1 -0
  9. package/dist/common/jssdk.ts +1 -0
  10. package/dist/common/pageType.ts +1 -0
  11. package/dist/common/sgmCustomCode.ts +1 -0
  12. package/dist/common/token/index.h5.ts +1 -1
  13. package/dist/common/token/token.jd.ts +1 -1
  14. package/dist/common/token/token.ts +1 -1
  15. package/dist/common/wxappApi.jd.ts +1 -0
  16. package/dist/components/ErrorBoundary.tsx +1 -1
  17. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  18. package/dist/components/base/CountDown/index.tsx +1 -1
  19. package/dist/components/base/CustomScrollView/index.jd.tsx +1 -0
  20. package/dist/components/base/CustomScrollView/index.module.scss +7 -0
  21. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  22. package/dist/components/base/CustomVideo/index.tsx +1 -1
  23. package/dist/components/base/Dialog/index.module.scss +5 -0
  24. package/dist/components/base/Dialog/index.tsx +1 -1
  25. package/dist/components/base/Exposure/index.h5.tsx +1 -1
  26. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  27. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  28. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  29. package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
  30. package/dist/components/base/InViewRender/index.tsx +1 -1
  31. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  32. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  33. package/dist/components/base/LazyLoadImage/const.ts +1 -1
  34. package/dist/components/base/LazyLoadImage/index.h5.module.scss +20 -20
  35. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  36. package/dist/components/base/MobileCommonHeader/index.module.scss +17 -0
  37. package/dist/components/base/MobileCommonHeader/index.tsx +1 -0
  38. package/dist/components/base/NetworkDataError/const.ts +1 -1
  39. package/dist/components/base/NetworkDataError/index.module.scss +4 -0
  40. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  41. package/dist/components/base/Price/Double/index.tsx +1 -1
  42. package/dist/components/base/Price/index.tsx +1 -1
  43. package/dist/components/decorate/DecorateFloorModule/index.module.scss +21 -2
  44. package/dist/components/decorate/DecorateFloorModule/index.tsx +1 -1
  45. package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
  46. package/dist/components/floorItem.jd.tsx +1 -1
  47. package/dist/components/floorItem.tsx +1 -1
  48. package/dist/components/floorItem.weapp.tsx +1 -1
  49. package/dist/components/isv/Floor/index.tsx +1 -1
  50. package/dist/components/remoteFloorItem.tsx +1 -1
  51. package/dist/interface/common.ts +1 -1
  52. package/dist/interface/component.ts +1 -1
  53. package/dist/interface/jumpEventReport.ts +1 -1
  54. package/dist/interface/service.ts +1 -1
  55. package/dist/interface/utils.ts +1 -1
  56. package/dist/jumpEventReport/base.ts +1 -1
  57. package/dist/jumpEventReport/const.ts +1 -1
  58. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  59. package/dist/jumpEventReport/index.h5.ts +1 -1
  60. package/dist/jumpEventReport/index.jd.ts +1 -1
  61. package/dist/jumpEventReport/index.weapp.ts +1 -1
  62. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  63. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  64. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  65. package/dist/jumpEventReport/web/report.ts +1 -1
  66. package/dist/jumpEventReport/web.base.ts +1 -1
  67. package/dist/jumpEventReport/web.jd.ts +1 -1
  68. package/dist/jumpEventReport/web.jdb.ts +1 -1
  69. package/dist/jumpEventReport/web.jdjch.ts +1 -1
  70. package/dist/jumpEventReport/web.jxwxapp.ts +1 -0
  71. package/dist/jumpEventReport/web.pc.ts +1 -0
  72. package/dist/jumpEventReport/web.tjapp.ts +1 -0
  73. package/dist/jumpEventReport/web.tjm.ts +1 -0
  74. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  75. package/dist/modules/ContainerFloorList/index.h5.module.scss +17 -1
  76. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  77. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  78. package/dist/open/api/environment.ts +1 -1
  79. package/dist/open/api/index.ts +1 -1
  80. package/dist/open/api/jump copy.ts +1 -1
  81. package/dist/open/api/request.ts +1 -1
  82. package/dist/open/api/shopMember.ts +1 -1
  83. package/dist/open/api/track.ts +1 -1
  84. package/dist/open/api/util.ts +1 -1
  85. package/dist/open/components/index.ts +1 -1
  86. package/dist/sass/app.h5.scss +44 -3
  87. package/dist/sass/base.scss +12 -0
  88. package/dist/service/fetchGateway.ts +1 -1
  89. package/dist/service/http/const.ts +1 -1
  90. package/dist/service/requestServer.ts +1 -1
  91. package/dist/utils/connectNativeJsBridge.ts +1 -1
  92. package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
  93. package/dist/utils/draExceptionAndProfile.ts +1 -1
  94. package/dist/utils/h5Utils.ts +1 -1
  95. package/dist/utils/index.h5.ts +1 -1
  96. package/dist/utils/index.ts +1 -1
  97. package/dist/utils/index.weapp.ts +1 -1
  98. package/dist/utils/jm-common.js +1 -1
  99. package/dist/utils/sgmCodeUtils.ts +1 -0
  100. package/dist/utils/utils.ts +1 -1
  101. package/package.json +1 -1
  102. package/dist/customHooks/useDocumentVisibilitychange.ts +0 -1
@@ -1 +1 @@
1
- import { Button, View } from '@tarojs/components'
2
1
  NetWorkErrorSubTip,
3
2
  subMessage,
4
3
  backgroundColorWhite,
5
4
  const useErrorTip = message != '' ? message : NetWorkErrorTip[netWorkDataType]
6
5
  const useErrorSubTip = subMessage? subMessage: NetWorkErrorSubTip[netWorkDataType]
7
6
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
8
7
  const maxHeight = latestRes.displayHeight || 546
9
8
  style={{maxHeight: isMemberPage ? '100vh' : maxHeight}}
10
9
  {useErrorSubTip? <View className={netWorkErrorStyle['d-error-sub-tip']}>{useErrorSubTip}</View>: null}
11
10
  <Button
12
11
  onClick={refershInitData}
13
12
  className={classNames(
14
13
  netWorkErrorStyle['d-opt-btn'],
15
14
  'd-button-no-border',
16
15
  )}
17
16
  plain
18
17
  size="mini"
19
18
  >
20
19
  重新加载
21
20
  </Button>
22
21
  )}
23
22
  subMessage: '',
23
+ import { Button, View } from '@tarojs/components'
24
24
  NetWorkErrorList,
25
25
  NetWorkErrorTip,
26
26
  NetWorkErrorSubTip,
27
27
  NetWorkShowType,
28
28
  NetWork_Image_Type,
29
29
  const {
30
30
  className,
31
31
  message,
32
32
  subMessage,
33
33
  btnLabel,
34
34
  backgroundColorWhite,
35
35
  netWorkDataType,
36
36
  netWorkShowType,
37
37
  netWorkImageType,
38
38
  refreshCallBackFn,
39
39
  viewMaxHeight
40
40
  } = props
41
41
  const refershInitData = useCallback(() => {
42
42
  refreshCallBackFn && refreshCallBackFn(true)
43
43
  }, [])
44
44
  const useErrorTip = message != '' ? message : NetWorkErrorTip[netWorkDataType]
45
45
  const useErrorSubTip = subMessage
46
46
  ? subMessage
47
47
  : NetWorkErrorSubTip[netWorkDataType]
48
48
  const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
49
49
  const maxHeight = latestRes.displayHeight || 546
50
50
  return NetWorkErrorList.includes(netWorkDataType as NETWORK_DATA_TYPE) ? (
51
51
  <View
52
52
  style={{ maxHeight: viewMaxHeight !== '' ? viewMaxHeight : isMemberPage ? '100vh' : maxHeight }}
53
53
  className={classNames(
54
54
  netWorkErrorStyle['d-shop-network'],
55
55
  {
56
56
  [netWorkErrorStyle['d-shop-network-white']]: backgroundColorWhite,
57
57
  },
58
58
  {
59
59
  [netWorkErrorStyle['d-shop-network-part']]:
60
60
  netWorkShowType === NetWorkShowType.PART,
61
61
  },
62
62
  {
63
63
  [netWorkErrorStyle['d-network-jd-shop-view']]: isH5AndJdShopView,
64
64
  },
65
65
  'flexible-center-box',
66
66
  className,
67
67
  )}
68
68
  >
69
69
  <View className={classNames(netWorkErrorStyle['d-error-content'],'d-error-content')}>
70
70
  <View
71
71
  className={classNames(
72
72
  netWorkErrorStyle['d-error-type'],
73
73
  netWorkErrorStyle[`d-${netWorkDataType}`],
74
74
  netWorkErrorStyle[`d-${netWorkImageType}`],
75
75
  'd-error-type'
76
76
  )}
77
77
  />
78
78
  <View className={classNames(netWorkErrorStyle['d-error-tip'],'d-error-tip')}>
79
79
  {useErrorTip}
80
80
  </View>
81
81
  {useErrorSubTip ? <View className={classNames(netWorkErrorStyle['d-error-sub-tip'],'d-error-sub-tip')}>{useErrorSubTip}</View> : null}
82
82
  <View className={'flexible-horizontal-center-box'}>
83
83
  {refreshCallBackFn && (
84
84
  <Button
85
85
  onClick={refershInitData}
86
86
  className={classNames(
87
87
  netWorkErrorStyle['d-opt-btn'],
88
88
  'd-button-no-border',
89
89
  'd-opt-btn'
90
90
  )}
91
91
  plain
92
92
  size="mini"
93
93
  >
94
94
  {btnLabel}
95
95
  </Button>
96
96
  )}
97
97
  </View>
98
98
  </View>
99
99
  </View>
100
100
  ) : null
101
101
  className: '',
102
102
  message: '',
103
103
  subMessage: '',
104
104
  btnLabel: '重新加载',
105
105
  backgroundColorWhite: false,
106
106
  netWorkDataType: NETWORK_DATA_TYPE.NORMAL,
107
107
  netWorkImageType: NetWork_Image_Type.No_Data_Default_Tip,
108
108
  netWorkShowType: NetWorkShowType.FULL,
109
109
  refreshCallBackFn: null,
110
110
  viewMaxHeight: ''
@@ -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
  } = props
31
30
  const especialHitStyleType = {
32
31
  7: 'plusStyle',
33
32
  9: 'samStyle'
34
33
  }
35
34
  const especialMissStyleType = {
36
35
  7: 'plusStyle',
37
36
  8: 'fansStyle',
38
37
  9: 'samStyle',
39
38
  10: 'studentStyle',
40
39
  12: 'yhdStyle',
41
40
  13: 'memberStyle'
42
41
  }
43
42
  const isNoPrice = priceType === 4
44
43
  const isUseFinalPriceAsBigPrice = [1, 2, 6, 14, 16, 17, 18].includes(priceType)
45
44
  const isEquivalentHit = isUseFinalPriceAsBigPrice || hitUserIdentity
46
45
  const bigPriceObj = getDeconstructPrice(isEquivalentHit? finalPrice: jdPrice)
47
46
  if(isAuctionWare || (!isNoPrice && bigPriceObj === null)){
48
47
  return fallbackRender
49
48
  }
50
49
  const {integerPrice, decimalPrice = ''} = bigPriceObj || {}
51
50
  const isOnlyShowBigPrice = priceType === 3
52
51
  const isHideSmallPrice = priceType === 14
53
52
  const smallPrice = isEquivalentHit? jdPrice: finalPrice
54
53
  const isPriceDescInFront = isEquivalentHit
55
54
  const hitColorStyle = isEquivalentHit? styles[especialHitStyleType[priceType]]: null
56
55
  const missColorStyle = isEquivalentHit? null: styles[especialMissStyleType[priceType]]
57
56
  const isBigPriceHasDecimal = decimalPrice !== '' && !/^0+$/.test(decimalPrice)
58
57
  const sizeLineHeight = {
59
58
  'XS': 28,
60
59
  'S': 34,
61
60
  'M': 40,
62
61
  'L': 46,
63
62
  'XL': 52
64
63
  }
65
64
  const lineHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25)
66
65
  const wrapHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25 * lineNumber)
67
66
  const computedHeightStyle = {
68
67
  height: wrapHeight
69
68
  }
70
69
  const itemCommonStyle = {
71
70
  height: lineHeight
72
71
  }
73
72
  const needSizeStyles = ['bigNoPrice', 'bigSymbol', 'bigInteger', 'bigDecimal', 'priceDesc', 'smallPrice']
74
73
  const sizeStyles = needSizeStyles.reduce((acc, cur) => {
75
74
  acc[cur] = styles[cur + size]
76
75
  return acc
77
76
  }, {})
78
77
  const noPriceShowText = priceText || (/^[\u4e00-\u9fa5]+$/.test(jdPrice)? jdPrice: '')
79
78
  return (
80
79
  <View className={classNames(styles.wrap, className)} style={{...computedHeightStyle, ...style}}>
81
80
  {isNoPrice?
82
81
  <Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigNoPrice, sizeStyles['bigNoPrice'], childrenClassName, bigNoPriceClassName)} style={{...itemCommonStyle}}>{noPriceShowText}</Text>
83
82
  :
84
83
  [
85
84
  <Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigSymbol, sizeStyles['bigSymbol'], hitColorStyle, childrenClassName, bigSymbolClassName)} key="bigSymbol" style={{...itemCommonStyle}}>¥</Text>,
86
85
  <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>,
87
86
  isBigPriceHasDecimal?
88
87
  <Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigDecimal, sizeStyles['bigDecimal'], hitColorStyle, isPriceDescInFront ? null : styles.rightMargin, childrenClassName, bigDecimalClassName)} key="bigDecimal" style={{...itemCommonStyle}}>.{decimalPrice}</Text>
89
88
  :
90
89
  null
91
90
  ,
92
91
  !isOnlyShowBigPrice && [
93
92
  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>,
94
93
  smallPrice && !isHideSmallPrice ? <Text className={classNames(styles.childStyle, styles.smallPrice, sizeStyles['smallPrice'], styles.smallStyle, missColorStyle, childrenClassName, smallPriceClassName)} key="smallPrice" style={{...itemCommonStyle}}>¥{smallPrice}</Text> : null,
95
94
  !isPriceDescInFront && <Text className={classNames(styles.childStyle, styles.priceDesc, sizeStyles['priceDesc'], styles.smallStyle, styles.missPriceDesc, missColorStyle, childrenClassName, priceDescClassName)} key="descBack" style={{...itemCommonStyle}}>{priceText}</Text>
96
95
  ]
97
96
  ]
98
97
  }
99
98
  </View>
100
99
  )
100
+ import React from 'react';
101
101
  const result = String(strPrice).match(/(-?\d+)\.?(\d+)?/);
102
102
  if(result && Number(result[0]) > 0){
103
103
  return {
104
104
  integerPrice: result[1],
105
105
  decimalPrice: (result[2] || '').replace(/0+$/, '')
106
106
  }
107
107
  }else{
108
108
  return null;
109
109
  }
110
110
  const {
111
111
  jdPrice,
112
112
  finalPrice,
113
113
  priceText = '',
114
114
  priceType,
115
115
  hitUserIdentity = false,
116
116
  isAuctionWare,
117
117
  fallbackRender = null,
118
118
  className = null,
119
119
  style = {},
120
120
  childrenClassName = null,
121
121
  bigNoPriceClassName = null,
122
122
  bigSymbolClassName = null,
123
123
  bigIntegerClassName = null,
124
124
  bigDecimalClassName = null,
125
125
  priceDescClassName = null,
126
126
  smallPriceClassName = null,
127
127
  lineNumber = 1,
128
128
  size = 'M',
129
129
  isDefaultRemoveSmallPrice = false
130
130
  } = props
131
131
  const especialHitStyleType = {
132
132
  7: 'plusStyle',
133
133
  9: 'samStyle'
134
134
  }
135
135
  const especialMissStyleType = {
136
136
  7: 'plusStyle',
137
137
  8: 'fansStyle',
138
138
  9: 'samStyle',
139
139
  10: 'studentStyle',
140
140
  12: 'yhdStyle',
141
141
  13: 'memberStyle'
142
142
  }
143
143
  const isNoPrice = priceType === 4
144
144
  const isUseFinalPriceAsBigPrice = [1, 2, 6, 14, 16, 17, 18].includes(priceType)
145
145
  const isEquivalentHit = isUseFinalPriceAsBigPrice || hitUserIdentity
146
146
  const bigPriceObj = getDeconstructPrice(isEquivalentHit? finalPrice: jdPrice)
147
147
  if(isAuctionWare || (!isNoPrice && bigPriceObj === null)){
148
148
  return fallbackRender
149
149
  }
150
150
  const {integerPrice, decimalPrice = ''} = bigPriceObj || {}
151
151
  const isOnlyShowBigPrice = priceType === 3
152
152
  const isHideSmallPrice = priceType === 14 || isDefaultRemoveSmallPrice
153
153
  const smallPrice = isEquivalentHit? jdPrice: finalPrice
154
154
  const isPriceDescInFront = isEquivalentHit
155
155
  const hitColorStyle = isEquivalentHit? styles[especialHitStyleType[priceType]]: null
156
156
  const missColorStyle = isEquivalentHit? null: styles[especialMissStyleType[priceType]]
157
157
  const isBigPriceHasDecimal = decimalPrice !== '' && !/^0+$/.test(decimalPrice)
158
158
  const sizeLineHeight = {
159
159
  'XS': 28,
160
160
  'S': 34,
161
161
  'M': 40,
162
162
  'L': 46,
163
163
  'XL': 52
164
164
  }
165
165
  const lineHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25)
166
166
  const wrapHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25 * lineNumber)
167
167
  const computedHeightStyle = {
168
168
  height: wrapHeight
169
169
  }
170
170
  const itemCommonStyle = {
171
171
  height: lineHeight
172
172
  }
173
173
  const needSizeStyles = ['bigNoPrice', 'bigSymbol', 'bigInteger', 'bigDecimal', 'priceDesc', 'smallPrice']
174
174
  const sizeStyles = needSizeStyles.reduce((acc, cur) => {
175
175
  acc[cur] = styles[cur + size]
176
176
  return acc
177
177
  }, {})
178
178
  const noPriceShowText = priceText || (/^[\u4e00-\u9fa5]+$/.test(jdPrice)? jdPrice: '')
179
179
  return (
180
180
  <View className={classNames(styles.wrap, className)} style={{...computedHeightStyle, ...style}}>
181
181
  {isNoPrice?
182
182
  <Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigNoPrice, sizeStyles['bigNoPrice'], childrenClassName, bigNoPriceClassName)} style={{...itemCommonStyle}}>{noPriceShowText}</Text>
183
183
  :
184
184
  [
185
185
  <Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigSymbol, sizeStyles['bigSymbol'], hitColorStyle, childrenClassName, bigSymbolClassName)} key="bigSymbol" style={{...itemCommonStyle}}>¥</Text>,
186
186
  <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>,
187
187
  isBigPriceHasDecimal?
188
188
  <Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigDecimal, sizeStyles['bigDecimal'], hitColorStyle, isPriceDescInFront ? null : styles.rightMargin, childrenClassName, bigDecimalClassName)} key="bigDecimal" style={{...itemCommonStyle}}>.{decimalPrice}</Text>
189
189
  :
190
190
  null
191
191
  ,
192
192
  !isOnlyShowBigPrice && [
193
193
  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>,
194
194
  <view style={{
195
195
  display: 'inline-flex'
196
196
  }}>
197
197
  {smallPrice && !isHideSmallPrice ? <Text className={classNames(styles.childStyle, styles.smallPrice, sizeStyles['smallPrice'], styles.smallStyle, missColorStyle, childrenClassName, smallPriceClassName)} key="smallPrice" style={{...itemCommonStyle}}>¥{smallPrice}</Text> : null}
198
198
  {!isPriceDescInFront && !isHideSmallPrice && <Text className={classNames(styles.childStyle, styles.priceDesc, sizeStyles['priceDesc'], styles.smallStyle, styles.missPriceDesc, missColorStyle, childrenClassName, priceDescClassName)} key="descBack" style={{...itemCommonStyle}}>{priceText}</Text>}
199
199
  </view>
200
200
  ]
201
201
  ]
202
202
  }
203
203
  </View>
204
204
  )
@@ -1 +1 @@
1
- import React from 'react'
2
1
  <BasePrice {...props}/>
3
2
  :
4
3
  <DoublePrice {...props} />
4
+ import React from 'react'
5
5
  if (props.priceType === undefined) {
6
6
  if (props.value === undefined) {
7
7
  if (props.jdPrice === undefined) {
8
8
  return null
9
9
  } else {
10
10
  return <BasePrice {...props} value={props.jdPrice} />
11
11
  }
12
12
  } else {
13
13
  return <BasePrice {...props} />
14
14
  }
15
15
  } else {
16
16
  return <DoublePrice {...props} />
17
17
  }
@@ -1,12 +1,19 @@
1
1
 
2
- .d-container-item {
2
+ .d-container-item, .d-container-item-trusteeship {
3
3
  position: relative;
4
4
  overflow: hidden;
5
5
  z-index: 3;
6
6
  &:first-child {
7
7
  z-index: 1;
8
8
  }
9
- &.d-container-item-active {
9
+
10
+ &.d-container-item-hide{
11
+ display: none;
12
+ }
13
+ }
14
+
15
+ .d-container-item{
16
+ &.d-container-item-active {
10
17
  :global {
11
18
  .d-decorate-floor-item {
12
19
  .d-floor-selected-border {
@@ -16,3 +23,15 @@
16
23
  }
17
24
  }
18
25
  }
26
+
27
+ .d-container-item-trusteeship{
28
+ &.d-container-item-active {
29
+ :global {
30
+ .d-decorate-floor-item {
31
+ .d-floor-selected-border {
32
+ border: 4px solid #4A82F2 !important;
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
@@ -1 +1 @@
1
- import { View } from '@tarojs/components'
2
1
  selectContainerId,
3
2
  placeHolderPreContainerId,
4
3
  containerData,
5
4
  children,
6
5
  style,
7
6
  shopTotalInfo,
8
7
  } = props;
9
8
  return children ? children : null;
10
9
  }, [containerData, shopTotalInfo]);
11
10
  data-container-empty={containerData?.floors?.[0]?.configEmpty || 'false'}
11
+ import { View } from '@tarojs/components'
12
12
  const {
13
13
  selectContainerId,
14
14
  placeHolderPreContainerId,
15
15
  containerData,
16
16
  children,
17
17
  style,
18
18
  shopTotalInfo,
19
19
  urlQueryData
20
20
  } = props;
21
21
  const { isTrusteeship = false } = urlQueryData || {}
22
22
  const selectContainerState = selectContainerId == containerData?.containerId
23
23
  const ChildrenComponent = useCallback(() => {
24
24
  return children ? children : null;
25
25
  }, [containerData, shopTotalInfo]);
26
26
  const isHideFloor = isTrusteeship && containerData?.floors?.[0]?.status === -1
27
27
  return (
28
28
  <View
29
29
  className={classNames(
30
30
  decorateModuleStyle[isTrusteeship ? 'd-container-item-trusteeship' : 'd-container-item'],
31
31
  'J_container',
32
32
  {
33
33
  [decorateModuleStyle['d-container-item-active']]:
34
34
  selectContainerState,
35
35
  },
36
36
  {
37
37
  J_floorItemActive: selectContainerState,
38
38
  },
39
39
  {
40
40
  [decorateModuleStyle['d-container-item-hide']]:
41
41
  isHideFloor,
42
42
  }
43
43
  )}
44
44
  id={`J_container_${containerData?.containerId}`}
45
45
  data-container-id={containerData?.containerId}
46
46
  data-container-type={containerData?.typeCode}
47
47
  data-container-cn={containerData?.typeCn}
48
48
  data-container-floorFlag={containerData?.extInfo?.floorFlag || ''}
49
49
  data-container-moduleInstanceType={containerData?.extInfo?.moduleInstanceType || ''}
50
50
  data-container-position={containerData?.containerPosition}
51
51
  data-container-alias={
52
52
  containerData?.containerAlias
53
53
  ? containerData?.containerAlias
54
54
  : ''
55
55
  }
56
56
  data-container-empty={containerData?.floors?.[0]?.configEmpty || 'false'}
57
57
  style={
58
58
  containerData?.typeCode !== ContainerShopHeaderType ? style : {}
59
59
  }
60
60
  >
61
61
  <input
62
62
  type="hidden"
63
63
  value={`container_${containerData?.containerId}`}
64
64
  />
65
65
  <ChildrenComponent />
66
66
  <PlaceHolder
67
67
  placeHolderPreContainerId={placeHolderPreContainerId}
68
68
  containerId={containerData?.containerId}
69
69
  />
70
70
  </View>
71
71
  )
@@ -1 +1 @@
1
- import { View, Text } from '@tarojs/components'
2
1
  '//img11.360buyimg.com/imagetools/jfs/t1/141506/22/31698/7923/637b6db9E2af80265/10e76e2c31e0e356.png'
3
2
  const newModuleFloorTypeList = [100, 101, 100000, 99999]
4
3
  const isNewFloorState = newModuleFloorTypeList.includes(moduleType)
5
4
  if ((moduleType == 99999 || moduleType == 101) && !previewUri) {
5
+ import { View, Text } from '@tarojs/components'
6
6
  '//img11.360buyimg.com/imagetools/jfs/t1/141506/22/31698/7923/637b6db9E2af80265/10e76e2c31e0e356.png'
7
7
  const {
8
8
  moduleType,
9
9
  configEmpty,
10
10
  previewUri = null,
11
11
  uid,
12
12
  moduleFlag,
13
13
  moduleName,
14
14
  } = props.floorData
15
15
  let previewUrl = previewUri
16
16
  const newModuleFloorTypeList = [100, 101, 100000, 99999]
17
17
  const isNewFloorState = newModuleFloorTypeList.includes(moduleType)
18
18
  if ((moduleType == 99999 || moduleType == 101) && !previewUri) {
19
19
  previewUrl = decorateModulePrevDefaultUrl
20
20
  }
21
21
  const loadImageErr = e => {
22
22
  e.target.src = decorateModulePrevDefaultUrl
23
23
  }
24
24
  if (moduleFlag && TRUSTEESHIP_MODULE_FLAG_LIST.indexOf(moduleFlag) !== -1)
25
25
  return null
26
26
  return isNewFloorState && configEmpty && previewUrl ? (
27
27
  <View
28
28
  className={emptyModuleStyle['d-empty-module']}
29
29
  data-floor-uid={uid}
30
30
  data-floor-type={moduleFlag}
31
31
  data-floor-modulename={moduleName}
32
32
  >
33
33
  {}
34
34
  {}
35
35
  {}
36
36
  {}
37
37
  {}
38
38
  {}
39
39
  {}
40
40
  <View className={classNames(emptyModuleStyle['d-empty-img'])}>
41
41
  <img
42
42
  width={355}
43
43
  className={classNames('J_floorEmptyDataImg')}
44
44
  src={previewUrl}
45
45
  onError={loadImageErr.bind(this)}
46
46
  />
47
47
  </View>
48
48
  </View>
49
49
  ) : (
50
50
  <View
51
51
  className={classNames(
52
52
  emptyModuleStyle['d-empty-module'],
53
53
  emptyModuleStyle['d-empty-text-warp'],
54
54
  )}
55
55
  data-floor-uid={uid}
56
56
  data-floor-type={moduleFlag}
57
57
  data-floor-modulename={moduleName}
58
58
  >
59
59
  <Text className={emptyModuleStyle['d-empty-text']}>
60
60
  该楼层还未配置数据
61
61
  </Text>
62
62
  </View>
63
63
  )
@@ -1 +1 @@
1
- import { ComponentInterFace } from '../interface/component'
2
1
  const { floorData, builtInComponents = {} } = props
3
2
  const floorModuleType = floorData?.floorExtInfo?.moduleFlag
4
3
  const FloorContentItem =
5
4
  (floorModuleType && builtInComponents[floorModuleType]) || null
6
5
  const dataDefines = getFloorDataToDataDefines(floorData)
7
6
  return FloorContentItem ? (
8
7
  <ErrorBoundary {...props}>
9
8
  <FloorContentItem {...props} dataDefines={dataDefines} />
10
9
  </ErrorBoundary>
11
10
  ) : null
12
11
  renderSourceType: BUSINESS_TYPE.ONLINE,
13
12
  switch (moduleId) {
14
13
  case 83158:
15
14
  return 'freeLayout'
16
15
  case 99654:
17
16
  return 'activeText'
18
17
  case 100382:
19
18
  return 'superGoods'
20
19
  }
21
20
  floorList.map((item) => {
22
21
  if (!item.floorExtInfo) {
23
22
  return null
24
23
  }
25
24
  const moduleFlag = item.floorExtInfo.moduleFlag
26
25
  if (!moduleFlag) {
27
26
  const newModuleFlag = moduleId2ModuleFlag(item.moduleId)
28
27
  if (newModuleFlag) {
29
28
  item.floorExtInfo.moduleFlag = newModuleFlag
30
29
  }
31
30
  }
32
31
  })
32
+ import React from 'react'
33
33
  return FloorContentItem ? (
34
34
  <FloorContentItem {...props} dataDefines={dataDefines} />
35
35
  ) : isDevMode ? (
36
36
  renderDecorateDefaultModule()
37
37
  ) : null
@@ -1 +1 @@
1
- import React from 'react'
2
1
  const { floorData, renderSourceType, builtInComponents = {} } = props
3
2
  const isDevMode = renderSourceType === BUSINESS_TYPE.DECORATE
4
3
  const floorModuleType: any = floorData?.floorExtInfo?.moduleFlag
5
4
  const FloorContentItem =
6
5
  (floorModuleType && builtInComponents[floorModuleType]) || null
7
6
  const dataDefines = getFloorDataToDataDefines(floorData)
8
7
 
9
8
  const renderDecorateDefaultModule = () => {
10
9
  return (
11
10
  <View
12
11
  style={{
13
12
  lineHeight: '120px',
14
13
  textAlign: 'center',
15
14
  }}
16
15
  >
17
16
  当前模块是{floorData.moduleName}
18
17
  </View>
19
18
  )
20
19
  }
21
20
  if (floorModuleType && RemoteLoadFloorList.includes(floorModuleType)) {
22
21
  return (
23
22
  <RemoteFloorItem {...props} dataDefines={dataDefines}></RemoteFloorItem>
24
23
  )
25
24
  } else {
26
25
  return FloorContentItem ? (
27
26
  <ErrorBoundary {...props}>
28
27
  <FloorContentItem {...props} dataDefines={dataDefines} />
29
28
  </ErrorBoundary>
30
29
  ) : isDevMode ? (
31
30
  renderDecorateDefaultModule()
32
31
  ) : null
33
32
  }
34
33
  renderSourceType: BUSINESS_TYPE.ONLINE,
35
34
  switch (moduleId) {
36
35
  case 83158:
37
36
  return 'freeLayout'
38
37
  case 99654:
39
38
  return 'activeText'
40
39
  case 100382:
41
40
  return 'superGoods'
42
41
  }
43
42
  floorList.map((item) => {
44
43
  if (!item.floorExtInfo) {
45
44
  return null
46
45
  }
47
46
  const moduleFlag = item.floorExtInfo.moduleFlag
48
47
  if (!moduleFlag) {
49
48
  const newModuleFlag = moduleId2ModuleFlag(item.moduleId)
50
49
  if (newModuleFlag) {
51
50
  item.floorExtInfo.moduleFlag = newModuleFlag
52
51
  }
53
52
  }
54
53
  })
54
+ import React from 'react'
55
55
  const { floorData, renderSourceType, builtInComponents = {} } = props
56
56
  const isDevMode = renderSourceType === BUSINESS_TYPE.DECORATE
57
57
  const floorModuleType: any = floorData?.floorExtInfo?.moduleFlag
58
58
  const FloorContentItem =
59
59
  (floorModuleType && builtInComponents[floorModuleType]) || null
60
60
  const dataDefines = getFloorDataToDataDefines(floorData)
61
61
 
62
62
  const renderDecorateDefaultModule = () => {
63
63
  return (
64
64
  <View
65
65
  style={{
66
66
  lineHeight: '120px',
67
67
  textAlign: 'center',
68
68
  }}
69
69
  >
70
70
  当前模块是{floorData.moduleName}
71
71
  </View>
72
72
  )
73
73
  }
74
74
  if (floorModuleType && (RemoteLoadFloorList.includes(floorModuleType) || floorData?.floorExtInfo?.floorLoadWay === 2)) {
75
75
  return (
76
76
  <RemoteFloorItem {...props} dataDefines={dataDefines}></RemoteFloorItem>
77
77
  )
78
78
  } else {
79
79
  return FloorContentItem ? (
80
80
  <ErrorBoundary {...props}>
81
81
  <FloorContentItem {...props} dataDefines={dataDefines} />
82
82
  </ErrorBoundary>
83
83
  ) : isDevMode ? (
84
84
  renderDecorateDefaultModule()
85
85
  ) : null
86
86
  }
87
87
  renderSourceType: BUSINESS_TYPE.ONLINE,
88
88
  switch (moduleId) {
89
89
  case 83158:
90
90
  return 'freeLayout'
91
91
  case 99654:
92
92
  return 'activeText'
93
93
  case 100382:
94
94
  return 'superGoods'
95
95
  }
96
96
  floorList.map((item) => {
97
97
  if (!item.floorExtInfo) {
98
98
  return null
99
99
  }
100
100
  const moduleFlag = item.floorExtInfo.moduleFlag
101
101
  if (!moduleFlag) {
102
102
  const newModuleFlag = moduleId2ModuleFlag(item.moduleId)
103
103
  if (newModuleFlag) {
104
104
  item.floorExtInfo.moduleFlag = newModuleFlag
105
105
  }
106
106
  }
107
107
  })
@@ -1 +1 @@
1
- import React from 'react'
2
1
  return FloorContentItem ? (
3
2
  <FloorContentItem {...props} dataDefines={dataDefines} />
4
3
  ) : isDevMode ? (
5
4
  renderDecorateDefaultModule()
6
5
  ) : null
6
+ import React from 'react'
7
7
  return FloorContentItem ? (
8
8
  <ErrorBoundary {...props}>
9
9
  <FloorContentItem {...props} dataDefines={dataDefines} />
10
10
  </ErrorBoundary>
11
11
  ) : isDevMode ? (
12
12
  renderDecorateDefaultModule()
13
13
  ) : null