@conecli/cone-render 0.10.1-shop3.37 → 0.10.1-shop3.38

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.
@@ -117,6 +117,24 @@
117
117
  .priceDescXS {
118
118
  font-size: 20px;
119
119
  }
120
+ .priceUnit {
121
+ font-family: PingFang SC;
122
+ }
123
+ .priceUnitXL {
124
+ font-size: 26px;
125
+ }
126
+ .priceUnitL {
127
+ font-size: 24px;
128
+ }
129
+ .priceUnitM {
130
+ font-size: 22px;
131
+ }
132
+ .priceUnitS {
133
+ font-size: 20px;
134
+ }
135
+ .priceUnitXS {
136
+ font-size: 18px;
137
+ }
120
138
 
121
139
  .missPriceDesc {
122
140
  }
@@ -1 +1 @@
1
- import React from 'react';
2
1
  console.warn('🚗 ~~ file: index.tsx:22 ~~ reportException() ~~ {type, detail, text}:', {
3
2
  type,
4
3
  data,
5
4
  text,
6
5
  });
7
6
  sgmCustomReport({
8
7
  code: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_${type}`),
9
8
  msg: {
10
9
  type,
11
10
  data,
12
11
  text: '[双价格组件]' + text,
13
12
  },
14
13
  });
15
14
  return rest.some((item) => item === undefined || item === '');
16
15
  const numPrice = Number(strPrice);
17
16
  if (isNaN(numPrice)) {
18
17
  reportException({
19
18
  type: 'isNotNumericType',
20
19
  data: props,
21
20
  text: `传入价格字段值“${strPrice}”转换数字报错`,
22
21
  });
23
22
  return false;
24
23
  }
25
24
  else if (numPrice <= 0) {
26
25
  reportException({
27
26
  type: 'isNotPositiveNumber',
28
27
  data: props,
29
28
  text: `传入价格字段值“${strPrice}”不是一个正数`,
30
29
  });
31
30
  return false;
32
31
  }
33
32
  const result = numPrice.toString().match(/(\d+)(\.(\d+))?/);
34
33
  if (result && result[3]?.length > 2) {
35
34
  reportException({
36
35
  type: 'decimalPlaceTooLong',
37
36
  data: props,
38
37
  text: `传入价格字段值“${strPrice}”小数位不能超过2位`,
39
38
  });
40
39
  return false;
41
40
  }
42
41
  if (/^\d+(\.\d+)?[eE][+-]?\d+$/.test(strPrice)) {
43
42
  reportException({
44
43
  type: 'findScientificNotation',
45
44
  data: props,
46
45
  text: `传入价格字段值“${strPrice}”是一个科学计数法格式`,
47
46
  });
48
47
  }
49
48
  return true;
50
49
  const { jdPrice, finalPrice } = props;
51
50
  if (jdPrice && finalPrice && Number(jdPrice) <= Number(finalPrice)) {
52
51
  reportException({
53
52
  type: 'pricesCompareException',
54
53
  data: props,
55
54
  text: `身份/到手价必须小于松果价`,
56
55
  });
57
56
  return false;
58
57
  } else {
59
58
  return true;
60
59
  }
61
60
  const numPrice = Number(strPrice);
62
61
  const result = numPrice.toString().match(/(\d+)(\.(\d+))?/);
63
62
  if (result) {
64
63
  return {
65
64
  integerPrice: result[1],
66
65
  decimalPrice: (result[3] || '').replace(/0+$/, ''),
67
66
  };
68
67
  } else {
69
68
  reportException({
70
69
  type: 'deconstructException',
71
70
  data: props,
72
71
  text: `解构传入价格字段值“${strPrice}”解构发生异常`,
73
72
  });
74
73
  return null;
75
74
  }
76
75
  const {
77
76
  jdPrice,
78
77
  finalPrice,
79
78
  priceText = '',
80
79
  priceTextColor = '',
81
80
  priceType,
82
81
  hitUserIdentity = false,
83
82
  fallbackRender = null,
84
83
  className = null,
85
84
  style = {},
86
85
  childrenClassName = null,
87
86
  bigNoPriceClassName = null,
88
87
  bigSymbolClassName = null,
89
88
  bigIntegerClassName = null,
90
89
  bigDecimalClassName = null,
91
90
  priceDescClassName = null,
92
91
  smallPriceClassName = null,
93
92
  lineNumber = 1,
94
93
  size = 'M',
95
94
  isDefaultRemoveSmallPrice = false,
96
95
  useFontV2 = false,
97
96
  useFontV2Bold = false,
98
97
  } = props;
99
98
  let useBackstop = false;
100
99
  if (isNull(props.jdPrice, props.priceType)) {
101
100
  useBackstop = true;
102
101
  reportException({
103
102
  type: 'paramMiss',
104
103
  data: props,
105
104
  text: '缺少必要入参:jdPrice、priceType',
106
105
  });
107
106
  } else if (
108
107
  !allowedNoHitUserIdentityTypes.includes(props.priceType) &&
109
108
  props.hitUserIdentity === undefined
110
109
  ) {
111
110
  useBackstop = true;
112
111
  reportException({
113
112
  type: 'paramMiss',
114
113
  data: props,
115
114
  text: `价格类型${props.priceType}缺少必要入参:hitUserIdentity`,
116
115
  });
117
116
  }
118
117
  const especialHitStyleType = {
119
118
  7: 'plusStyle',
120
119
  9: 'samStyle',
121
120
  };
122
121
  const especialMissStyleType = {
123
122
  7: 'plusStyle',
124
123
  8: 'fansStyle',
125
124
  9: 'samStyle',
126
125
  10: 'studentStyle',
127
126
  12: 'yhdStyle',
128
127
  13: 'memberStyle',
129
128
  };
130
129
  const isUseFinalPriceAsBigPrice = allowedNoHitUserIdentityTypes.includes(priceType);
131
130
  const isEquivalentHit = isUseFinalPriceAsBigPrice || hitUserIdentity;
132
131
  const isOnlyShowBigPrice = priceType === 3 || isNull(finalPrice);
133
132
  const smallPrice = isEquivalentHit ? jdPrice : finalPrice;
134
133
  const isHideSmallPrice =
135
134
  priceType === 14 || isDefaultRemoveSmallPrice || isNaN(Number(smallPrice));
136
135
  const isTextPrice = priceType === 4;
137
136
  if (!isTextPrice && !useBackstop) {
138
137
  if (finalPrice && !numericPriceValidate(finalPrice, props)) {
139
138
  useBackstop = true;
140
139
  } else if (!numericPriceValidate(jdPrice, props)) {
141
140
  useBackstop = true;
142
141
  }
143
142
  if (!useBackstop && !isOnlyShowBigPrice && !isHideSmallPrice && !pricesCompareValidate(props)) {
144
143
  useBackstop = true;
145
144
  }
146
145
  }
147
146
  const bigPriceObj =
148
147
  isTextPrice || useBackstop
149
148
  ? {}
150
149
  : getDeconstructPrice(isEquivalentHit && !isNull(finalPrice) ? finalPrice : jdPrice, props);
151
150
  const { integerPrice = '', decimalPrice = '' } = bigPriceObj || {};
152
151
  const isPriceDescInFront = isEquivalentHit;
153
152
  const hitColorStyle = isEquivalentHit ? styles[especialHitStyleType[priceType]] : null;
154
153
  const missColorStyle = isEquivalentHit ? null : styles[especialMissStyleType[priceType]];
155
154
  const isBigPriceHasDecimal = decimalPrice !== '' && !/^0+$/.test(decimalPrice);
156
155
  const sizeLineHeight = {
157
156
  XS: 28,
158
157
  S: 34,
159
158
  M: 40,
160
159
  L: 46,
161
160
  XL: 52,
162
161
  };
163
162
  const lineHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25);
164
163
  const wrapHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25 * lineNumber);
165
164
  const computedHeightStyle = {
166
165
  height: wrapHeight,
167
166
  };
168
167
  const itemCommonStyle = {
169
168
  height: lineHeight,
170
169
  };
171
170
  const priceTextStyle = priceTextColor ? { color: priceTextColor } : {};
172
171
  const needSizeStyles = [
173
172
  'bigNoPrice',
174
173
  'bigSymbol',
175
174
  'bigInteger',
176
175
  'bigDecimal',
177
176
  'priceDesc',
178
177
  'smallPrice',
179
178
  ];
180
179
  const sizeStyles = needSizeStyles.reduce((acc, cur) => {
181
180
  acc[cur] = styles[cur + size];
182
181
  return acc;
183
182
  }, {});
184
183
  const finalFallbackText = global?.languageJsonData?.noPriceTip || '暂无报价';
185
184
  const noPriceShowText =
186
185
  priceText || (/^[\u4e00-\u9fa5]+$/.test(jdPrice) ? jdPrice : finalFallbackText);
187
186
  if (useBackstop && fallbackRender) {
188
187
  return fallbackRender;
189
188
  }
190
189
  return (
191
190
  <View
192
191
  className={classNames(styles.wrap, className)}
193
192
  style={{ ...computedHeightStyle, ...style }}
194
193
  >
195
194
  {isTextPrice || useBackstop ? (
196
195
  <Text
197
196
  className={classNames(
198
197
  styles.childStyle,
199
198
  styles.bigStyle,
200
199
  styles.bigNoPrice,
201
200
  sizeStyles['bigNoPrice'],
202
201
  childrenClassName,
203
202
  bigNoPriceClassName,
204
203
  )}
205
204
  style={{ ...itemCommonStyle }}
206
205
  >
207
206
  {useBackstop ? finalFallbackText : noPriceShowText}
208
207
  </Text>
209
208
  ) : (
210
209
  [
211
210
  <Text
212
211
  className={classNames(
213
212
  styles.childStyle,
214
213
  styles.bigStyle,
215
214
  styles.bigSymbol,
216
215
  sizeStyles['bigSymbol'],
217
216
  hitColorStyle,
218
217
  childrenClassName,
219
218
  bigSymbolClassName,
220
219
  {
221
220
  [styles.fontV2]: useFontV2,
222
221
  [styles.fontV2Bold]: useFontV2Bold,
223
222
  },
224
223
  )}
225
224
  key="bigSymbol"
226
225
  style={{ ...itemCommonStyle }}
227
226
  >
228
227
  ¥
229
228
  </Text>,
230
229
  <Text
231
230
  className={classNames(
232
231
  styles.childStyle,
233
232
  styles.bigStyle,
234
233
  styles.bigInteger,
235
234
  sizeStyles['bigInteger'],
236
235
  hitColorStyle,
237
236
  !isOnlyShowBigPrice && !isBigPriceHasDecimal && !isPriceDescInFront
238
237
  ? styles.rightMargin
239
238
  : null,
240
239
  childrenClassName,
241
240
  bigIntegerClassName,
242
241
  {
243
242
  [styles.fontV2]: useFontV2,
244
243
  [styles.fontV2Bold]: useFontV2Bold,
245
244
  },
246
245
  )}
247
246
  key="bigInteger"
248
247
  style={{ ...itemCommonStyle }}
249
248
  >
250
249
  {integerPrice}
251
250
  </Text>,
252
251
  isBigPriceHasDecimal ? (
253
252
  <Text
254
253
  className={classNames(
255
254
  styles.childStyle,
256
255
  styles.bigStyle,
257
256
  styles.bigDecimal,
258
257
  sizeStyles['bigDecimal'],
259
258
  hitColorStyle,
260
259
  isPriceDescInFront ? null : styles.rightMargin,
261
260
  childrenClassName,
262
261
  bigDecimalClassName,
263
262
  {
264
263
  [styles.fontV2]: useFontV2,
265
264
  [styles.fontV2Bold]: useFontV2Bold,
266
265
  },
267
266
  )}
268
267
  key="bigDecimal"
269
268
  style={{ ...itemCommonStyle }}
270
269
  >
271
270
  .{decimalPrice}
272
271
  </Text>
273
272
  ) : null,
274
273
  !isOnlyShowBigPrice && [
275
274
  isPriceDescInFront && (
276
275
  <Text
277
276
  className={classNames(
278
277
  styles.childStyle,
279
278
  styles.priceDesc,
280
279
  {
281
280
  [styles['priceEnDesc']]: isLanguageForEn,
282
281
  },
283
282
  {
284
283
  [styles['priceHiddenDesc']]: priceText === '',
285
284
  },
286
285
  sizeStyles['priceDesc'],
287
286
  styles.bigStyle,
288
287
  hitColorStyle,
289
288
  isPriceDescInFront ? styles.rightMargin : null,
290
289
  childrenClassName,
291
290
  priceDescClassName,
292
291
  )}
293
292
  key="descFront"
294
293
  style={{ ...itemCommonStyle, ...priceTextStyle }}
295
294
  >
296
295
  {priceText === '' ? '_' : priceText}
297
296
  </Text>
298
297
  ),
299
298
  <View
300
299
  style={{
301
300
  display: 'inline-flex',
302
301
  }}
303
302
  >
304
303
  {smallPrice && !isHideSmallPrice ? (
305
304
  <Text
306
305
  className={classNames(
307
306
  styles.childStyle,
308
307
  styles.smallPrice,
309
308
  sizeStyles['smallPrice'],
310
309
  styles.smallStyle,
311
310
  missColorStyle,
312
311
  childrenClassName,
313
312
  smallPriceClassName,
314
313
  {
315
314
  [styles.fontV2]: useFontV2,
316
315
  [styles.fontV2Bold]: useFontV2Bold,
317
316
  },
318
317
  )}
319
318
  key="smallPrice"
320
319
  style={{ ...itemCommonStyle }}
321
320
  >
322
321
  ¥{Number(smallPrice)}
323
322
  </Text>
324
323
  ) : null}
325
324
  {!isPriceDescInFront && !isHideSmallPrice && (
326
325
  <Text
327
326
  className={classNames(
328
327
  styles.childStyle,
329
328
  styles.priceDesc,
330
329
  {
331
330
  [styles['priceEnDesc']]: isLanguageForEn,
332
331
  },
333
332
  {
334
333
  [styles['priceHiddenDesc']]: priceText === '',
335
334
  },
336
335
  sizeStyles['priceDesc'],
337
336
  styles.smallStyle,
338
337
  styles.missPriceDesc,
339
338
  missColorStyle,
340
339
  childrenClassName,
341
340
  priceDescClassName,
342
341
  )}
343
342
  key="descBack"
344
343
  style={{ ...itemCommonStyle }}
345
344
  >
346
345
  {priceText === '' ? '_' : priceText}
347
346
  </Text>
348
347
  )}
349
348
  </View>,
350
349
  ],
351
350
  ]
352
351
  )}
353
352
  </View>
354
353
  );
354
+ import React from 'react';
355
355
  console.warn('🚗 ~~ file: index.tsx:22 ~~ reportException() ~~ {type, detail, text}:', {
356
356
  type,
357
357
  data,
358
358
  text,
359
359
  });
360
360
  sgmCustomReport({
361
361
  code: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_${type}`),
362
362
  msg: {
363
363
  type,
364
364
  data,
365
365
  text: '[双价格组件]' + text,
366
366
  },
367
367
  });
