@conecli/cone-render 0.10.1-shop-beta.11 → 0.10.1-shop-beta.13

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 (78) hide show
  1. package/README.md +1 -1
  2. package/dist/common/const.ts +1 -1
  3. package/dist/common/index.dynamic.ts +1 -0
  4. package/dist/common/index.h5.ts +1 -1
  5. package/dist/common/index.jd.ts +1 -1
  6. package/dist/common/index.ts +1 -1
  7. package/dist/common/index.weapp.ts +1 -1
  8. package/dist/common/jssdk.ts +1 -1
  9. package/dist/common/token/index.h5.ts +1 -1
  10. package/dist/common/wxappApi.ts +1 -1
  11. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  12. package/dist/components/base/CountDown/index.tsx +1 -1
  13. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  14. package/dist/components/base/Dialog/index.dynamic.module.scss +126 -0
  15. package/dist/components/base/Dialog/index.dynamic.tsx +1 -0
  16. package/dist/components/base/DynamicTest/index.dynamic.module.scss +15 -0
  17. package/dist/components/base/DynamicTest/index.module.scss +16 -0
  18. package/dist/components/base/DynamicTest/index.tsx +1 -0
  19. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  20. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  21. package/dist/components/base/JdLoading/index.module.scss +2 -0
  22. package/dist/components/base/JdLoading/index.tsx +1 -1
  23. package/dist/components/base/LazyLoadImage/index.tsx +1 -1
  24. package/dist/components/base/NetworkDataError/const.ts +1 -1
  25. package/dist/components/base/NetworkDataError/index.module.scss +116 -70
  26. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  27. package/dist/components/base/Price/Base/index.dynamic.module.scss +63 -0
  28. package/dist/components/base/Price/Base/index.dynamic.tsx +1 -0
  29. package/dist/components/base/Price/Base/index.module.scss +6 -0
  30. package/dist/components/base/Price/Base/index.tsx +1 -1
  31. package/dist/components/base/Price/Double/index.dynamic.module.scss +172 -0
  32. package/dist/components/base/Price/Double/index.dynamic.tsx +1 -0
  33. package/dist/components/base/Price/Double/index.module.scss +6 -0
  34. package/dist/components/base/Price/Double/index.tsx +1 -1
  35. package/dist/components/debug/DebugLayout/index.module.scss +2 -2
  36. package/dist/config/env.ts +1 -1
  37. package/dist/interface/common.ts +1 -1
  38. package/dist/interface/component.ts +1 -1
  39. package/dist/interface/jumpEventReport.ts +1 -1
  40. package/dist/jumpEventReport/const.ts +1 -1
  41. package/dist/jumpEventReport/index.dynamic.ts +1 -0
  42. package/dist/jumpEventReport/index.h5.ts +1 -1
  43. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  44. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  45. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  46. package/dist/jumpEventReport/web.base.ts +1 -1
  47. package/dist/jumpEventReport/web.jd.ts +1 -1
  48. package/dist/language/zh_CN.json +162 -0
  49. package/dist/open/api/index.ts +1 -1
  50. package/dist/open/api/shopMember.dynamic.ts +1 -0
  51. package/dist/open/api/shopMember.ts +1 -1
  52. package/dist/open/components/index.dynamic.ts +1 -0
  53. package/dist/open/components/index.ts +1 -1
  54. package/dist/sass/app.dynamic.scss +306 -0
  55. package/dist/service/fetchGateway.h5.ts +1 -0
  56. package/dist/service/fetchGateway.ts +1 -1
  57. package/dist/service/fetchGateway.weapp.ts +1 -1
  58. package/dist/service/fetchJsonp.h5.ts +1 -0
  59. package/dist/service/fetchJsonp.ts +1 -1
  60. package/dist/service/http/colorSign.dynamic.ts +1 -0
  61. package/dist/service/http/http.ts +1 -1
  62. package/dist/service/requestServer.h5.ts +1 -1
  63. package/dist/service/requestServer.ts +1 -1
  64. package/dist/service/requestServer.weapp.ts +1 -1
  65. package/dist/utils/connectNativeJsBridge.dynamic.ts +1 -0
  66. package/dist/utils/connectNativeJsBridge.ts +1 -1
  67. package/dist/utils/h5Utils.ts +1 -1
  68. package/dist/utils/index.h5.ts +1 -1
  69. package/dist/utils/index.ts +1 -1
  70. package/dist/utils/index.weapp.ts +1 -1
  71. package/dist/utils/intersectionObserver.ts +1 -1
  72. package/dist/utils/jumpExtMapUtil.ts +1 -0
  73. package/dist/utils/log.ts +1 -0
  74. package/dist/utils/utils.ts +1 -1
  75. package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
  76. package/dist/wxapp/common/user_info.js +1 -1
  77. package/package.json +51 -31
  78. /package/dist/utils/{jumpExtMapUtil.js → jumpExtMapUtil.h5.ts} +0 -0
