@conecli/cone-render 0.10.1-shop-beta.16 → 0.10.1-shop-beta.18

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