368
368
  return rest.some((item) => item === undefined || item === '');
369
369
  const numPrice = Number(strPrice);
370
370
  if (isNaN(numPrice)) {
371
371
  reportException({
372
372
  type: 'isNotNumericType',
373
373
  data: props,
374
374
  text: `传入价格字段值“${strPrice}”转换数字报错`,
375
375
  });
376
376
  return false;
377
377
  }
378
378
  else if (numPrice <= 0) {
379
379
  reportException({
380
380
  type: 'isNotPositiveNumber',
381
381
  data: props,
382
382
  text: `传入价格字段值“${strPrice}”不是一个正数`,
383
383
  });
384
384
  return false;
385
385
  }
386
386
  const result = numPrice.toString().match(/(\d+)(\.(\d+))?/);
387
387
  if (result && result[3]?.length > 2) {
388
388
  reportException({
389
389
  type: 'decimalPlaceTooLong',
390
390
  data: props,
391
391
  text: `传入价格字段值“${strPrice}”小数位不能超过2位`,
392
392
  });
393
393
  return false;
394
394
  }
395
395
  if (/^\d+(\.\d+)?[eE][+-]?\d+$/.test(strPrice)) {
396
396
  reportException({
397
397
  type: 'findScientificNotation',
398
398
  data: props,
399
399
  text: `传入价格字段值“${strPrice}”是一个科学计数法格式`,
400
400
  });
401
401
  }
