@conecli/cone-render 0.8.20-shop.21 → 0.8.20-shop.211

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 (163) hide show
  1. package/README.md +7 -1
  2. package/dist/api/index.ts +1 -1
  3. package/dist/assets/icon_blue_info.svg +1 -0
  4. package/dist/common/const.ts +1 -1
  5. package/dist/common/environmentType.ts +1 -0
  6. package/dist/common/index.h5.ts +1 -1
  7. package/dist/common/index.jd.ts +1 -1
  8. package/dist/common/index.ts +1 -1
  9. package/dist/common/index.weapp.ts +1 -1
  10. package/dist/common/jdplayerSdk.ts +1 -0
  11. package/dist/common/jssdk.ts +1 -0
  12. package/dist/common/pageType.ts +1 -0
  13. package/dist/common/sgmCustomCode.ts +1 -0
  14. package/dist/common/token/index.h5.ts +1 -1
  15. package/dist/common/token/token.jd.ts +1 -1
  16. package/dist/common/token/token.ts +1 -1
  17. package/dist/common/wxappApi.jd.ts +1 -0
  18. package/dist/common/wxappApi.ts +1 -1
  19. package/dist/components/ErrorBoundary.tsx +1 -1
  20. package/dist/components/base/CommonFloorHead/index.module.scss +126 -111
  21. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  22. package/dist/components/base/CountDown/index.module.scss +49 -44
  23. package/dist/components/base/CountDown/index.tsx +1 -1
  24. package/dist/components/base/CustomScrollView/index.jd.tsx +1 -0
  25. package/dist/components/base/CustomScrollView/index.module.scss +7 -0
  26. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  27. package/dist/components/base/CustomVideo/common.ts +1 -0
  28. package/dist/components/base/CustomVideo/index.module.scss +1 -1
  29. package/dist/components/base/CustomVideo/index.tsx +1 -1
  30. package/dist/components/base/Dialog/index.module.scss +16 -0
  31. package/dist/components/base/Dialog/index.tsx +1 -1
  32. package/dist/components/base/Exposure/index.h5.tsx +1 -1
  33. package/dist/components/base/ExposureSmart/const.ts +1 -0
  34. package/dist/components/base/ExposureSmart/index.h5.module.scss +30 -6
  35. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  36. package/dist/components/base/ExposureSmart/index.module.scss +20 -9
  37. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  38. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  39. package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
  40. package/dist/components/base/InViewRender/index.tsx +1 -1
  41. package/dist/components/base/InViewRender/index.weapp.tsx +1 -1
  42. package/dist/components/base/ItemViewExposureSmart/index.module.scss +8 -0
  43. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -0
  44. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  45. package/dist/components/base/LazyLayoutLoad/index.weapp.tsx +1 -1
  46. package/dist/components/base/LazyLoadImage/const.ts +1 -1
  47. package/dist/components/base/LazyLoadImage/index.h5.module.scss +24 -20
  48. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  49. package/dist/components/base/MobileCommonHeader/index.module.scss +17 -0
  50. package/dist/components/base/MobileCommonHeader/index.tsx +1 -0
  51. package/dist/components/base/NetworkDataError/const.ts +1 -1
  52. package/dist/components/base/NetworkDataError/index.module.scss +125 -69
  53. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  54. package/dist/components/base/Price/Base/index.module.scss +12 -0
  55. package/dist/components/base/Price/Base/index.tsx +1 -1
  56. package/dist/components/base/Price/Double/index.module.scss +32 -0
  57. package/dist/components/base/Price/Double/index.tsx +1 -1
  58. package/dist/components/base/Price/index.tsx +1 -1
  59. package/dist/components/base/Skeleton/index.tsx +1 -1
  60. package/dist/components/debug/DebugLayout/index.module.scss +67 -0
  61. package/dist/components/debug/DebugLayout/index.tsx +1 -0
  62. package/dist/components/debug/DebugLayout/utils.ts +1 -0
  63. package/dist/components/decorate/DecorateFloorModule/index.module.scss +32 -2
  64. package/dist/components/decorate/DecorateFloorModule/index.tsx +1 -1
  65. package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
  66. package/dist/components/decorate/PlaceHolder/index.tsx +1 -1
  67. package/dist/components/floorItem.jd.tsx +1 -1
  68. package/dist/components/floorItem.tsx +1 -1
  69. package/dist/components/floorItem.weapp.tsx +1 -1
  70. package/dist/components/isv/Floor/index.tsx +1 -1
  71. package/dist/components/remoteFloorItem.tsx +1 -0
  72. package/dist/interface/common.ts +1 -1
  73. package/dist/interface/component.ts +1 -1
  74. package/dist/interface/jumpEventReport.ts +1 -1
  75. package/dist/interface/service.ts +1 -1
  76. package/dist/interface/utils.ts +1 -1
  77. package/dist/jumpEventReport/base.ts +1 -1
  78. package/dist/jumpEventReport/const.ts +1 -1
  79. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  80. package/dist/jumpEventReport/index.h5.ts +1 -1
  81. package/dist/jumpEventReport/index.jd.ts +1 -1
  82. package/dist/jumpEventReport/index.ts +1 -1
  83. package/dist/jumpEventReport/index.weapp.ts +1 -1
  84. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  85. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  86. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  87. package/dist/jumpEventReport/web/report.ts +1 -1
  88. package/dist/jumpEventReport/web.base.ts +1 -1
  89. package/dist/jumpEventReport/web.jd.ts +1 -1
  90. package/dist/jumpEventReport/web.jdb.ts +1 -1
  91. package/dist/jumpEventReport/web.jdjch.ts +1 -0
  92. package/dist/jumpEventReport/web.jxwxapp.ts +1 -0
  93. package/dist/jumpEventReport/web.pc.ts +1 -0
  94. package/dist/jumpEventReport/web.tjapp.ts +1 -0
  95. package/dist/jumpEventReport/web.tjm.ts +1 -0
  96. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  97. package/dist/language/en_US.json +178 -0
  98. package/dist/language/zh_CN.json +178 -0
  99. package/dist/language/zh_HK.json +178 -0
  100. package/dist/libs/taroAppReport.js +2 -2
  101. package/dist/modules/ContainerFloorList/index.h5.module.scss +66 -27
  102. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  103. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  104. package/dist/open/api/device.ts +1 -1
  105. package/dist/open/api/environment.ts +1 -1
  106. package/dist/open/api/index.ts +1 -1
  107. package/dist/open/api/jump/business.ts +1 -0
  108. package/dist/open/api/jump/index.ts +1 -0
  109. package/dist/open/api/jump/minPath.ts +1 -0
  110. package/dist/open/api/jump/side.ts +1 -0
  111. package/dist/open/api/jump/webUrl.ts +1 -0
  112. package/dist/open/api/jump copy.ts +1 -0
  113. package/dist/open/api/request.ts +1 -1
  114. package/dist/open/api/shopMember.ts +1 -1
  115. package/dist/open/api/track.ts +1 -1
  116. package/dist/open/api/util.ts +1 -1
  117. package/dist/open/components/index.ts +1 -1
  118. package/dist/sass/app.h5.scss +289 -212
  119. package/dist/sass/base.scss +195 -137
  120. package/dist/service/bMallConst.ts +1 -1
  121. package/dist/service/fetchGateway.ts +1 -1
  122. package/dist/service/fetchGateway.weapp.ts +1 -0
  123. package/dist/service/http/colorSign.ts +1 -1
  124. package/dist/service/http/const.ts +1 -1
  125. package/dist/service/http/h5Http.ts +1 -0
  126. package/dist/service/http/index.h5.ts +1 -0
  127. package/dist/service/requestServer.h5.ts +1 -0
  128. package/dist/service/requestServer.ts +1 -1
  129. package/dist/service/requestServer.weapp.ts +1 -0
  130. package/dist/utils/connectNativeJsBridge.ts +1 -1
  131. package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
  132. package/dist/utils/draExceptionAndProfile.ts +1 -1
  133. package/dist/utils/h5Utils.ts +1 -1
  134. package/dist/utils/index.h5.ts +1 -1
  135. package/dist/utils/index.ts +1 -1
  136. package/dist/utils/index.weapp.ts +1 -1
  137. package/dist/utils/intersectionObserver.ts +1 -1
  138. package/dist/utils/jm-common.js +1 -1
  139. package/dist/utils/jumpExtMapUtil.h5.ts +1 -0
  140. package/dist/utils/jumpExtMapUtil.ts +1 -0
  141. package/dist/utils/sColor.js +1 -0
  142. package/dist/utils/sgmCodeUtils.ts +1 -0
  143. package/dist/utils/taroRenderUtil.ts +1 -0
  144. package/dist/utils/utils.ts +1 -1
  145. package/dist/wxapp/api/helper.js +1 -0
  146. package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
  147. package/dist/wxapp/common/user_info.js +1 -1
  148. package/dist/wxapp/components/launch-app/index.js +1 -0
  149. package/dist/wxapp/components/launch-app/index.json +5 -0
  150. package/dist/wxapp/components/launch-app/index.wxml +0 -0
  151. package/dist/wxapp/components/launch-app/index.wxss +0 -0
  152. package/dist/wxapp/components/subscribe-guider/helper.js +1 -0
  153. package/dist/wxapp/components/subscribe-guider/index.js +1 -0
  154. package/dist/wxapp/components/subscribe-guider/index.json +5 -0
  155. package/dist/wxapp/components/subscribe-guider/index.wxml +0 -0
  156. package/dist/wxapp/components/subscribe-guider/index.wxss +0 -0
  157. package/package.json +148 -115
  158. package/dist/components/base/Skeleton/old.tsx +0 -1
  159. package/dist/customHooks/useDocumentVisibilitychange.ts +0 -1
  160. package/dist/open/api/jump.ts +0 -1
  161. package/dist/utils/memberFormatUtils.js +0 -1
  162. /package/dist/service/{bMallConst.wxapp.ts → bMallConst.weapp.ts} +0 -0
  163. /package/dist/service/http/{colorSign.wxapp.ts → colorSign.weapp.ts} +0 -0