@@ -0,0 +1 @@
1
+ import React from 'react';
2
  let value = `${initValue}`;
1
3
  if (!cnPriceTextList.includes(value)) {
2
4
  if (value && !/^[0123456789-]*$/.test(value.substring(0, 1))) {
3
5
  symbol = value.substring(0, 1);
4
6
  value = value.substring(1);
5
7
  }
6
8
  if (/^\d+(\.\d+)?[eE][+-]?\d+$/.test(value)) {
7
9
  sgmCustomReport({
8
10
  code: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_basePrice`),
9
11
  msg: {
10
12
  price: value,
11
13
  originalPrice: initValue,
12
14
  msg: '当前价格为科学计数数据,上报关注该价格',
13
15
  },
14
16
  });
15
17
  }
16
18
  if (!decToIntegerState) {
17
19
  value = parseFloat(value).toFixed(decLength);
18
20
  } else {
19
21
  if (value.indexOf('.') !== -1) {
20
22
  value = parseFloat(value).toFixed(decLength);
21
23
  value = `${value}`.replace(/0+$/, '');
22
24
  }
23
25
  }
24
26
  if (value === 'NaN') {
25
27
  sgmCustomReport({
26
28
  code: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_basePrice`),
27
29
  msg: {
28
30
  price: value,
29
31
  originalPrice: initValue,
30
32
  msg: '价格转换异常,兜底展示暂无报价',
31
33
  },
32
34
  });
33
35
  value = '暂无报价';
34
36
  }
35
37
  }
36
38
  const [intVal, decimalVal] = `${value}`.split('.');
37
39
  return {
38
40
  currencySymbol: !cnPriceTextList.includes(intVal) ? symbol : '',
39
41
  intVal,
40
42
  decimalVal,
41
43
  };
42
44
  const {
43
45
  prefixCls = 'd-mini-price',
44
46
  symPos = 'sub',
45
47
  symbol = '¥',
46
48
  decPos = 'sub',
47
49
  status = '',
48
50
  className,
49
51
  style = {},
50
52
  symClassName,
51
53
  intClassName,
52
54
  decClassName,
53
55
  noPriceClassName,
54
56
  value,
55
57
  decLength = 2,
56
58
  decToIntegerState = false,
57
59
  isPlusPrice = false,
58
60
  isSamsPrice,
59
61
  isMemberPrice,
60
62
  isSfpPrice,
61
63
  memberPriceIcon,
62
64
  isShowPriceLabel = false,
63
65
  priceLabelText = '到手价',
64
66
  useFontV2 = false,
65
67
  useFontV2Bold = false,
66
68
  } = props;
67
69
  const cls = classNames(
68
70
  className ? `${className}` : '',
69
71
  prefixCls,
70
72
  'd-imag-rendering-crisp-edges',
71
73
  {
72
74
  del: status === 'del',
73
75
  },
74
76
  {
75
77
  'd-price-label': isShowPriceLabel,
76
78
  },
77
79
  );
78
80
  const symCls = classNames(symClassName ? `${symClassName}` : '', {
79
81
  'sym-sub': symPos === 'sub',
80
82
  'sym-sup': symPos === 'sup',
81
83
  'd-font-v2': useFontV2,
82
84
  'd-font-v2-bold': useFontV2Bold,
83
85
  });
84
86
  const intCls = classNames(intClassName ? `${intClassName}` : '',{
85
87
  'd-font-v2': useFontV2,
86
88
  'd-font-v2-bold': useFontV2Bold,
87
89
  });
88
90
  const decCls = classNames(decClassName ? `${decClassName}` : '', {
89
91
  'dec-sub': decPos === 'sub',
90
92
  'dec-sup': decPos === 'sup',
91
93
  'd-font-v2': useFontV2,
92
94
  'd-font-v2-bold': useFontV2Bold,
93
95
  });