402
402
  return true;
403
403
  const { jdPrice, finalPrice } = props;
404
404
  if (jdPrice && finalPrice && Number(jdPrice) <= Number(finalPrice)) {
405
405
  reportException({
406
406
  type: 'pricesCompareException',
407
407
  data: props,
408
408
  text: `身份/到手价必须小于松果价`,
409
409
  });
410
410
  return false;
411
411
  } else {
412
412
  return true;
413
413
  }
414
414
  const numPrice = Number(strPrice);
415
415
  const result = numPrice.toString().match(/(\d+)(\.(\d+))?/);
416
416
  if (result) {
417
417
  return {
418
418
  integerPrice: result[1],
419
419
  decimalPrice: (result[3] || '').replace(/0+$/, ''),
420
420
  };
421
421
  } else {
422
422
  reportException({
423
423
  type: 'deconstructException',
424
424
  data: props,
425
425
  text: `解构传入价格字段值“${strPrice}”解构发生异常`,
426
426
  });
427
427
  return null;
428
428
  }
429
429
  const {
430
430
  jdPrice,
431
431
  finalPrice,
432
432
  priceText = '',
433
433
  priceTextColor = '',
434
434
  priceUnit = '',
435
435
  priceType,
436
436
  hitUserIdentity = false,
437
437
  fallbackRender = null,
438
438
  className = null,
439
439
  style = {},
440
440
  childrenClassName = null,
441
441
  bigNoPriceClassName = null,
442
442
  bigSymbolClassName = null,
443
443
  bigIntegerClassName = null,
444
444
  bigDecimalClassName = null,
445
445
  priceDescClassName = null,
446
446
  smallPriceClassName = null,
447
447
  lineNumber = 1,
448
448
  size = 'M',
449
449
  isDefaultRemoveSmallPrice = false,
450
450
  useFontV2 = false,
451
451
  useFontV2Bold = false,
452
452
  } = props;