@@ -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
  console.warn('🚗 ~~ file: index.tsx:22 ~~ reportException() ~~ {type, detail, text}:', {
102
102
  type,
103
103
  data,
104
104
  text,
105
105
  });
106
106
  sgmCustomReport({
107
107
  code: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_${type}`),
108
108
  msg: {
109
109
  type,
110
110
  data,
111
111
  text: '[双价格组件]' + text,
112
112
  },
113
113
  });
114
114
  return rest.some((item) => item === undefined || item === '');
115
115
  const numPrice = Number(strPrice);
116
116
  if (isNaN(numPrice)) {
117
117
  reportException({
118
118
  type: 'isNotNumericType',
119
119
  data: props,
120
120
  text: `传入价格字段值“${strPrice}”转换数字报错`,
121
121
  });
122
122
  return false;
123
123
  }
124
124
  else if (numPrice <= 0) {
125
125
  reportException({
126
126
  type: 'isNotPositiveNumber',
127
127
  data: props,
128
128
  text: `传入价格字段值“${strPrice}”不是一个正数`,
129
129
  });
130
130
  return false;
131
131
  }
132
132
  const result = numPrice.toString().match(/(\d+)(\.(\d+))?/);
133
133
  if (result && result[3]?.length > 2) {
134
134
  reportException({
135
135
  type: 'decimalPlaceTooLong',
136
136
  data: props,
137
137
  text: `传入价格字段值“${strPrice}”小数位不能超过2位`,
138
138
  });
139
139
  return false;
140
140
  }
141
141
  if (/^\d+(\.\d+)?[eE][+-]?\d+$/.test(strPrice)) {
142
142
  reportException({
143
143
  type: 'findScientificNotation',
144
144
  data: props,
145
145
  text: `传入价格字段值“${strPrice}”是一个科学计数法格式`,
146
146
  });
147
147
  }
148
148
  return true;
149
149
  const { jdPrice, finalPrice } = props;
150
150
  if (jdPrice && finalPrice && Number(jdPrice) <= Number(finalPrice)) {
151
151
  reportException({
152
152
  type: 'pricesCompareException',
153
153
  data: props,
154
154
  text: `身份/到手价必须小于松果价`,
155
155
  });
156
156
  return false;
157
157
  } else {
158
158
  return true;
159
159
  }
160
160
  const numPrice = Number(strPrice);
161
161
  const result = numPrice.toString().match(/(\d+)(\.(\d+))?/);
162
162
  if (result) {
163
163
  return {
164
164
  integerPrice: result[1],
165
165
  decimalPrice: (result[3] || '').replace(/0+$/, ''),
166
166
  };
167
167
  } else {
168
168
  reportException({
169
169
  type: 'deconstructException',
170
170
  data: props,
171
171
  text: `解构传入价格字段值“${strPrice}”解构发生异常`,
172
172
  });
173
173
  return null;
174
174
  }
175
175
  const {
176
176
  jdPrice,
177
177
  finalPrice,
178
178
  priceText = '',
179
179
  priceTextColor = '',
180
180
  priceUnit = '',
181
181
  priceType,
182
182
  hitUserIdentity = false,
183
183
  fallbackRender = null,
184
184
  className = null,
185
185
  style = {},
186
186
  childrenClassName = null,
187
187
  bigNoPriceClassName = null,
188
188
  bigSymbolClassName = null,
189
189
  bigIntegerClassName = null,
190
190
  bigDecimalClassName = null,
191
191
  priceDescClassName = null,
192
192
  smallPriceClassName = null,
193
193
  lineNumber = 1,
194
194
  size = 'M',
195
195
  isDefaultRemoveSmallPrice = false,
196
196
  useFontV2 = false,
197
197
  useFontV2Bold = false,
198
198
  } = props;
199
199
  let useBackstop = false;
200
200
  const isShowPriceUnit = priceUnit && priceUnit !== '';
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 priceTextStyle = priceTextColor ? { color: priceTextColor } : {};
273
273
  const needSizeStyles = [
274
274
  'bigNoPrice',
275
275
  'bigSymbol',
276
276
  'bigInteger',
277
277
  'bigDecimal',
278
278
  'priceDesc',
279
279
  'smallPrice',
280
280
  'priceUnit',
281
281
  ];
282
282
  const sizeStyles = needSizeStyles.reduce((acc, cur) => {
283
283
  acc[cur] = styles[cur + size];
284
284
  return acc;
285
285
  }, {});
286
286
  const finalFallbackText = global?.languageJsonData?.noPriceTip || '暂无报价';
287
287
  const noPriceShowText =
288
288
  priceText || (/^[\u4e00-\u9fa5]+$/.test(jdPrice) ? jdPrice : finalFallbackText);
289
289
  if (useBackstop && fallbackRender) {
290
290
  return fallbackRender;
291
291
  }
292
292
  return (
293
293
  <View
294
294
  className={classNames(styles.wrap, className)}
295
295
  style={{ ...computedHeightStyle, ...style }}
296
296
  >
297
297
  {isTextPrice || useBackstop ? (
298
298
  <Text
299
299
  className={classNames(
300
300
  styles.childStyle,
301
301
  styles.bigStyle,
302
302
  styles.bigNoPrice,
303
303
  sizeStyles['bigNoPrice'],
304
304
  childrenClassName,
305
305
  bigNoPriceClassName,
306
306
  )}
307
307
  style={{ ...itemCommonStyle }}
308
308
  >
309
309
  {useBackstop ? finalFallbackText : noPriceShowText}
310
310
  </Text>
311
311
  ) : (
312
312
  [
313
313
  <Text
314
314
  className={classNames(
315
315
  styles.childStyle,
316
316
  styles.bigStyle,
317
317
  styles.bigSymbol,
318
318
  sizeStyles['bigSymbol'],
319
319
  hitColorStyle,
320
320
  childrenClassName,
321
321
  bigSymbolClassName,
322
322
  {
323
323
  [styles.fontV2]: useFontV2,
324
324
  [styles.fontV2Bold]: useFontV2Bold,
325
325
  },
326
326
  )}
327
327
  key="bigSymbol"
328
328
  style={{ ...itemCommonStyle }}
329
329
  >
330
330
  ¥
331
331
  </Text>,
332
332
  <Text
333
333
  className={classNames(
334
334
  styles.childStyle,
335
335
  styles.bigStyle,
336
336
  styles.bigInteger,
337
337
  sizeStyles['bigInteger'],
338
338
  hitColorStyle,
339
339
  !isOnlyShowBigPrice &&
340
340
  !isBigPriceHasDecimal &&
341
341
  !isPriceDescInFront &&
342
342
  !isShowPriceUnit
343
343
  ? styles.rightMargin
344
344
  : null,
345
345
  childrenClassName,
346
346
  bigIntegerClassName,
347
347
  {
348
348
  [styles.fontV2]: useFontV2,
349
349
  [styles.fontV2Bold]: useFontV2Bold,
350
350
  },
351
351
  )}
352
352
  key="bigInteger"
353
353
  style={{ ...itemCommonStyle }}
354
354
  >
355
355
  {integerPrice}
356
356
  </Text>,
357
357
  isBigPriceHasDecimal ? (
358
358
  <Text
359
359
  className={classNames(
360
360
  styles.childStyle,
361
361
  styles.bigStyle,
362
362
  styles.bigDecimal,
363
363
  sizeStyles['bigDecimal'],
364
364
  hitColorStyle,
365
365
  isPriceDescInFront || isShowPriceUnit ? null : styles.rightMargin,
366
366
  childrenClassName,
367
367
  bigDecimalClassName,
368
368
  {
369
369
  [styles.fontV2]: useFontV2,
370
370
  [styles.fontV2Bold]: useFontV2Bold,
371
371
  },
372
372
  )}
373
373
  key="bigDecimal"
374
374
  style={{ ...itemCommonStyle }}
375
375
  >
376
376
  .{decimalPrice}
377
377
  </Text>
378
378
  ) : null,
379
379
  isShowPriceUnit ? (
380
380
  <Text
381
381
  className={classNames(
382
382
  styles.childStyle,
383
383
  styles.priceUnit,
384
384
  styles.rightMargin,
385
385
  sizeStyles['priceUnit'],
386
386
  styles.bigStyle,
387
387
  hitColorStyle,
388
388
  childrenClassName,
389
389
  priceDescClassName,
390
390
  )}
391
391
  key="descFrontUnit"
392
392
  style={{ ...itemCommonStyle }}
393
393
  >
394
394
  {priceUnit}
395
395
  </Text>
396
396
  ) : null,
397
397
  !isOnlyShowBigPrice && [
398
398
  isPriceDescInFront && (
399
399
  <Text
400
400
  className={classNames(
401
401
  styles.childStyle,
402
402
  styles.priceDesc,
403
403
  {
404
404
  [styles['priceEnDesc']]: isLanguageForEn,
405
405
  },
406
406
  {
407
407
  [styles['priceHiddenDesc']]: priceText === '',
408
408
  },
409
409
  sizeStyles['priceDesc'],
410
410
  styles.bigStyle,
411
411
  hitColorStyle,
412
412
  isPriceDescInFront && !isShowPriceUnit ? styles.rightMargin : null,
413
413
  childrenClassName,
414
414
  priceDescClassName,
415
415
  )}
416
416
  key="descFront"
417
417
  style={{ ...itemCommonStyle, ...priceTextStyle }}
418
418
  >
419
419
  {priceText === '' ? '_' : priceText}
420
420
  </Text>
421
421
  ),
422
422
  <View
423
423
  style={{
424
424
  display: 'inline-flex',
425
425
  }}
426
426
  >
427
427
  {smallPrice && !isHideSmallPrice ? (
428
428
  <Text
429
429
  className={classNames(
430
430
  styles.childStyle,
431
431
  styles.smallPrice,
432
432
  sizeStyles['smallPrice'],
433
433
  styles.smallStyle,
434
434
  missColorStyle,
435
435
  childrenClassName,
436
436
  smallPriceClassName,
437
437
  {
438
438
  [styles.fontV2]: useFontV2,
439
439
  [styles.fontV2Bold]: useFontV2Bold,
440
440
  },
441
441
  )}
442
442
  key="smallPrice"
443
443
  style={{ ...itemCommonStyle }}
444
444
  >
445
445
  ¥{Number(smallPrice)}
446
446
  </Text>
447
447
  ) : null}
448
448
  {isShowPriceUnit ? (
449
449
  <Text
450
450
  className={classNames(
451
451
  styles.childStyle,
452
452
  styles.priceUnit,
453
453
  sizeStyles['priceUnit'],
454
454
  styles.smallStyle,
455
455
  styles.missPriceDesc,
456
456
  missColorStyle,
457
457
  childrenClassName,
458
458
  priceDescClassName,
459
459
  )}
460
460
  key="descFrontUnit"
461
461
  style={{ ...itemCommonStyle }}
462
462
  >
463
463
  {priceUnit}
464
464
  </Text>
465
465
  ) : null}
466
466
  {!isPriceDescInFront && !isHideSmallPrice && (
467
467
  <Text
468
468
  className={classNames(
469
469
  styles.childStyle,
470
470
  styles.priceDesc,
471
471
  {
472
472
  [styles['priceEnDesc']]: isLanguageForEn,
473
473
  },
474
474
  {
475
475
  [styles['priceHiddenDesc']]: priceText === '',
476
476
  },
477
477
  sizeStyles['priceDesc'],
478
478
  styles.smallStyle,
479
479
  styles.missPriceDesc,
480
480
  missColorStyle,
481
481
  childrenClassName,
482
482
  priceDescClassName,
483
483
  )}
484
484
  key="descBack"
485
485
  style={{ ...itemCommonStyle }}
486
486
  >
487
487
  {priceText === '' ? '_' : priceText}
488
488
  </Text>
489
489
  )}
490
490
  </View>,
491
491
  ],
492
492
  ]
493
493
  )}
494
494
  </View>
495
495
  );
@@ -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 +1 @@
1
- import React from 'react'
2
1
  <View className={blockStyle['skeleton-header']}>
3
2
  <Image
4
3
  className={blockStyle['skeleton-header-img']}
5
4
  src={ShopHeaderSvgUrl}
6
5
  mode='widthFix'
7
6
  />
8
7
  </View>
9
8
  <View className={blockStyle['skeleton-new-product']}>
10
9
  <ContentLoader viewBox='0 0 375 280' {...props}>
11
10
  <rect x='10' y='38' rx='5' ry='5' width='355' height='55' />
12
11
  <rect x='12' y='112' rx='3' ry='3' width='111' height='95' />
13
12
  <rect x='12' y='11' rx='3' ry='3' width='100' height='10' />
14
13
  <rect x='254' y='112' rx='3' ry='3' width='111' height='95' />
15
14
  <rect x='14' y='218' rx='0' ry='0' width='111' height='27' />
16
15
  <rect x='261' y='217' rx='0' ry='0' width='111' height='27' />
17
16
  <rect x='134' y='112' rx='3' ry='3' width='111' height='95' />
18
17
  <rect x='133' y='218' rx='0' ry='0' width='111' height='27' />
19
18
  <rect x='20' y='255' rx='0' ry='0' width='100' height='9' />
20
19
  <rect x='140' y='255' rx='0' ry='0' width='100' height='9' />
21
20
  <rect x='263' y='255' rx='0' ry='0' width='100' height='9' />
22
21
  </ContentLoader>
23
22
  </View>
23
+ import React from 'react'
24
24
  <View className={blockStyle['skeleton-header']}>
25
25
  <Image
26
26
  className={blockStyle['skeleton-header-img']}
27
27
  src={ShopHeaderSvgUrl}
28
28
  mode="widthFix"
29
29
  />
30
30
  </View>
@@ -0,0 +1,67 @@
1
+
2
+ .debug-layout-warp {
3
+ position: absolute;
4
+ border-radius: 12PX;
5
+ top: 0;
6
+ left: 0;
7
+ right: 0;
8
+ bottom: 0;
9
+ z-index: 50;
10
+
11
+ .debug-layout {
12
+ position: absolute;
13
+ border-radius: 12PX;
14
+ top: 0;
15
+ left: 0;
16
+ right: 0;
17
+ bottom: 0;
18
+
19
+ border: 1PX solid #f50707;
20
+ background-color: rgba(219, 38, 38, 0.2);
21
+
22
+ &[data-module-type='JOINT'] {
23
+ border: 1PX solid #f507c9;
24
+ background-color: rgba(219, 38, 150, 0.2);
25
+ }
26
+
27
+ &.green {
28
+ border: 1PX solid #04a607;
29
+ background-color: rgba(38, 219, 71, 0.2);
30
+ }
31
+
32
+ .cd-version-list {
33
+ pointer-events: none;
34
+ position: absolute;
35
+ font-size: 0;
36
+ top: 0;
37
+ left: 0;
38
+ right: 0;
39
+ background-color: transparent;
40
+ text-align: center;
41
+ overflow: hidden;
42
+ }
43
+
44
+ .cd-version-item {
45
+ display: inline-block;
46
+ background-color: #00c853;
47
+ font-size: 30px;
48
+ color: white;
49
+ padding: 1PX 3PX;
50
+ border-radius: 4PX;
51
+ margin: 0 5PX;
52
+ &[data-version='3.5.4'] {
53
+ background-color: #999;
54
+ }
55
+ }
56
+ }
57
+
58
+ .d-info {
59
+ position: relative;
60
+ cursor: pointer;
61
+ z-index: 3;
62
+ margin: 3PX 3PX;
63
+ width: 22PX;
64
+ height: 22PX;
65
+ background: url('../../../assets/icon_blue_info.svg') center center / 22PX 22PX no-repeat;
66
+ }
67
+ }
@@ -0,0 +1 @@
1
+ import React from 'react'
2
  const { debug } = global.info.queryInfo
1
3
  const { floorData, index } = props
2
4
  if (debug != '1' || !floorData) {
3
5
  return null
4
6
  }
5
7
  const renderRemoteLayout = () => {
6
8
  const isRemote = isRemoteFloor(floorData)
7
9
  if (isRemote) {
8
10
  const moduleType = getModuleType(floorData)
9
11
  const packResult = floorData?.floorExtInfo?.modularPackResult
10
12
  const packResultObj = JSONParse(packResult)
11
13
  const taroVersionList = getTaroVersionList(packResultObj)
12
14
  const layoutClass = classNames(style['debug-layout'], {
13
15
  [style['green']]: taroVersionList.length >= 2,
14
16
  })
15
17
  return (
16
18
  <View data-module-type={moduleType} className={layoutClass}>
17
19
  <View className={style['cd-version-list']}>
18
20
  {taroVersionList.map(item => {
19
21
  return (
20
22
  <Text className={style['cd-version-item']} data-version={item}>
21
23
  v{item}
22
24
  </Text>
23
25
  )
24
26
  })}
25
27
  </View>
26
28
  </View>
27
29
  )
28
30
  } else {
29
31
  return null
30
32
  }
31
33
  }
32
34
  return (
33
35
  <View className={style['debug-layout-warp']}>
34
36
  <View
35
37
  className={style['d-info']}
36
38
  onClick={() => {
37
39
  Messager && Messager.trigger('openDebugLayout', { floorData, index })
38
40
  }}
39
41
  />
40
42
  {renderRemoteLayout()}
41
43
  </View>
42
44
  )