94
96
  const noPriceCls = classNames(noPriceClassName ? `${noPriceClassName}` : '');
95
97
  const { currencySymbol, intVal, decimalVal } = dealPrice(
96
98
  value,
97
99
  decLength,
98
100
  symbol,
99
101
  decToIntegerState,
100
102
  );
101
103
  return (
102
104
  <View className={cls} style={style}>
103
105
  {intVal === '-1' ? (
104
106
  <Text className={`${prefixCls}-txt int-txt off-shelf ${noPriceCls}`}>{`暂无报价`}</Text>
105
107
  ) : (
106
108
  <>
107
109
  <Text className={classNames(`${prefixCls}-sym`,`${symCls}`,"init-font-color",{
108
110
  "init-font-android-color": isAndroidDevice
109
111
  })}>{currencySymbol}</Text>
110
112
  <Text className={classNames(`${prefixCls}-txt`,`int-txt`,`${intCls}`,`init-font-color`,{
111
113
  "init-font-android-color": isAndroidDevice
112
114
  })}>{intVal}</Text>
113
115
  {!!decimalVal && (
114
116
  <Text className={classNames(`${prefixCls}-txt`,`dec-txt`,`${decCls}`,`init-font-color`,{
115
117
  "init-font-android-color": isAndroidDevice
116
118
  })}>.{decimalVal}</Text>
117
119
  )}
118
120
  {isShowPriceLabel && <Text className={classNames('d-price-label-text','init-font-color',{
119
121
  "init-font-android-color": isAndroidDevice
120
122
  })}>{priceLabelText}</Text>}
121
123
  </>
122
124
  )}
123
125
  </View>
124
126
  );
@@ -5,6 +5,12 @@
5
5
  color: #f23030;
6
6
  display: inline-block;
7
7
  font-family: 'JDZhengHT-Regular';
8
+ &.d-font-v2 {
9
+ font-family: 'JDZhengHeiV2-Regular';
10
+ }
11
+ &.d-font-v2-bold {
12
+ font-family: 'JDZhengHeiV2-Bold';
13
+ }
8
14
 
9
15
  &-sym {
10
16
  font-size: 22px;
@@ -1 +1 @@
1
- import React from 'react'
2
1
  if(/^\d+(\.\d+)?[eE][+-]?\d+$/.test(value)){
3
2
  sgmCustomReport({
4
3
  code: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_basePrice`),
5
4
  msg: {
6
5
  price: value,
7
6
  originalPrice: initValue,
8
7
  msg: "当前价格为科学计数数据,上报关注该价格"
9
8
  },
10
9
  })
11
10
  }
12
11
  if(value === "NaN"){
13
12
  sgmCustomReport({
14
13
  code: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_basePrice`),
15
14
  msg: {
16
15
  price: value,
17
16
  originalPrice: initValue,
18
17
  msg: "价格转换异常,兜底展示暂无报价"
19
18
  },
20
19
  })
21
20
  value = "暂无报价"
22
21
  }
23
22
  priceLabelText: "到手价"
23
+ import React from 'react';
24
24
  let value = `${initValue}`;
25
25
  if (!cnPriceTextList.includes(value)) {
26
26
  if (value && !/^[0123456789-]*$/.test(value.substring(0, 1))) {
27
27
  symbol = value.substring(0, 1);
28
28
  value = value.substring(1);
29
29
  }
30
30
  if (/^\d+(\.\d+)?[eE][+-]?\d+$/.test(value)) {
31
31
  sgmCustomReport({
32
32
  code: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_basePrice`),
33
33
  msg: {
34
34
  price: value,
35
35
  originalPrice: initValue,
36
36
  msg: '当前价格为科学计数数据,上报关注该价格',
37
37
  },
38
38
  });
39
39
  }
40
40
  if (!decToIntegerState) {
41
41
  value = parseFloat(value).toFixed(decLength);
42
42
  } else {
43
43
  if (value.indexOf('.') !== -1) {
44
44
  value = parseFloat(value).toFixed(decLength);
45
45
  value = `${value}`.replace(/0+$/, '');
46
46
  }
47
47
  }
48
48
  if (value === 'NaN') {
49
49
  sgmCustomReport({
50
50
  code: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_basePrice`),
51
51
  msg: {
52
52
  price: value,
53
53
  originalPrice: initValue,
54
54
  msg: '价格转换异常,兜底展示暂无报价',
55
55
  },
56
56
  });
57
57
  value = '暂无报价';
58
58
  }