453
453
  let useBackstop = false;
454
454
  const isShowPriceUnit = priceUnit && priceUnit !== '';
455
455
  if (isNull(props.jdPrice, props.priceType)) {
456
456
  useBackstop = true;
457
457
  reportException({
458
458
  type: 'paramMiss',
459
459
  data: props,
460
460
  text: '缺少必要入参:jdPrice、priceType',
461
461
  });
462
462
  } else if (
463
463
  !allowedNoHitUserIdentityTypes.includes(props.priceType) &&
464
464
  props.hitUserIdentity === undefined
465
465
  ) {
466
466
  useBackstop = true;
467
467
  reportException({
468
468
  type: 'paramMiss',
469
469
  data: props,
470
470
  text: `价格类型${props.priceType}缺少必要入参:hitUserIdentity`,
471
471
  });
472
472
  }
473
473
  const especialHitStyleType = {
474
474
  7: 'plusStyle',
475
475
  9: 'samStyle',
476
476
  };
477
477
  const especialMissStyleType = {
478
478
  7: 'plusStyle',
479
479
  8: 'fansStyle',
480
480
  9: 'samStyle',
481
481
  10: 'studentStyle',
482
482
  12: 'yhdStyle',
483
483
  13: 'memberStyle',
484
484
  };
485
485
  const isUseFinalPriceAsBigPrice = allowedNoHitUserIdentityTypes.includes(priceType);
