@conecli/cone-render 0.10.1-shop-beta.22 → 0.10.1-shop-beta.24

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 (121) hide show
  1. package/dist/api/index.ts +1 -1
  2. package/dist/common/accessibility.h5.ts +1 -0
  3. package/dist/common/accessibility.ts +0 -0
  4. package/dist/common/const.ts +1 -1
  5. package/dist/common/index.h5.ts +1 -1
  6. package/dist/common/index.jd.ts +1 -1
  7. package/dist/common/index.ts +1 -1
  8. package/dist/common/index.weapp.ts +1 -1
  9. package/dist/common/jdplayerSdk.weapp.tsx +1 -0
  10. package/dist/common/jssdk.weapp.ts +1 -0
  11. package/dist/common/pageType.ts +1 -1
  12. package/dist/common/token/token.jd.ts +1 -1
  13. package/dist/components/ErrorBoundary.tsx +1 -1
  14. package/dist/components/base/CountDown/index.tsx +1 -1
  15. package/dist/components/base/CustomVideo/index.tsx +1 -1
  16. package/dist/components/base/CustomVideo/index.weapp.tsx +1 -0
  17. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  18. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  19. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  20. package/dist/components/base/InOrOutViewObserver/index.weapp.tsx +1 -0
  21. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  22. package/dist/components/base/JdLoading/index.module.scss +0 -2
  23. package/dist/components/base/JdLoading/index.tsx +1 -1
  24. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  25. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  26. package/dist/components/base/LazyLoadImage/index.tsx +1 -1
  27. package/dist/components/base/MobileCommonHeader/index.weapp.tsx +1 -0
  28. package/dist/components/base/NetworkDataError/const.ts +1 -1
  29. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  30. package/dist/components/base/Price/Base/index.tsx +1 -1
  31. package/dist/components/base/Price/Double/index.module.scss +18 -0
  32. package/dist/components/base/Price/Double/index.tsx +1 -1
  33. package/dist/components/base/ShopLeGaoTag/index.h5.module.scss +35 -0
  34. package/dist/components/base/ShopLeGaoTag/index.h5.tsx +1 -0
  35. package/dist/components/base/ShopLeGaoTag/index.module.scss +33 -0
  36. package/dist/components/base/ShopLeGaoTag/index.tsx +1 -0
  37. package/dist/components/floorItem.tsx +1 -1
  38. package/dist/components/isv/Floor/index.tsx +1 -1
  39. package/dist/components/remoteFloorItem.tsx +1 -1
  40. package/dist/config/env.ts +1 -1
  41. package/dist/interface/common.ts +1 -1
  42. package/dist/interface/component.ts +1 -1
  43. package/dist/interface/jumpEventReport.ts +1 -1
  44. package/dist/interface/service.ts +1 -1
  45. package/dist/jumpEventReport/base.ts +1 -1
  46. package/dist/jumpEventReport/const.ts +1 -1
  47. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  48. package/dist/jumpEventReport/index.ts +1 -1
  49. package/dist/jumpEventReport/index.weapp.ts +1 -1
  50. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  51. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  52. package/dist/jumpEventReport/logEventConfig.h5.ts +1 -0
  53. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  54. package/dist/jumpEventReport/web/report.ts +1 -1
  55. package/dist/jumpEventReport/web.base.ts +1 -1
  56. package/dist/jumpEventReport/web.jd.ts +1 -1
  57. package/dist/jumpEventReport/web.pc.ts +1 -1
  58. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  59. package/dist/language/en_US.json +179 -83
  60. package/dist/language/zh_CN.json +178 -82
  61. package/dist/language/zh_HK.json +178 -82
  62. package/dist/libs/openShopBridge.js +161 -0
  63. package/dist/libs/openShopBridge.min.js +1 -0
  64. package/dist/libs/taroAppReport.js +2 -2
  65. package/dist/modules/ContainerFloorList/index.h5.module.scss +16 -2
  66. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  67. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  68. package/dist/modules/DecorateContainerFloorList/index.weapp.tsx +1 -0
  69. package/dist/open/api/index.ts +1 -1
  70. package/dist/open/api/shopMember.weapp.ts +1 -0
  71. package/dist/open/api/track.ts +1 -1
  72. package/dist/open/api/util.ts +1 -1
  73. package/dist/open/components/index.ts +1 -1
  74. package/dist/open/index.ts +1 -1
  75. package/dist/sass/app.h5.scss +6 -1
  76. package/dist/service/fetchGateway.ts +1 -1
  77. package/dist/service/fetchGateway.weapp.ts +1 -1
  78. package/dist/service/fetchJsonp.ts +1 -1
  79. package/dist/service/fetchJsonp.weapp.ts +1 -0
  80. package/dist/service/http/h5Http.ts +1 -1
  81. package/dist/service/http/http.ts +1 -1
  82. package/dist/service/http/httpInterceptors.weapp.ts +1 -0
  83. package/dist/service/requestServer.h5.ts +1 -1
  84. package/dist/service/requestServer.ts +1 -1
  85. package/dist/service/requestServer.weapp.ts +1 -1
  86. package/dist/utils/connectNativeJsBridge.ts +1 -1
  87. package/dist/utils/h5Utils.ts +1 -1
  88. package/dist/utils/harmonyCallRouter.h5.ts +1 -0
  89. package/dist/utils/harmonyCallRouter.ts +0 -0
  90. package/dist/utils/index.h5.ts +1 -1
  91. package/dist/utils/index.ts +1 -1
  92. package/dist/utils/index.weapp.ts +1 -1
  93. package/dist/utils/intersectionObserver.ts +1 -1
  94. package/dist/utils/sColor.weapp.ts +1 -0
  95. package/dist/utils/utils.ts +1 -1
  96. package/package.json +13 -15
  97. package/dist/common/index.dynamic.ts +0 -1
  98. package/dist/components/base/Dialog/index.dynamic.module.scss +0 -126
  99. package/dist/components/base/Dialog/index.dynamic.tsx +0 -1
  100. package/dist/components/base/DynamicTest/index.dynamic.module.scss +0 -15
  101. package/dist/components/base/DynamicTest/index.module.scss +0 -16
  102. package/dist/components/base/DynamicTest/index.tsx +0 -1
  103. package/dist/components/base/LazyLoadImage/index.dynamic.module.scss +0 -40
  104. package/dist/components/base/LazyLoadImage/index.dynamic.tsx +0 -1
  105. package/dist/components/base/NetworkDataError/index.dynamic.module.scss +0 -95
  106. package/dist/components/base/NetworkDataError/index.dynamic.tsx +0 -1
  107. package/dist/components/base/Price/Base/index.dynamic.module.scss +0 -63
  108. package/dist/components/base/Price/Base/index.dynamic.tsx +0 -1
  109. package/dist/components/base/Price/Double/index.dynamic.module.scss +0 -172
  110. package/dist/components/base/Price/Double/index.dynamic.tsx +0 -1
  111. package/dist/jumpEventReport/index.dynamic.ts +0 -1
  112. package/dist/jumpEventReport/web/wqshop.report.ts +0 -1
  113. package/dist/open/api/shopMember.dynamic.ts +0 -1
  114. package/dist/open/components/index.dynamic.ts +0 -1
  115. package/dist/sass/app.dynamic.scss +0 -306
  116. package/dist/service/fetchGateway.h5.ts +0 -1
  117. package/dist/service/fetchJsonp.h5.ts +0 -1
  118. package/dist/service/http/colorSign.dynamic.ts +0 -1
  119. package/dist/utils/connectNativeJsBridge.dynamic.ts +0 -1
  120. package/dist/utils/priceUtils.js +0 -1
  121. /package/dist/utils/{sColor.js → sColor.ts} +0 -0