59
59
  }
60
60
  const [intVal, decimalVal] = `${value}`.split('.');
61
61
  return {
62
62
  currencySymbol: !cnPriceTextList.includes(intVal) ? symbol : '',
63
63
  intVal,
64
64
  decimalVal,
65
65
  };
66
66
  const {
67
67
  prefixCls = 'd-mini-price',
68
68
  symPos = 'sub',
69
69
  symbol = '¥',
70
70
  decPos = 'sub',
71
71
  status = '',
72
72
  className,
73
73
  style = {},
74
74
  symClassName,
75
75
  intClassName,
76
76
  decClassName,
77
77
  noPriceClassName,
78
78
  value,
79
79
  decLength = 2,
80
80
  decToIntegerState = false,
81
81
  isPlusPrice = false,
82
82
  isSamsPrice,
83
83
  isMemberPrice,
84
84
  isSfpPrice,
85
85
  memberPriceIcon,
86
86
  isShowPriceLabel = false,
87
87
  priceLabelText = '到手价',
88
88
  useFontV2 = false,
89
89
  useFontV2Bold = false,
90
90
  } = props;
91
91
  const cls = classNames(
92
92
  className ? `${className}` : '',
93
93
  prefixCls,
94
94
  {
95
95
  'd-font-v2': useFontV2,
96
96
  'd-font-v2-bold': useFontV2Bold,
97
97
  },
98
98
  'd-imag-rendering-crisp-edges',
99
99
  {
100
100
  del: status === 'del',
101
101
  },
102
102
  {
103
103
  'd-plus-price': isPlusPrice,
104
104
  },
105
105
  {
106
106
  'd-sams-price': isSamsPrice,
107
107
  },
108
108
  {
109
109
  'd-sfp-price': isSfpPrice,
110
110
  },
111
111
  {
112
112
  'd-member-price': isMemberPrice,
113
113
  },
114
114
  {
115
115
  [`d-member-price-${memberPriceIcon}`]: memberPriceIcon,
116
116
  },
117
117
  {
118
118
  'd-price-label': isShowPriceLabel,
119
119
  },
120
120
  );
121
121
  const symCls = classNames(symClassName ? `${symClassName}` : '', {
122
122
  'sym-sub': symPos === 'sub',
123
123
  'sym-sup': symPos === 'sup',
124
124
  });
125
125
  const intCls = classNames(intClassName ? `${intClassName}` : '');
126
126
  const decCls = classNames(decClassName ? `${decClassName}` : '', {
127
127
  'dec-sub': decPos === 'sub',
128
128
  'dec-sup': decPos === 'sup',
129
129
  });
130
130
  const noPriceCls = classNames(noPriceClassName ? `${noPriceClassName}` : '');
131
131
  const { currencySymbol, intVal, decimalVal } = dealPrice(
132
132
  value,
133
133
  decLength,
134
134
  symbol,
135
135
  decToIntegerState,
136
136
  );
137
137
  return (
138
138
  <View className={cls} style={style} data-after={isShowPriceLabel ? priceLabelText : ''}>
139
139
  {intVal === '-1' ? (
140
140
  <Text className={`${prefixCls}-txt int-txt off-shelf ${noPriceCls}`}>{`暂无报价`}</Text>
141
141
  ) : (
142
142
  <>
143
143
  <Text className={`${prefixCls}-sym ${symCls}`}>{currencySymbol}</Text>
144
144
  <Text className={`${prefixCls}-txt int-txt ${intCls}`}>{intVal}</Text>
145
145
  {!!decimalVal && (
146
146
  <Text className={`${prefixCls}-txt dec-txt ${decCls}`}>.{decimalVal}</Text>
147
147
  )}
148
148
  </>
149
149
  )}
150
150
  </View>
151
151
  );