486
486
  const isEquivalentHit = isUseFinalPriceAsBigPrice || hitUserIdentity;
487
487
  const isOnlyShowBigPrice = priceType === 3 || isNull(finalPrice);
488
488
  const smallPrice = isEquivalentHit ? jdPrice : finalPrice;
489
489
  const isHideSmallPrice =
490
490
  priceType === 14 || isDefaultRemoveSmallPrice || isNaN(Number(smallPrice));
491
491
  const isTextPrice = priceType === 4;
492
492
  if (!isTextPrice && !useBackstop) {
493
493
  if (finalPrice && !numericPriceValidate(finalPrice, props)) {
494
494
  useBackstop = true;
495
495
  } else if (!numericPriceValidate(jdPrice, props)) {
496
496
  useBackstop = true;
497
497
  }
498
498
  if (!useBackstop && !isOnlyShowBigPrice && !isHideSmallPrice && !pricesCompareValidate(props)) {
499
499
  useBackstop = true;
500
500
  }
501
501
  }
502
502
  const bigPriceObj =
503
503
  isTextPrice || useBackstop
504
504
  ? {}
505
505
  : getDeconstructPrice(isEquivalentHit && !isNull(finalPrice) ? finalPrice : jdPrice, props);
506
506
  const { integerPrice = '', decimalPrice = '' } = bigPriceObj || {};
507
507
  const isPriceDescInFront = isEquivalentHit;
508
508
  const hitColorStyle = isEquivalentHit ? styles[especialHitStyleType[priceType]] : null;
509
509
  const missColorStyle = isEquivalentHit ? null : styles[especialMissStyleType[priceType]];
510
510
  const isBigPriceHasDecimal = decimalPrice !== '' && !/^0+$/.test(decimalPrice);