@@ -1 +1 @@
1
- import React, { useEffect, useRef } from 'react';
2
1
  let value = `${initValue}`;
3
2
  if (!cnPriceTextList.includes(value)) {
4
3
  if (value && !/^[0123456789-]*$/.test(value.substring(0, 1))) {
5
4
  symbol = value.substring(0, 1);
6
5
  value = value.substring(1);
7
6
  }
8
7
  if (/^\d+(\.\d+)?[eE][+-]?\d+$/.test(value)) {
9
8
  sgmCustomReport({
10
9
  code: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_basePrice`),
11
10
  msg: {
12
11
  price: value,
13
12
  originalPrice: initValue,
14
13
  msg: '当前价格为科学计数数据,上报关注该价格',
15
14
  },
16
15
  });
17
16
  }
18
17
  if (!decToIntegerState) {
19
18
  value = parseFloat(value).toFixed(decLength);
20
19
  } else {
21
20
  if (value.indexOf('.') !== -1) {
22
21
  value = parseFloat(value).toFixed(decLength);
23
22
  value = `${value}`.replace(/0+$/, '');
24
23
  }
25
24
  }
26
25
  if (value === 'NaN') {
27
26
  sgmCustomReport({
28
27
  code: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_basePrice`),
29
28
  msg: {
30
29
  price: value,
31
30
  originalPrice: initValue,
32
31
  msg: '价格转换异常,兜底展示暂无报价',
33
32
  },
34
33
  });
35
34
  value = '暂无报价';
36
35
  }
