@conecli/cone-render 0.8.20 → 0.8.21-shop-beta.3
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.
- package/dist/api/index.ts +1 -1
- package/dist/common/const.ts +1 -1
- package/dist/common/index.h5.ts +1 -1
- package/dist/common/index.jd.ts +1 -1
- package/dist/common/index.ts +1 -1
- package/dist/common/index.weapp.ts +1 -1
- package/dist/common/isvStorage/index.h5.ts +1 -0
- package/dist/common/isvStorage/index.ts +1 -0
- package/dist/common/token/const.ts +1 -0
- package/dist/common/token/index.h5.ts +1 -0
- package/dist/common/token/index.ts +1 -0
- package/dist/common/token/token.jd.ts +1 -0
- package/dist/common/token/token.ts +1 -0
- package/dist/common/token/token.wxapp.ts +1 -0
- package/dist/components/ErrorBoundary.tsx +1 -1
- package/dist/components/base/CommonFloorHead/index.module.scss +1 -1
- package/dist/components/base/CommonFloorHead/index.tsx +1 -1
- package/dist/components/base/CustomScrollView/index.tsx +1 -1
- package/dist/components/base/CustomVideo/const.ts +1 -0
- package/dist/components/base/CustomVideo/index.module.scss +40 -64
- package/dist/components/base/CustomVideo/index.tsx +1 -1
- package/dist/components/base/Dialog/index.module.scss +6 -2
- package/dist/components/base/Dialog/index.tsx +1 -1
- package/dist/components/base/ExposureSmart/const.ts +1 -0
- package/dist/components/base/ExposureSmart/index.h5.module.scss +18 -4
- package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
- package/dist/components/base/ExposureSmart/index.module.scss +20 -9
- package/dist/components/base/ExposureSmart/index.tsx +1 -1
- package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
- package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
- package/dist/components/base/InViewRender/index.tsx +1 -1
- package/dist/components/base/InViewRender/index.weapp.tsx +1 -1
- package/dist/components/base/ItemViewExposureSmart/index.module.scss +8 -0
- package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -0
- package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
- package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
- package/dist/components/base/NetworkDataError/const.ts +1 -1
- package/dist/components/base/NetworkDataError/index.module.scss +7 -1
- package/dist/components/base/NetworkDataError/index.tsx +1 -1
- package/dist/components/base/Price/{const.ts → Base/const.ts} +0 -0
- package/dist/components/base/Price/Base/index.module.scss +136 -0
- package/dist/components/base/Price/Base/index.tsx +1 -0
- package/dist/components/base/Price/Double/index.module.scss +158 -0
- package/dist/components/base/Price/Double/index.tsx +1 -0
- package/dist/components/base/Price/index.tsx +1 -1
- package/dist/components/decorate/DecorateFloorModule/index.tsx +1 -1
- package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
- package/dist/components/decorate/PlaceHolder/index.tsx +1 -1
- package/dist/components/floorItem.jd.tsx +1 -0
- package/dist/components/floorItem.tsx +1 -1
- package/dist/components/isv/Floor/index.tsx +1 -1
- package/dist/components/remoteFloorItem.tsx +1 -0
- package/dist/interface/common.ts +1 -1
- package/dist/interface/component.ts +1 -1
- package/dist/interface/jumpEventReport.ts +1 -1
- package/dist/interface/service.ts +1 -1
- package/dist/jumpEventReport/base.ts +1 -1
- package/dist/jumpEventReport/const.ts +1 -1
- package/dist/jumpEventReport/createReportFloorData.ts +1 -1
- package/dist/jumpEventReport/index.h5.ts +1 -1
- package/dist/jumpEventReport/index.ts +1 -1
- package/dist/jumpEventReport/index.weapp.ts +1 -1
- package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
- package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
- package/dist/jumpEventReport/logEventConfig.ts +1 -1
- package/dist/jumpEventReport/web/report.ts +1 -1
- package/dist/jumpEventReport/web.base.ts +1 -1
- package/dist/jumpEventReport/web.jd.ts +1 -1
- package/dist/jumpEventReport/web.jdb.ts +1 -0
- package/dist/jumpEventReport/web.jdjch.ts +1 -0
- package/dist/jumpEventReport/web.wxapp.ts +1 -1
- package/dist/libs/taroAppReport.js +2 -2
- package/dist/modules/ContainerFloorList/index.h5.module.scss +10 -1
- package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
- package/dist/modules/ContainerFloorList/index.tsx +1 -1
- package/dist/open/api/device.ts +1 -1
- package/dist/open/api/index.ts +1 -1
- package/dist/open/api/jump/business.ts +1 -0
- package/dist/open/api/jump/index.ts +1 -0
- package/dist/open/api/jump/minPath.ts +1 -0
- package/dist/open/api/jump/side.ts +1 -0
- package/dist/open/api/jump/webUrl.ts +1 -0
- package/dist/open/api/jump copy.ts +1 -0
- package/dist/open/api/moduleUtil.ts +1 -1
- package/dist/open/api/request.ts +1 -0
- package/dist/open/api/shopMember.ts +1 -0
- package/dist/open/api/track.ts +1 -1
- package/dist/open/api/userToken.ts +1 -0
- package/dist/open/api/util.ts +1 -1
- package/dist/open/components/index.ts +1 -1
- package/dist/service/bMallConst.ts +1 -0
- package/dist/service/bMallConst.weapp.ts +1 -0
- package/dist/service/fetchGateway.ts +1 -0
- package/dist/service/fetchJsonp.ts +1 -0
- package/dist/service/http/colorSign.ts +1 -0
- package/dist/service/http/colorSign.weapp.ts +1 -0
- package/dist/service/http/const.ts +1 -0
- package/dist/service/http/http.ts +1 -0
- package/dist/service/http/httpInterceptors.jd.ts +1 -0
- package/dist/service/http/httpInterceptors.ts +1 -0
- package/dist/service/http/index.ts +1 -0
- package/dist/service/requestServer.ts +1 -0
- package/dist/utils/connectNativeJsBridge.ts +1 -1
- package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
- package/dist/utils/h5Utils.ts +1 -1
- package/dist/utils/index.h5.ts +1 -1
- package/dist/utils/index.ts +1 -1
- package/dist/utils/index.weapp.ts +1 -1
- package/dist/utils/intersectionObserver.ts +1 -1
- package/dist/utils/jm-common.js +1 -1
- package/dist/utils/memberFormatUtils.js +1 -0
- package/dist/utils/priceUtils.js +1 -0
- package/dist/utils/ready.ts +1 -0
- package/dist/utils/utils.ts +1 -1
- package/package.json +9 -5
- package/dist/components/base/Price/index.module.scss +0 -136
- package/dist/open/api/jump.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useRef, useState } from 'react'
|
|
2
1
|
const [componentShowState, setComponentShowState] = useState(false)
|
|
3
2
|
const componentLazyRef = useRef<HTMLElement | null>(null)
|
|
4
3
|
const componentShowStateRef = useRef(false)
|
|
5
4
|
useEffect(() => {
|
|
6
5
|
const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
|
|
7
6
|
!componentShowStateRef.current && dealPageScrollInfo(latestRes)
|
|
8
7
|
Taro.eventCenter.on(TaroEventType.PAGE_SCROLL, (res) => {
|
|
9
8
|
!componentShowStateRef.current && dealPageScrollInfo(res)
|
|
10
9
|
})
|
|
11
10
|
|
|
12
11
|
if (typeof displayHeight === 'undefined' || typeof offSetY === 'undefined') return
|
|
13
12
|
<View
|
|
14
13
|
ref={componentLazyRef}
|
|
15
14
|
className={classNames(
|
|
16
15
|
imageStyle['d-app-lazy-image'],
|
|
17
16
|
{
|
|
18
17
|
[imageStyle['d-lazy-sku-image']]: isSkuImage,
|
|
19
18
|
},
|
|
20
19
|
{
|
|
21
20
|
[imageStyle['d-hide-image-error']]: imageErrState,
|
|
22
21
|
},
|
|
23
22
|
{
|
|
24
23
|
[imageStyle['d-load-completed']]: loadSuccess,
|
|
25
24
|
},
|
|
26
25
|
{
|
|
27
26
|
'd-imag-rendering-crisp-edges':
|
|
28
27
|
!taroJdBaseInfo.info.pageInfo.isVipShop &&
|
|
29
28
|
imagRenderingSet,
|
|
30
29
|
},
|
|
31
30
|
'J_html5ImageBg',
|
|
32
31
|
className,
|
|
33
32
|
)}
|
|
34
33
|
style={{
|
|
35
34
|
...style,
|
|
36
35
|
...changeStyleIncludeWidthAndHeightAndBgColor(),
|
|
37
36
|
>
|
|
38
37
|
{(componentShowState || lazyLoad === false) && <img
|
|
39
38
|
src={getQualityImage(
|
|
40
39
|
imgSrc,
|
|
41
40
|
taroJdBaseInfo.info.pageInfo.isVipShop
|
|
42
41
|
? NetWorkTypeQuality['perfect']
|
|
43
42
|
: NetWorkTypeQuality[getNetWorkType],
|
|
44
43
|
)}
|
|
45
44
|
onLoad={imageLoad.bind(this, imgSrc)}
|
|
46
45
|
onError={imageError}
|
|
47
46
|
/>}
|
|
48
47
|
</View>
|
|
49
48
|
) : (
|
|
50
49
|
<Image
|
|
51
50
|
style={{
|
|
52
51
|
...style,
|
|
53
52
|
...changeStyleIncludeWidthAndHeightAndBgColor(),
|
|
54
53
|
}}
|
|
55
54
|
className={classNames(
|
|
56
55
|
imageStyle['d-lazy-image'],
|
|
57
56
|
{
|
|
58
57
|
[imageStyle['d-lazy-sku-image']]: isSkuImage,
|
|
59
58
|
},
|
|
60
59
|
{
|
|
61
60
|
[imageStyle['d-hide-image-error']]: imageErrState,
|
|
62
61
|
},
|
|
63
62
|
{
|
|
64
63
|
[imageStyle['d-load-completed']]: loadSuccess,
|
|
65
64
|
},
|
|
66
65
|
{
|
|
67
66
|
'd-imag-rendering-crisp-edges': imagRenderingSet,
|
|
68
67
|
},
|
|
69
68
|
className,
|
|
70
69
|
)}
|
|
71
70
|
src={getQualityImage(
|
|
72
71
|
imgSrc,
|
|
73
72
|
NetWorkTypeQuality[getNetWorkType],
|
|
74
73
|
)}
|
|
75
74
|
lazyLoad={lazyLoad}
|
|
76
75
|
onError={imageError}
|
|
77
76
|
onLoad={imageLoad.bind(this, imgSrc)}
|
|
78
77
|
{...otherOption}
|
|
79
78
|
/>
|
|
80
79
|
)
|
|
80
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react'
|
|
81
81
|
const [componentShowState, setComponentShowState] = useState(false)
|
|
82
82
|
const componentLazyRef = useRef<HTMLElement | null>(null)
|
|
83
83
|
const componentShowStateRef = useRef(false)
|
|
84
84
|
const needShowHighVersion = isH5AndJdShopViewH5Scroll && !(global.info.queryInfo?.downgraded && global.info.queryInfo.downgraded === "true")
|
|
85
85
|
useEffect(() => {
|
|
86
86
|
if(needShowHighVersion) return
|
|
87
87
|
const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
|
|
88
88
|
!componentShowStateRef.current && dealPageScrollInfo(latestRes)
|
|
89
89
|
Taro.eventCenter.on(TaroEventType.PAGE_SCROLL, (res) => {
|
|
90
90
|
!componentShowStateRef.current && dealPageScrollInfo(res)
|
|
91
91
|
})
|
|
92
92
|
|
|
93
93
|
if (typeof displayHeight === 'undefined' || typeof offSetY === 'undefined') return
|
|
94
94
|
<View
|
|
95
95
|
ref={ componentLazyRef }
|
|
96
96
|
className={classNames(
|
|
97
97
|
imageStyle['d-app-lazy-image'],
|
|
98
98
|
{
|
|
99
99
|
[imageStyle['d-lazy-sku-image']]: isSkuImage,
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
[imageStyle['d-hide-image-error']]: imageErrState,
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
[imageStyle['d-load-completed']]: loadSuccess,
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
'd-imag-rendering-crisp-edges':
|
|
109
109
|
!taroJdBaseInfo.info.pageInfo.isVipShop &&
|
|
110
110
|
imagRenderingSet,
|
|
111
111
|
},
|
|
112
112
|
'J_html5ImageBg',
|
|
113
113
|
className,
|
|
114
114
|
)}
|
|
115
115
|
style={{
|
|
116
116
|
...style,
|
|
117
117
|
...changeStyleIncludeWidthAndHeightAndBgColor(),
|
|
118
118
|
>
|
|
119
119
|
{(componentShowState || lazyLoad === false) && <img
|
|
120
120
|
src={getQualityImage(
|
|
121
121
|
imgSrc,
|
|
122
122
|
taroJdBaseInfo.info.pageInfo.isVipShop
|
|
123
123
|
? NetWorkTypeQuality['perfect']
|
|
124
124
|
: NetWorkTypeQuality[getNetWorkType],
|
|
125
125
|
)}
|
|
126
126
|
onLoad={imageLoad.bind(this, imgSrc)}
|
|
127
127
|
onError={imageError}
|
|
128
128
|
/>}
|
|
129
129
|
</View>
|
|
130
130
|
) : (
|
|
131
131
|
<Image
|
|
132
132
|
style={{
|
|
133
133
|
...style,
|
|
134
134
|
...changeStyleIncludeWidthAndHeightAndBgColor(),
|
|
135
135
|
}}
|
|
136
136
|
className={classNames(
|
|
137
137
|
imageStyle['d-lazy-image'],
|
|
138
138
|
{
|
|
139
139
|
[imageStyle['d-lazy-sku-image']]: isSkuImage,
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
[imageStyle['d-hide-image-error']]: imageErrState,
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
145
|
[imageStyle['d-load-completed']]: loadSuccess,
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
148
|
'd-imag-rendering-crisp-edges': imagRenderingSet,
|
|
149
149
|
},
|
|
150
150
|
className,
|
|
151
151
|
)}
|
|
152
152
|
src={getQualityImage(
|
|
153
153
|
imgSrc,
|
|
154
154
|
NetWorkTypeQuality[getNetWorkType],
|
|
155
155
|
)}
|
|
156
156
|
lazyLoad={isChartH5 ? false : lazyLoad}
|
|
157
157
|
onError={imageError}
|
|
158
158
|
onLoad={imageLoad.bind(this, imgSrc)}
|
|
159
159
|
{...otherOption}
|
|
160
160
|
/>
|
|
161
161
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { NETWORK_DATA_TYPE } from '../../../common/const'
|
|
1
|
+
import { NETWORK_DATA_TYPE } from '../../../common/const'
|
|
2
2
|
[NETWORK_DATA_TYPE.NO_NET_WORK]: '网络连接已断开',
|
|
3
3
|
[NETWORK_DATA_TYPE.DATA_ERROR]: '数据加载失败',
|
|
4
4
|
[NETWORK_DATA_TYPE.NO_DATA]: '你访问的内容飞到太空了',
|
|
5
5
|
[NETWORK_DATA_TYPE.RISK]: '活动太火爆',
|
|
6
6
|
[NETWORK_DATA_TYPE.NO_NET_WORK]: '请检查您的网络设置',
|
|
7
7
|
[NETWORK_DATA_TYPE.DATA_ERROR]: '请稍后重试',
|
|
8
8
|
[NETWORK_DATA_TYPE.NO_DATA]: '',
|
|
9
9
|
[NETWORK_DATA_TYPE.RISK]: '页面加载失败,请稍后再试',
|
|
10
10
|
NETWORK_DATA_TYPE.NO_NET_WORK,
|
|
11
11
|
NETWORK_DATA_TYPE.DATA_ERROR,
|
|
12
12
|
NETWORK_DATA_TYPE.NO_DATA,
|
|
13
13
|
NETWORK_DATA_TYPE.RISK,
|
|
14
14
|
No_Data_Bmall:'no-data-bmall',
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
height: 320px;
|
|
31
31
|
background-size: contain;
|
|
32
32
|
background-repeat: no-repeat;
|
|
33
|
+
margin: 0 auto;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
.d-no-network {
|
|
@@ -40,7 +41,9 @@
|
|
|
40
41
|
.d-data-error {
|
|
41
42
|
background-image: url('https://m.360buyimg.com/imagetools/jfs/t1/106708/34/36128/37234/64896f52Fed1530e0/7b403e068aae316c.png');
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
+
.d-risk {
|
|
45
|
+
background-image: url('https://m.360buyimg.com/imagetools/jfs/t1/106708/34/36128/37234/64896f52Fed1530e0/7b403e068aae316c.png');
|
|
46
|
+
}
|
|
44
47
|
.d-no-data {
|
|
45
48
|
background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/190994/19/325/42717/6088fed0Ec4b502d5/0e8de7593fb0d06c.png');
|
|
46
49
|
}
|
|
@@ -50,6 +53,9 @@
|
|
|
50
53
|
.d-no-network-err-tip {
|
|
51
54
|
background-image: url('https://img14.360buyimg.com/imagetools/jfs/t1/146556/1/17745/7493/5fd1e62dE86e86669/96f5c91befa8e991.png');
|
|
52
55
|
}
|
|
56
|
+
.d-no-data-bmall {
|
|
57
|
+
background-image: url('https://img12.360buyimg.com/imagetools/jfs/t1/217798/34/32933/150484/64ccadf3Fde1a93bf/9b1b8929a9631469.png');
|
|
58
|
+
}
|
|
53
59
|
|
|
54
60
|
.d-opt-btn {
|
|
55
61
|
display: flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { Button, View } from '@tarojs/components'
|
|
2
1
|
NetWorkErrorSubTip,
|
|
3
2
|
subMessage,
|
|
4
3
|
backgroundColorWhite,
|
|
5
4
|
const useErrorTip = message != '' ? message : NetWorkErrorTip[netWorkDataType]
|
|
6
5
|
const useErrorSubTip = subMessage? subMessage: NetWorkErrorSubTip[netWorkDataType]
|
|
7
6
|
const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
|
|
8
7
|
const maxHeight = latestRes.displayHeight || 546
|
|
9
8
|
style={{maxHeight}}
|
|
10
9
|
{useErrorSubTip? <View className={netWorkErrorStyle['d-error-sub-tip']}>{useErrorSubTip}</View>: null}
|
|
11
10
|
<Button
|
|
12
11
|
onClick={refershInitData}
|
|
13
12
|
className={classNames(
|
|
14
13
|
netWorkErrorStyle['d-opt-btn'],
|
|
15
14
|
'd-button-no-border',
|
|
16
15
|
)}
|
|
17
16
|
plain
|
|
18
17
|
size="mini"
|
|
19
18
|
>
|
|
20
19
|
重新加载
|
|
21
20
|
</Button>
|
|
22
21
|
)}
|
|
23
22
|
subMessage: '',
|
|
23
|
+
import { Button, View } from '@tarojs/components'
|
|
24
24
|
NetWorkErrorSubTip,
|
|
25
25
|
subMessage,
|
|
26
26
|
backgroundColorWhite,
|
|
27
27
|
const useErrorTip = message != '' ? message : NetWorkErrorTip[netWorkDataType]
|
|
28
28
|
const useErrorSubTip = subMessage? subMessage: NetWorkErrorSubTip[netWorkDataType]
|
|
29
29
|
const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
|
|
30
30
|
const maxHeight = latestRes.displayHeight || 546
|
|
31
31
|
style={{maxHeight: isMemberPage ? '100vh' : maxHeight}}
|
|
32
32
|
{useErrorSubTip? <View className={netWorkErrorStyle['d-error-sub-tip']}>{useErrorSubTip}</View>: null}
|
|
33
33
|
<Button
|
|
34
34
|
onClick={refershInitData}
|
|
35
35
|
className={classNames(
|
|
36
36
|
netWorkErrorStyle['d-opt-btn'],
|
|
37
37
|
'd-button-no-border',
|
|
38
38
|
)}
|
|
39
39
|
plain
|
|
40
40
|
size="mini"
|
|
41
41
|
>
|
|
42
42
|
重新加载
|
|
43
43
|
</Button>
|
|
44
44
|
)}
|
|
45
45
|
subMessage: '',
|
|
File without changes
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
|
|
2
|
+
:global {
|
|
3
|
+
.d-mini-price {
|
|
4
|
+
position: relative;
|
|
5
|
+
color: #f23030;
|
|
6
|
+
display: inline-block;
|
|
7
|
+
font-family: 'JDZhengHT-Regular';
|
|
8
|
+
|
|
9
|
+
&-sym {
|
|
10
|
+
font-size: 22px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.int-txt {
|
|
14
|
+
font-size: 36px;
|
|
15
|
+
}
|
|
16
|
+
.off-shelf {
|
|
17
|
+
color: rgb(162, 164, 172);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.dec-txt {
|
|
21
|
+
font-size: 22px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.sym-sup {
|
|
25
|
+
vertical-align: top;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.dec-sup {
|
|
29
|
+
vertical-align: top;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.del {
|
|
33
|
+
.sym-sub,
|
|
34
|
+
.int-txt,
|
|
35
|
+
.dec-txt {
|
|
36
|
+
font-size: 22px;
|
|
37
|
+
color: #2e2e2e;
|
|
38
|
+
text-decoration: line-through;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
&.d-plus-price,
|
|
42
|
+
&.d-sams-price,
|
|
43
|
+
&.d-sfp-price,
|
|
44
|
+
&.d-member-price {
|
|
45
|
+
&:after {
|
|
46
|
+
content: '';
|
|
47
|
+
display: inline-block;
|
|
48
|
+
margin-left: 5px;
|
|
49
|
+
width: 58px;
|
|
50
|
+
height: 20px;
|
|
51
|
+
background-repeat: no-repeat;
|
|
52
|
+
background-size: contain;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
&.d-price-label {
|
|
56
|
+
&:after {
|
|
57
|
+
// 价格后面追加显示文案例如“到手价”的默认样式
|
|
58
|
+
content: attr(data-after);
|
|
59
|
+
font-size: 20px;
|
|
60
|
+
color: #ffffff;
|
|
61
|
+
margin-left: 8px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
&.d-plus-price {
|
|
65
|
+
.int-txt,
|
|
66
|
+
.sym-sub,
|
|
67
|
+
.dec-txt {
|
|
68
|
+
font-size: 24px;
|
|
69
|
+
color: #232326;
|
|
70
|
+
}
|
|
71
|
+
&:after {
|
|
72
|
+
background-image: url('../../../../assets/plus-icon.png');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
&.d-sams-price {
|
|
76
|
+
.int-txt,
|
|
77
|
+
.sym-sub,
|
|
78
|
+
.dec-txt {
|
|
79
|
+
font-size: 24px;
|
|
80
|
+
color: #1a68bc;
|
|
81
|
+
}
|
|
82
|
+
&:after {
|
|
83
|
+
background-image: url('../../../../assets/jsbundles_jdreactshopactivitytab_images_samprice.png');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
&.d-sfp-price {
|
|
87
|
+
.int-txt,
|
|
88
|
+
.sym-sub,
|
|
89
|
+
.dec-txt {
|
|
90
|
+
font-size: 24px;
|
|
91
|
+
color: #714aff;
|
|
92
|
+
}
|
|
93
|
+
&:after {
|
|
94
|
+
background-image: url('../../../../assets/fans_price@2x.png');
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
&.d-member-price {
|
|
98
|
+
.int-txt,
|
|
99
|
+
.sym-sub,
|
|
100
|
+
.dec-txt {
|
|
101
|
+
font-size: 24px;
|
|
102
|
+
color: #f3c416;
|
|
103
|
+
}
|
|
104
|
+
// 默认v1会员
|
|
105
|
+
&:after {
|
|
106
|
+
background-image: url('https://m.360buyimg.com/cc/jfs/t1/132940/18/11320/4920/5f770610E07069747/92f14ae503ca8b7b.png');
|
|
107
|
+
}
|
|
108
|
+
// v1 会员
|
|
109
|
+
&.d-member-price-tab_214 {
|
|
110
|
+
&:after {
|
|
111
|
+
background-image: url('https://m.360buyimg.com/cc/jfs/t1/132940/18/11320/4920/5f770610E07069747/92f14ae503ca8b7b.png');
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
&.d-member-price-tab_215 {
|
|
115
|
+
&:after {
|
|
116
|
+
background-image: url('https://m.360buyimg.com/cc/jfs/t1/135428/5/11263/5100/5f770623E87b73485/a3624a844f220489.png');
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
&.d-member-price-tab_216 {
|
|
120
|
+
&:after {
|
|
121
|
+
background-image: url('https://m.360buyimg.com/cc/jfs/t1/142590/8/9888/5220/5f770639E992a10a9/1decbf1689dd500c.png');
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
&.d-member-price-tab_217 {
|
|
125
|
+
&:after {
|
|
126
|
+
background-image: url('https://m.360buyimg.com/cc/jfs/t1/128048/23/13979/5063/5f77064aE56b826d7/5e07702ee673629d.png');
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
&.d-member-price-tab_218 {
|
|
130
|
+
&:after {
|
|
131
|
+
background-image: url('https://m.360buyimg.com/cc/jfs/t1/117816/19/19334/5167/5f77065eEbd592fb5/75091c85ca7d0895.png');
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
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: JDZhengHT-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: JDZhengHT-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: JDZhengHT-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
|
+
}
|
|
97
|
+
.priceDescXL {
|
|
98
|
+
font-size: 28px;
|
|
99
|
+
}
|
|
100
|
+
.priceDescL {
|
|
101
|
+
font-size: 26px;
|
|
102
|
+
}
|
|
103
|
+
.priceDescM {
|
|
104
|
+
font-size: 24px;
|
|
105
|
+
}
|
|
106
|
+
.priceDescS {
|
|
107
|
+
font-size: 22px;
|
|
108
|
+
}
|
|
109
|
+
.priceDescXS {
|
|
110
|
+
font-size: 20px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.missPriceDesc {
|
|
114
|
+
}
|
|
115
|
+
.smallStyle {
|
|
116
|
+
color: #8c8c8c;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.smallPrice {
|
|
120
|
+
font-family: JDZhengHT-Regular;
|
|
121
|
+
}
|
|
122
|
+
.smallPriceXL {
|
|
123
|
+
font-size: 28px;
|
|
124
|
+
}
|
|
125
|
+
.smallPriceL {
|
|
126
|
+
font-size: 26px;
|
|
127
|
+
}
|
|
128
|
+
.smallPriceM {
|
|
129
|
+
font-size: 24px;
|
|
130
|
+
}
|
|
131
|
+
.smallPriceS {
|
|
132
|
+
font-size: 22px;
|
|
133
|
+
}
|
|
134
|
+
.smallPriceXS {
|
|
135
|
+
font-size: 20px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.rightMargin {
|
|
139
|
+
margin-right: 16px;
|
|
140
|
+
}
|
|
141
|
+
.plusStyle {
|
|
142
|
+
color: #1c4b8c;
|
|
143
|
+
}
|
|
144
|
+
.fansStyle {
|
|
145
|
+
color: #8450e5;
|
|
146
|
+
}
|
|
147
|
+
.samStyle {
|
|
148
|
+
color: #3981e5;
|
|
149
|
+
}
|
|
150
|
+
.studentStyle {
|
|
151
|
+
color: #30bf26;
|
|
152
|
+
}
|
|
153
|
+
.yhdStyle {
|
|
154
|
+
color: #674431;
|
|
155
|
+
}
|
|
156
|
+
.memberStyle {
|
|
157
|
+
color: #f6b303;
|
|
158
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
const result = String(strPrice).match(/(-?\d+)\.?(\d+)?/);
|
|
1
3
|
if(result && Number(result[0]) > 0){
|
|
2
4
|
return {
|
|
3
5
|
integerPrice: result[1],
|
|
4
6
|
decimalPrice: (result[2] || '').replace(/0+$/, '')
|
|
5
7
|
}
|
|
6
8
|
}else{
|
|
7
9
|
return null;
|
|
8
10
|
}
|
|
9
11
|
const {
|
|
10
12
|
jdPrice,
|
|
11
13
|
finalPrice,
|
|
12
14
|
priceText = '',
|
|
13
15
|
priceType,
|
|
14
16
|
hitUserIdentity = false,
|
|
15
17
|
isAuctionWare,
|
|
16
18
|
fallbackRender = null,
|
|
17
19
|
className = null,
|
|
18
20
|
style = {},
|
|
19
21
|
childrenClassName = null,
|
|
20
22
|
bigNoPriceClassName = null,
|
|
21
23
|
bigSymbolClassName = null,
|
|
22
24
|
bigIntegerClassName = null,
|
|
23
25
|
bigDecimalClassName = null,
|
|
24
26
|
priceDescClassName = null,
|
|
25
27
|
smallPriceClassName = null,
|
|
26
28
|
lineNumber = 1,
|
|
27
29
|
size = 'M'
|
|
28
30
|
} = props
|
|
29
31
|
const especialHitStyleType = {
|
|
30
32
|
7: 'plusStyle',
|
|
31
33
|
9: 'samStyle'
|
|
32
34
|
}
|
|
33
35
|
const especialMissStyleType = {
|
|
34
36
|
7: 'plusStyle',
|
|
35
37
|
8: 'fansStyle',
|
|
36
38
|
9: 'samStyle',
|
|
37
39
|
10: 'studentStyle',
|
|
38
40
|
12: 'yhdStyle',
|
|
39
41
|
13: 'memberStyle'
|
|
40
42
|
}
|
|
41
43
|
const isNoPrice = priceType === 4
|
|
42
44
|
const isUseFinalPriceAsBigPrice = [1, 2, 6, 14, 16, 17, 18].includes(priceType)
|
|
43
45
|
const isEquivalentHit = isUseFinalPriceAsBigPrice || hitUserIdentity
|
|
44
46
|
const bigPriceObj = getDeconstructPrice(isEquivalentHit? finalPrice: jdPrice)
|
|
45
47
|
if(isAuctionWare || (!isNoPrice && bigPriceObj === null)){
|
|
46
48
|
return fallbackRender
|
|
47
49
|
}
|
|
48
50
|
const {integerPrice, decimalPrice = ''} = bigPriceObj || {}
|
|
49
51
|
const isOnlyShowBigPrice = priceType === 3
|
|
50
52
|
const isHideSmallPrice = priceType === 14
|
|
51
53
|
const smallPrice = isEquivalentHit? jdPrice: finalPrice
|
|
52
54
|
const isPriceDescInFront = isEquivalentHit
|
|
53
55
|
const hitColorStyle = isEquivalentHit? styles[especialHitStyleType[priceType]]: null
|
|
54
56
|
const missColorStyle = isEquivalentHit? null: styles[especialMissStyleType[priceType]]
|
|
55
57
|
const isBigPriceHasDecimal = decimalPrice !== '' && !/^0+$/.test(decimalPrice)
|
|
56
58
|
const sizeLineHeight = {
|
|
57
59
|
'XS': 28,
|
|
58
60
|
'S': 34,
|
|
59
61
|
'M': 40,
|
|
60
62
|
'L': 46,
|
|
61
63
|
'XL': 52
|
|
62
64
|
}
|
|
63
65
|
const lineHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25)
|
|
64
66
|
const wrapHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25 * lineNumber)
|
|
65
67
|
const computedHeightStyle = {
|
|
66
68
|
height: wrapHeight
|
|
67
69
|
}
|
|
68
70
|
const itemCommonStyle = {
|
|
69
71
|
height: lineHeight
|
|
70
72
|
}
|
|
71
73
|
const needSizeStyles = ['bigNoPrice', 'bigSymbol', 'bigInteger', 'bigDecimal', 'priceDesc', 'smallPrice']
|
|
72
74
|
const sizeStyles = needSizeStyles.reduce((acc, cur) => {
|
|
73
75
|
acc[cur] = styles[cur + size]
|
|
74
76
|
return acc
|
|
75
77
|
}, {})
|
|
76
78
|
const noPriceShowText = priceText || (/^[\u4e00-\u9fa5]+$/.test(jdPrice)? jdPrice: '')
|
|
77
79
|
return (
|
|
78
80
|
<View className={classNames(styles.wrap, className)} style={{...computedHeightStyle, ...style}}>
|
|
79
81
|
{isNoPrice?
|
|
80
82
|
<Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigNoPrice, sizeStyles['bigNoPrice'], childrenClassName, bigNoPriceClassName)} style={{...itemCommonStyle}}>{noPriceShowText}</Text>
|
|
81
83
|
:
|
|
82
84
|
[
|
|
83
85
|
<Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigSymbol, sizeStyles['bigSymbol'], hitColorStyle, childrenClassName, bigSymbolClassName)} key="bigSymbol" style={{...itemCommonStyle}}>¥</Text>,
|
|
84
86
|
<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>,
|
|
85
87
|
isBigPriceHasDecimal?
|
|
86
88
|
<Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigDecimal, sizeStyles['bigDecimal'], hitColorStyle, isPriceDescInFront ? null : styles.rightMargin, childrenClassName, bigDecimalClassName)} key="bigDecimal" style={{...itemCommonStyle}}>.{decimalPrice}</Text>
|
|
87
89
|
:
|
|
88
90
|
null
|
|
89
91
|
,
|
|
90
92
|
!isOnlyShowBigPrice && [
|
|
91
93
|
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>,
|
|
92
94
|
smallPrice && !isHideSmallPrice ? <Text className={classNames(styles.childStyle, styles.smallPrice, sizeStyles['smallPrice'], styles.smallStyle, missColorStyle, childrenClassName, smallPriceClassName)} key="smallPrice" style={{...itemCommonStyle}}>¥{smallPrice}</Text> : null,
|
|
93
95
|
!isPriceDescInFront && <Text className={classNames(styles.childStyle, styles.priceDesc, sizeStyles['priceDesc'], styles.smallStyle, styles.missPriceDesc, missColorStyle, childrenClassName, priceDescClassName)} key="descBack" style={{...itemCommonStyle}}>{priceText}</Text>
|
|
94
96
|
]
|
|
95
97
|
]
|
|
96
98
|
}
|
|
97
99
|
</View>
|
|
98
100
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { View } from '@tarojs/components'
|
|
2
1
|
selectContainerId,
|
|
3
2
|
placeHolderPreContainerId,
|
|
4
3
|
containerData,
|
|
5
4
|
children,
|
|
6
5
|
style,
|
|
7
6
|
shopTotalInfo,
|
|
8
7
|
} = props;
|
|
9
8
|
return children ? children : null;
|
|
10
9
|
}, [containerData, shopTotalInfo]);
|
|
10
|
+
import { View } from '@tarojs/components'
|
|
11
11
|
selectContainerId,
|
|
12
12
|
placeHolderPreContainerId,
|
|
13
13
|
containerData,
|
|
14
14
|
children,
|
|
15
15
|
style,
|
|
16
16
|
shopTotalInfo,
|
|
17
17
|
} = props;
|
|
18
18
|
return children ? children : null;
|
|
19
19
|
}, [containerData, shopTotalInfo]);
|
|
20
20
|
data-container-empty={containerData?.floors?.[0]?.configEmpty || 'false'}
|