@@ -0,0 +1,172 @@
1
+ .wrap {
2
+ overflow: hidden;
3
+ display: flex;
4
+ flex-direction: row;
5
+ flex-wrap: wrap;
6
+ align-items: baseline;
7
+ //line-height: 0; // 这个是保障不同平台(IOS、Android),不同font-size下多个行内元素文案底部还能对齐的基石
8
+ }
9
+ .childStyle {
10
+ //transform: translateY(50%);
11
+ }
12
+ .bigStyle {
13
+ color: #fa2c19;
14
+ }
15
+
16
+ .bigNoPrice {
17
+ font-family: PingFang SC;
18
+ }
19
+ .bigNoPriceXL {
20
+ font-size: 48px;
21
+ }
22
+ .bigNoPriceL {
23
+ font-size: 42px;
24
+ }
25
+ .bigNoPriceM {
26
+ font-size: 36px;
27
+ }
28
+ .bigNoPriceS {
29
+ font-size: 30px;
30
+ }
31
+ .bigNoPriceXS {
32
+ font-size: 24px;
33
+ }
34
+
35
+ .bigSymbol {
36
+ font-family: JDZH-Regular;
37
+ }
38
+ .bigSymbolXL {
39
+ font-size: 28px;
40
+ }
41
+ .bigSymbolL {
42
+ font-size: 26px;
43
+ }
44
+ .bigSymbolM {
45
+ font-size: 24px;
46
+ }
47
+ .bigSymbolS {
48
+ font-size: 22px;
49
+ }
50
+ .bigSymbolXS {
51
+ font-size: 20px;
52
+ }
53
+
54
+ .bigInteger {
55
+ font-family: JDZH-Regular;
56
+ }
57
+ .bigIntegerXL {
58
+ font-size: 52px;
59
+ }
60
+ .bigIntegerL {
61
+ font-size: 46px;
62
+ }
63
+ .bigIntegerM {
64
+ font-size: 40px;
65
+ }
66
+ .bigIntegerS {
67
+ font-size: 34px;
68
+ }
69
+ .bigIntegerXS {
70
+ font-size: 28px;
71
+ }
72
+
73
+ .bigDecimal {
74
+ font-family: JDZH-Regular;
75
+ }
76
+
77
+ .bigDecimalXL {
78
+ font-size: 28px;
79
+ }
80
+ .bigDecimalL {
81
+ font-size: 26px;
82
+ }
83
+ .bigDecimalM {
84
+ font-size: 24px;
85
+ }
86
+ .bigDecimalS {
87
+ font-size: 22px;
88
+ }
89
+ .bigDecimalXS {
90
+ font-size: 20px;
91
+ }
92
+
93
+ .priceDesc {
94
+ margin-left: 4px;
95
+ font-family: PingFang SC;
96
+ &.priceHiddenDesc {
97
+ width: 0;
98
+ visibility: hidden;
99
+ }
100
+ &.priceEnDesc {
101
+ width: 0;
102
+ visibility: hidden;
103
+ }
104
+ }
105
+ .priceDescXL {
106
+ font-size: 28px;
107
+ }
108
+ .priceDescL {
109
+ font-size: 26px;
110
+ }
111
+ .priceDescM {
112
+ font-size: 24px;
113
+ }
114
+ .priceDescS {
115
+ font-size: 22px;
116
+ }
117
+ .priceDescXS {
118
+ font-size: 20px;
119
+ }
120
+
121
+ .missPriceDesc {
122
+ }
123
+ .smallStyle {
124
+ color: #8c8c8c;
125
+ }
126
+
127
+ .smallPrice {
128
+ font-family: JDZH-Regular;
129
+ }
130
+ .smallPriceXL {
131
+ font-size: 28px;
132
+ }
133
+ .smallPriceL {
134
+ font-size: 26px;
135
+ }
136
+ .smallPriceM {
137
+ font-size: 24px;
138
+ }
139
+ .smallPriceS {
140
+ font-size: 22px;
141
+ }
142
+ .smallPriceXS {
143
+ font-size: 20px;
144
+ }
145
+
146
+ .rightMargin {
147
+ margin-right: 16px;
148
+ }
149
+ .plusStyle {
150
+ color: #1c4b8c;
151
+ }
152
+ .fansStyle {
153
+ color: #8450e5;
154
+ }
155
+ .samStyle {
156
+ color: #3981e5;
157
+ }
158
+ .studentStyle {
159
+ color: #30bf26;
160
+ }
161
+ .yhdStyle {
162
+ color: #674431;
163
+ }
164
+ .memberStyle {
165
+ color: #f6b303;
166
+ }
167
+ .fontV2 {
168
+ font-family: JDZH-Regular;
169
+ }
170
+ .fontV2Bold {
171
+ font-family: JDZH-Bold;
172
+ }