37
36
  }
38
37
  const [intVal, decimalVal] = `${value}`.split('.');
39
38
  return {
40
39
  currencySymbol: !cnPriceTextList.includes(intVal) ? symbol : '',
41
40
  intVal,
42
41
  decimalVal,
43
42
  };
44
43
  const {
45
44
  prefixCls = 'd-mini-price',
46
45
  symPos = 'sub',
47
46
  symbol = '¥',
48
47
  decPos = 'sub',
49
48
  status = '',
50
49
  className,
51
50
  style = {},
52
51
  symClassName,
53
52
  intClassName,
54
53
  decClassName,
55
54
  noPriceClassName,
56
55
  value,
57
56
  decLength = 2,
58
57
  decToIntegerState = false,
59
58
  isPlusPrice = false,
60
59
  isSamsPrice,
61
60
  isMemberPrice,
62
61
  isSfpPrice,
63
62
  memberPriceIcon,
64
63
  isShowPriceLabel = false,
65
64
  priceLabelText = '到手价',
66
65
  priceTextColor = '',
67
66
  useFontV2 = false,
68
67
  useFontV2Bold = false,
69
68
  } = props;
70
69
  const cRef = useRef<any>(null);
71
70
  useEffect(() => {
72
71
  if (isShowPriceLabel && priceTextColor && cRef.current) {
73
72
  cRef.current?.style?.setProperty('--after-ele-color', priceTextColor);
74
73
  }
75
74
  }, [isShowPriceLabel, priceTextColor]);
76
75
  const cls = classNames(
77
76
  className ? `${className}` : '',
78
77
  prefixCls,
79
78
  {
80
79
  'd-font-v2': useFontV2,
81
80
  'd-font-v2-bold': useFontV2Bold,
82
81
  },
83
82
  'd-imag-rendering-crisp-edges',
84
83
  {
85
84
  del: status === 'del',
86
85
  },
87
86
  {
88
87
  'd-plus-price': isPlusPrice,
89
88
  },
90
89
  {
91
90
  'd-sams-price': isSamsPrice,
92
91
  },
93
92
  {
94
93
  'd-sfp-price': isSfpPrice,
95
94
  },
96
95
  {
97
96
  'd-member-price': isMemberPrice,
98
97
  },
99
98
  {
100
99
  [`d-member-price-${memberPriceIcon}`]: memberPriceIcon,
101
100
  },
102
101
  {
103
102
  'd-price-label': isShowPriceLabel,
104
103
  },
105
104
  {
106
105
  'd-price-text-clor': isShowPriceLabel && priceTextColor,
107
106
  },
108
107
  );
109
108
  const symCls = classNames(symClassName ? `${symClassName}` : '', {
110
109
  'sym-sub': symPos === 'sub',
111
110
  'sym-sup': symPos === 'sup',
112
111
  });