511
511
  const sizeLineHeight = {
512
512
  XS: 28,
513
513
  S: 34,
514
514
  M: 40,
515
515
  L: 46,
516
516
  XL: 52,
517
517
  };
518
518
  const lineHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25);
519
519
  const wrapHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25 * lineNumber);
520
520
  const computedHeightStyle = {
521
521
  height: wrapHeight,
522
522
  };
523
523
  const itemCommonStyle = {
524
524
  height: lineHeight,
525
525
  };
526
526
  const priceTextStyle = priceTextColor ? { color: priceTextColor } : {};
527
527
  const needSizeStyles = [
528
528
  'bigNoPrice',
529
529
  'bigSymbol',
530
530
  'bigInteger',
531
531
  'bigDecimal',
532
532
  'priceDesc',
533
533
  'smallPrice',
534
534
  'priceUnit',
535
535
  ];
536
536
  const sizeStyles = needSizeStyles.reduce((acc, cur) => {
537
537
  acc[cur] = styles[cur + size];
538
538
  return acc;
539
539
  }, {});
540
540
  const finalFallbackText = global?.languageJsonData?.noPriceTip || '暂无报价';
541
541
  const noPriceShowText =
542
542
  priceText || (/^[\u4e00-\u9fa5]+$/.test(jdPrice) ? jdPrice : finalFallbackText);
543
543
  if (useBackstop && fallbackRender) {
544
544
  return fallbackRender;
545
545
  }