113
112
  const intCls = classNames(intClassName ? `${intClassName}` : '');
114
113
  const decCls = classNames(decClassName ? `${decClassName}` : '', {
115
114
  'dec-sub': decPos === 'sub',
116
115
  'dec-sup': decPos === 'sup',
117
116
  });
118
117
  const noPriceCls = classNames(noPriceClassName ? `${noPriceClassName}` : '');
119
118
  const { currencySymbol, intVal, decimalVal } = dealPrice(
120
119
  value,
121
120
  decLength,
122
121
  symbol,
123
122
  decToIntegerState,
124
123
  );
125
124
  return (
126
125
  <View
127
126
  ref={cRef}
128
127
  className={cls}
129
128
  style={style}
130
129
  data-after={isShowPriceLabel ? priceLabelText : ''}
131
130
  >
132
131
  {intVal === '-1' ? (
133
132
  <Text className={`${prefixCls}-txt int-txt off-shelf ${noPriceCls}`}>{`暂无报价`}</Text>
134
133
  ) : (
135
134
  <>
136
135
  <Text className={`${prefixCls}-sym ${symCls}`}>{currencySymbol}</Text>
137
136
  <Text className={`${prefixCls}-txt int-txt ${intCls}`}>{intVal}</Text>
138
137
  {!!decimalVal && (
139
138
  <Text className={`${prefixCls}-txt dec-txt ${decCls}`}>.{decimalVal}</Text>
140
139
  )}
141
140
  </>
142
141
  )}
143
142
  </View>
144
143
  );
144
+ import React, { useEffect, useRef } from 'react';
145
145
  let value = `${initValue}`;
146
146
  if (!cnPriceTextList.includes(value)) {
147
147
  if (value && !/^[0123456789-]*$/.test(value.substring(0, 1))) {
148
148
  symbol = value.substring(0, 1);
149
149
  value = value.substring(1);
150
150
  }
151
151
  if (/^\d+(\.\d+)?[eE][+-]?\d+$/.test(value)) {
152
152
  draBusinessCustomReport({
153
153
  eventName: 'business',
154
154
  errorName: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_basePrice`),
155
155
  errorMessage: '当前价格为科学计数数据,上报关注该价格',
156
156
  extraData: JSON.stringify({
157
157
  price: value,
158
158
  originalPrice: initValue,
159
159
  }),
160
160
  });
161
161
  }
162
162
  if (!decToIntegerState) {
163
163
  value = parseFloat(value).toFixed(decLength);
164
164
  } else {
165
165
  if (value.indexOf('.') !== -1) {
166
166
  value = parseFloat(value).toFixed(decLength);
167
167
  value = `${value}`.replace(/0+$/, '');
168
168
  }
169
169
  }
170
170
  if (value === 'NaN') {
171
171
  draBusinessCustomReport({
172
172
  eventName: 'business',
173
173
  errorName: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_basePrice`),
174
174
  errorMessage: '价格转换异常,兜底展示暂无报价',
175
175
  extraData: JSON.stringify({
176
176
  price: value,
177
177
  originalPrice: initValue,
178
178
  }),
179
179
  });
180
180
  value = '暂无报价';
181
181
  }
182
182
  }
183
183
  const [intVal, decimalVal] = `${value}`.split('.');
184
184
  return {
185
185
  currencySymbol: !cnPriceTextList.includes(intVal) ? symbol : '',
186
186
  intVal,
187
187
  decimalVal,
188
188
  };
189
189
  const {
190
190
  prefixCls,
191
191
  symPos,
192
192
  symbol,
193
193
  decPos,
194
194
  status,
195
195
  className,
196
196
  style,
197
197
  symClassName,
198
198
  intClassName,
199
199
  decClassName,
200
200
  noPriceClassName,
201
201
  value,
202
202
  decLength,
203
203
  decToIntegerState,
204
204
  isPlusPrice,
205
205
  isSamsPrice,
206
206
  isMemberPrice,
207
207
  isSfpPrice,
208
208
  memberPriceIcon,
209
209
  isShowPriceLabel,
210
210
  priceLabelText,
211
211
  priceTextColor,
212
212
  useFontV2 = false,
213
213
  useFontV2Bold = false,
214
214
  } = props;