546
546
  return (
547
547
  <View
548
548
  className={classNames(styles.wrap, className)}
549
549
  style={{ ...computedHeightStyle, ...style }}
550
550
  >
551
551
  {isTextPrice || useBackstop ? (
552
552
  <Text
553
553
  className={classNames(
554
554
  styles.childStyle,
555
555
  styles.bigStyle,
556
556
  styles.bigNoPrice,
557
557
  sizeStyles['bigNoPrice'],
558
558
  childrenClassName,
559
559
  bigNoPriceClassName,
560
560
  )}
561
561
  style={{ ...itemCommonStyle }}
562
562
  >
563
563
  {useBackstop ? finalFallbackText : noPriceShowText}
564
564
  </Text>
565
565
  ) : (
566
566
  [
567
567
  <Text
568
568
  className={classNames(
569
569
  styles.childStyle,
570
570
  styles.bigStyle,
571
571
  styles.bigSymbol,
572
572
  sizeStyles['bigSymbol'],
573
573
  hitColorStyle,
574
574
  childrenClassName,
575
575
  bigSymbolClassName,
576
576
  {
577
577
  [styles.fontV2]: useFontV2,
578
578
  [styles.fontV2Bold]: useFontV2Bold,
579
579
  },
580
580
  )}
581
581
  key="bigSymbol"
582
582
  style={{ ...itemCommonStyle }}
583
583
  >
584
584
  ¥
585
585
  </Text>,
586
586
  <Text
587
587
  className={classNames(
588
588
  styles.childStyle,
589
589
  styles.bigStyle,
590
590
  styles.bigInteger,
591
591
  sizeStyles['bigInteger'],
592
592
  hitColorStyle,
593
593
  !isOnlyShowBigPrice &&
594
594
  !isBigPriceHasDecimal &&
595
595
  !isPriceDescInFront &&
596
596
  !isShowPriceUnit
597
597
  ? styles.rightMargin
598
598
  : null,
599
599
  childrenClassName,
600
600
  bigIntegerClassName,
601
601
  {
602
602
  [styles.fontV2]: useFontV2,
603
603
  [styles.fontV2Bold]: useFontV2Bold,
604
604
  },
605
605
  )}
606
606
  key="bigInteger"
607
607
  style={{ ...itemCommonStyle }}
608
608
  >
609
609
  {integerPrice}
610
610
  </Text>,
611
611
  isBigPriceHasDecimal ? (
612
612
  <Text
613
613
  className={classNames(
614
614
  styles.childStyle,
615
615
  styles.bigStyle,
616
616
  styles.bigDecimal,
617
617
  sizeStyles['bigDecimal'],
618
618
  hitColorStyle,
619
619
  isPriceDescInFront || isShowPriceUnit ? null : styles.rightMargin,
620
620
  childrenClassName,
621
621
  bigDecimalClassName,
622
622
  {
623
623
  [styles.fontV2]: useFontV2,
624
624
  [styles.fontV2Bold]: useFontV2Bold,
625
625
  },
626
626
  )}
627
627
  key="bigDecimal"
628
628
  style={{ ...itemCommonStyle }}
629
629
  >
630
630
  .{decimalPrice}
631
631
  </Text>
632
632
  ) : null,
633
633
  isShowPriceUnit ? (
634
634
  <Text
635
635
  className={classNames(
636
636
  styles.childStyle,
637
637
  styles.priceUnit,
638
638
  styles.rightMargin,
639
639
  sizeStyles['priceUnit'],
640
640
  styles.bigStyle,
641
641
  hitColorStyle,
642
642
  childrenClassName,
643
643
  priceDescClassName,
644
644
  )}
645
645
  key="descFrontUnit"
646
646
  style={{ ...itemCommonStyle }}
647
647
  >
648
648
  {priceUnit}
649
649
  </Text>
650
650
  ) : null,
651
651
  !isOnlyShowBigPrice && [
652
652
  isPriceDescInFront && (
653
653
  <Text
654
654
  className={classNames(
655
655
  styles.childStyle,
656
656
  styles.priceDesc,
657
657
  {
658
658
  [styles['priceEnDesc']]: isLanguageForEn,
659
659
  },
660
660
  {
661
661
  [styles['priceHiddenDesc']]: priceText === '',
662
662
  },
663
663
  sizeStyles['priceDesc'],
664
664
  styles.bigStyle,
665
665
  hitColorStyle,
666
666
  isPriceDescInFront && !isShowPriceUnit ? styles.rightMargin : null,
667
667
  childrenClassName,
668
668
  priceDescClassName,
669
669
  )}
670
670
  key="descFront"
671
671
  style={{ ...itemCommonStyle, ...priceTextStyle }}
672
672
  >
673
673
  {priceText === '' ? '_' : priceText}
674
674
  </Text>
675
675
  ),
676
676
  <View
677
677
  style={{
678
678
  display: 'inline-flex',
679
679
  }}
680
680
  >
681
681
  {smallPrice && !isHideSmallPrice ? (
682
682
  <Text
683
683
  className={classNames(
684
684
  styles.childStyle,
685
685
  styles.smallPrice,
686
686
  sizeStyles['smallPrice'],
687
687
  styles.smallStyle,
688
688
  missColorStyle,
689
689
  childrenClassName,
690
690
  smallPriceClassName,
691
691
  {
692
692
  [styles.fontV2]: useFontV2,
693
693
  [styles.fontV2Bold]: useFontV2Bold,
694
694
  },
695
695
  )}
696
696
  key="smallPrice"
697
697
  style={{ ...itemCommonStyle }}
698
698
  >
699
699
  ¥{Number(smallPrice)}
700
700
  </Text>
701
701
  ) : null}
702
702
  {isShowPriceUnit ? (
703
703
  <Text
704
704
  className={classNames(
705
705
  styles.childStyle,
706
706
  styles.priceUnit,
707
707
  sizeStyles['priceUnit'],
708
708
  styles.smallStyle,
709
709
  styles.missPriceDesc,
710
710
  missColorStyle,
711
711
  childrenClassName,
712
712
  priceDescClassName,
713
713
  )}
714
714
  key="descFrontUnit"
715
715
  style={{ ...itemCommonStyle }}
716
716
  >
717
717
  {priceUnit}
718
718
  </Text>
719
719
  ) : null}
720
720
  {!isPriceDescInFront && !isHideSmallPrice && (
721
721
  <Text
722
722
  className={classNames(
723
723
  styles.childStyle,
724
724
  styles.priceDesc,
725
725
  {
726
726
  [styles['priceEnDesc']]: isLanguageForEn,
727
727
  },
728
728
  {
729
729
  [styles['priceHiddenDesc']]: priceText === '',
730
730
  },
731
731
  sizeStyles['priceDesc'],
732
732
  styles.smallStyle,
733
733
  styles.missPriceDesc,
734
734
  missColorStyle,
735
735
  childrenClassName,
736
736
  priceDescClassName,
737
737
  )}
738
738
  key="descBack"
739
739
  style={{ ...itemCommonStyle }}
740
740
  >
741
741
  {priceText === '' ? '_' : priceText}
742
742
  </Text>
743
743
  )}
744
744
  </View>,
745
745
  ],
746
746
  ]
747
747
  )}
748
748
  </View>
749
749
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conecli/cone-render",
3
- "version": "0.10.1-shop3.37",
3
+ "version": "0.10.1-shop3.38",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist/"