215
215
  const cRef = useRef<any>(null);
216
216
  useEffect(() => {
217
217
  if (isShowPriceLabel && priceTextColor && cRef.current) {
218
218
  cRef.current?.style?.setProperty('--after-ele-color', priceTextColor);
219
219
  }
220
220
  }, [isShowPriceLabel, priceTextColor]);
221
221
  const cls = classNames(
222
222
  className ? `${className}` : '',
223
223
  prefixCls,
224
224
  {
225
225
  'd-font-v2': useFontV2,
226
226
  'd-font-v2-bold': useFontV2Bold,
227
227
  },
228
228
  'd-imag-rendering-crisp-edges',
229
229
  {
230
230
  del: status === 'del',
231
231
  },
232
232
  {
233
233
  'd-plus-price': isPlusPrice,
234
234
  },
235
235
  {
236
236
  'd-sams-price': isSamsPrice,
237
237
  },
238
238
  {
239
239
  'd-sfp-price': isSfpPrice,
240
240
  },
241
241
  {
242
242
  'd-member-price': isMemberPrice,
243
243
  },
244
244
  {
245
245
  [`d-member-price-${memberPriceIcon}`]: memberPriceIcon,
246
246
  },
247
247
  {
248
248
  'd-price-label': isShowPriceLabel,
249
249
  },
250
250
  {
251
251
  'd-price-text-clor': isShowPriceLabel && priceTextColor,
252
252
  },
253
253
  );
254
254
  const symCls = classNames(symClassName ? `${symClassName}` : '', {
255
255
  'sym-sub': symPos === 'sub',
256
256
  'sym-sup': symPos === 'sup',
257
257
  });
258
258
  const intCls = classNames(intClassName ? `${intClassName}` : '');
259
259
  const decCls = classNames(decClassName ? `${decClassName}` : '', {
260
260
  'dec-sub': decPos === 'sub',
261
261
  'dec-sup': decPos === 'sup',
262
262
  });
263
263
  const noPriceCls = classNames(noPriceClassName ? `${noPriceClassName}` : '');
264
264
  const { currencySymbol, intVal, decimalVal } = dealPrice(
265
265
  value,
266
266
  decLength,
267
267
  symbol,
268
268
  decToIntegerState,
269
269
  );
270
270
  return (
271
271
  <View
272
272
  ref={cRef}
273
273
  className={cls}
274
274
  style={style}
275
275
  data-after={isShowPriceLabel ? priceLabelText : ''}
276
276
  >
277
277
  {intVal === '-1' ? (
278
278
  <Text className={`${prefixCls}-txt int-txt off-shelf ${noPriceCls}`}>{`暂无报价`}</Text>
279
279
  ) : (
280
280
  <>
281
281
  <Text className={`${prefixCls}-sym ${symCls}`}>{currencySymbol}</Text>
282
282
  <Text className={`${prefixCls}-txt int-txt ${intCls}`}>{intVal}</Text>
283
283
  {!!decimalVal && (
284
284
  <Text className={`${prefixCls}-txt dec-txt ${decCls}`}>.{decimalVal}</Text>
285
285
  )}
286
286
  </>
287
287
  )}
288
288
  </View>
289
289
  );
290
290
  prefixCls: 'd-mini-price',
291
291
  style: {},
292
292
  status: '',
293
293
  symbol: '¥',
294
294
  symPos: 'sub',
295
295
  decLength: 2,
296
296
  decPos: 'sub',
297
297
  decToIntegerState: false,
298
298
  isPlusPrice: false,
299
299
  isShowPriceLabel: false,
300
300
  priceLabelText: '到手价',
301
301
  priceTextColor: '',
302
302
  useFontV2: false,
303
303
  useFontV2Bold: false,
@@ -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
  }