@conecli/cone-render 0.8.19 → 0.8.20-beta.2
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/README.md +7 -1
- package/dist/api/index.ts +1 -1
- package/dist/assets/icon_blue_info.svg +1 -0
- package/dist/common/const.ts +1 -1
- package/dist/common/environmentType.ts +1 -0
- 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/jdplayerSdk.ts +1 -0
- package/dist/common/jssdk.ts +1 -0
- package/dist/common/pageType.ts +1 -0
- package/dist/common/sgmCustomCode.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/common/wxappApi.jd.ts +1 -0
- package/dist/common/wxappApi.ts +1 -1
- package/dist/components/ErrorBoundary.tsx +1 -1
- package/dist/components/base/CommonFloorHead/index.module.scss +126 -111
- package/dist/components/base/CommonFloorHead/index.tsx +1 -1
- package/dist/components/base/CountDown/index.module.scss +49 -44
- package/dist/components/base/CountDown/index.tsx +1 -1
- package/dist/components/base/CustomScrollView/index.jd.tsx +1 -0
- package/dist/components/base/CustomScrollView/index.module.scss +7 -0
- package/dist/components/base/CustomScrollView/index.tsx +1 -1
- package/dist/components/base/CustomVideo/common.ts +1 -0
- 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 +22 -2
- package/dist/components/base/Dialog/index.tsx +1 -1
- package/dist/components/base/Exposure/index.h5.tsx +1 -1
- package/dist/components/base/ExposureSmart/const.ts +1 -0
- package/dist/components/base/ExposureSmart/index.h5.module.scss +30 -6
- 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/LazyLayoutLoad/index.weapp.tsx +1 -1
- package/dist/components/base/LazyLoadImage/const.ts +1 -1
- package/dist/components/base/LazyLoadImage/index.h5.module.scss +24 -20
- package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
- package/dist/components/base/MobileCommonHeader/index.module.scss +17 -0
- package/dist/components/base/MobileCommonHeader/index.tsx +1 -0
- package/dist/components/base/NetworkDataError/const.ts +1 -1
- package/dist/components/base/NetworkDataError/index.module.scss +128 -69
- 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 +148 -0
- package/dist/components/base/Price/Base/index.tsx +1 -0
- package/dist/components/base/Price/Double/index.module.scss +190 -0
- package/dist/components/base/Price/Double/index.tsx +1 -0
- package/dist/components/base/Price/index.tsx +1 -1
- package/dist/components/base/ShopLeGaoTag/index.h5.module.scss +35 -0
- package/dist/components/base/ShopLeGaoTag/index.h5.tsx +1 -0
- package/dist/components/base/ShopLeGaoTag/index.module.scss +33 -0
- package/dist/components/base/ShopLeGaoTag/index.tsx +1 -0
- package/dist/components/base/Skeleton/index.tsx +1 -1
- package/dist/components/debug/DebugLayout/index.module.scss +67 -0
- package/dist/components/debug/DebugLayout/index.tsx +1 -0
- package/dist/components/debug/DebugLayout/utils.ts +1 -0
- package/dist/components/decorate/DecorateFloorModule/index.module.scss +32 -2
- 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/floorItem.weapp.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/interface/utils.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.jd.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.jxwxapp.ts +1 -0
- package/dist/jumpEventReport/web.pc.ts +1 -0
- package/dist/jumpEventReport/web.tjapp.ts +1 -0
- package/dist/jumpEventReport/web.tjm.ts +1 -0
- package/dist/jumpEventReport/web.wxapp.ts +1 -1
- package/dist/language/en_US.json +231 -0
- package/dist/language/zh_CN.json +231 -0
- package/dist/language/zh_HK.json +231 -0
- package/dist/libs/taroAppReport.js +2 -2
- package/dist/modules/ContainerFloorList/index.h5.module.scss +66 -27
- 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/environment.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/sass/app.h5.scss +294 -212
- package/dist/sass/base.scss +195 -137
- 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/fetchGateway.weapp.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/h5Http.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.h5.ts +1 -0
- package/dist/service/http/index.ts +1 -0
- package/dist/service/requestServer.h5.ts +1 -0
- package/dist/service/requestServer.ts +1 -0
- package/dist/service/requestServer.weapp.ts +1 -0
- package/dist/utils/connectNativeJsBridge.ts +1 -1
- package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
- package/dist/utils/draExceptionAndProfile.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/jumpExtMapUtil.h5.ts +1 -0
- package/dist/utils/jumpExtMapUtil.ts +1 -0
- package/dist/utils/priceUtils.js +1 -0
- package/dist/utils/ready.ts +1 -0
- package/dist/utils/sColor.js +1 -0
- package/dist/utils/sgmCodeUtils.ts +1 -0
- package/dist/utils/taroRenderUtil.ts +1 -0
- package/dist/utils/utils.ts +1 -1
- package/dist/wxapp/api/helper.js +1 -0
- package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
- package/dist/wxapp/common/user_info.js +1 -1
- package/dist/wxapp/components/launch-app/index.js +1 -0
- package/dist/wxapp/components/launch-app/index.json +5 -0
- package/dist/wxapp/components/launch-app/index.wxml +0 -0
- package/dist/wxapp/components/launch-app/index.wxss +0 -0
- package/dist/wxapp/components/subscribe-guider/helper.js +1 -0
- package/dist/wxapp/components/subscribe-guider/index.js +1 -0
- package/dist/wxapp/components/subscribe-guider/index.json +5 -0
- package/dist/wxapp/components/subscribe-guider/index.wxml +0 -0
- package/dist/wxapp/components/subscribe-guider/index.wxss +0 -0
- package/package.json +145 -114
- package/dist/components/base/Price/index.module.scss +0 -136
- package/dist/components/base/Skeleton/old.tsx +0 -1
- package/dist/customHooks/useDocumentVisibilitychange.ts +0 -1
- package/dist/open/api/jump.ts +0 -1
|
@@ -1,81 +1,140 @@
|
|
|
1
1
|
|
|
2
2
|
.d-shop-network {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
position: fixed;
|
|
4
|
+
top: 0;
|
|
5
|
+
left: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
bottom: 0;
|
|
8
|
+
background: #e5e5e5;
|
|
9
|
+
&.d-shop-network-white {
|
|
10
|
+
background-color: #fff;
|
|
11
|
+
}
|
|
12
|
+
.d-error-content {
|
|
13
|
+
text-align: center;
|
|
14
|
+
&.d-new-style-content {
|
|
15
|
+
.d-data-error,
|
|
16
|
+
.d-no-data,
|
|
17
|
+
.d-no-data-tip-1,
|
|
18
|
+
.d-no-data-tip-2 {
|
|
19
|
+
width: 240px;
|
|
20
|
+
height: 240px;
|
|
21
|
+
background: url('https://img11.360buyimg.com/imagetools/jfs/t1/256437/5/21857/22576/67b438adFed8a2665/7df7277fec7e3e8e.png')
|
|
22
|
+
0 0 /240px 240px no-repeat;
|
|
23
|
+
}
|
|
24
|
+
.d-data-error-tip {
|
|
25
|
+
padding-bottom: 24px;
|
|
26
|
+
line-height: 38px;
|
|
27
|
+
font-size: 32px;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
color: #1a1a1a;
|
|
30
|
+
}
|
|
31
|
+
.d-data-error-sub-tip {
|
|
32
|
+
margin: 0;
|
|
33
|
+
font-size: 24px;
|
|
34
|
+
color: #505259;
|
|
35
|
+
}
|
|
36
|
+
.d-no-data-tip {
|
|
37
|
+
line-height: 44px;
|
|
38
|
+
font-size: 24px;
|
|
39
|
+
font-weight: normal;
|
|
40
|
+
color: #505259;
|
|
41
|
+
}
|
|
42
|
+
.d-no-data-sub-tip {
|
|
43
|
+
margin: 0;
|
|
44
|
+
font-weight: normal;
|
|
45
|
+
color: #505259;
|
|
46
|
+
}
|
|
47
|
+
.d-opt-btn {
|
|
48
|
+
width: 160px;
|
|
49
|
+
height: 64px;
|
|
50
|
+
line-height: 64px;
|
|
51
|
+
font-size: 28px;
|
|
52
|
+
color: #1a1a1a;
|
|
53
|
+
border-radius: 12px;
|
|
54
|
+
border: none;
|
|
55
|
+
|
|
56
|
+
&:after{
|
|
57
|
+
border: 1PX solid #C2C4CC;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
15
62
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
63
|
+
.d-error-tip {
|
|
64
|
+
font-size: 28px;
|
|
65
|
+
font-weight: bold;
|
|
66
|
+
line-height: 28px;
|
|
67
|
+
color: #1a1a1a;
|
|
68
|
+
}
|
|
69
|
+
.d-error-sub-tip {
|
|
70
|
+
margin-top: 16px;
|
|
71
|
+
font-size: 24px;
|
|
72
|
+
line-height: 24px;
|
|
73
|
+
color: #8c8c8c;
|
|
74
|
+
}
|
|
75
|
+
.d-error-type {
|
|
76
|
+
width: 320px;
|
|
77
|
+
height: 320px;
|
|
78
|
+
background-size: contain;
|
|
79
|
+
background-repeat: no-repeat;
|
|
80
|
+
margin: 0 auto;
|
|
81
|
+
}
|
|
34
82
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
83
|
+
.d-no-network {
|
|
84
|
+
// background-image: url('https://m.360buyimg.com/imagetools/jfs/t1/219405/34/29129/32963/64892a0eF2c068392/86c3fcf9d980ff10.png');
|
|
85
|
+
background-image: url('../../../assets/networkError.png');
|
|
86
|
+
}
|
|
39
87
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
88
|
+
.d-data-error {
|
|
89
|
+
background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/256437/5/21857/22576/67b438adFed8a2665/7df7277fec7e3e8e.png');
|
|
90
|
+
}
|
|
91
|
+
.d-risk {
|
|
92
|
+
background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/256437/5/21857/22576/67b438adFed8a2665/7df7277fec7e3e8e.png');
|
|
93
|
+
}
|
|
94
|
+
.d-no-data {
|
|
95
|
+
background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/256437/5/21857/22576/67b438adFed8a2665/7df7277fec7e3e8e.png');
|
|
96
|
+
}
|
|
97
|
+
.d-no-data-tip-1 {
|
|
98
|
+
background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/256437/5/21857/22576/67b438adFed8a2665/7df7277fec7e3e8e.png');
|
|
99
|
+
}
|
|
100
|
+
.d-no-data-tip-2 {
|
|
101
|
+
background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/256437/5/21857/22576/67b438adFed8a2665/7df7277fec7e3e8e.png');
|
|
102
|
+
}
|
|
103
|
+
.d-no-network-err-tip {
|
|
104
|
+
background-image: url('https://img14.360buyimg.com/imagetools/jfs/t1/146556/1/17745/7493/5fd1e62dE86e86669/96f5c91befa8e991.png');
|
|
105
|
+
}
|
|
106
|
+
.d-no-data-bmall {
|
|
107
|
+
background-image: url('https://img12.360buyimg.com/imagetools/jfs/t1/217798/34/32933/150484/64ccadf3Fde1a93bf/9b1b8929a9631469.png');
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.d-opt-btn {
|
|
111
|
+
display: flex;
|
|
112
|
+
justify-content: center;
|
|
113
|
+
align-items: center;
|
|
114
|
+
width: 144px;
|
|
115
|
+
height: 56px;
|
|
116
|
+
margin-top: 32px;
|
|
117
|
+
padding: 0;
|
|
118
|
+
font-size: 24px;
|
|
119
|
+
color: #fa2c19;
|
|
120
|
+
border: 1px solid #fa2c19;
|
|
121
|
+
box-sizing: border-box;
|
|
122
|
+
border-radius: 48px;
|
|
123
|
+
&:active {
|
|
124
|
+
opacity: 0.8;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
71
127
|
}
|
|
72
128
|
|
|
73
129
|
.d-network-jd-shop-view {
|
|
74
|
-
|
|
130
|
+
min-height: 500px;
|
|
75
131
|
}
|
|
76
132
|
|
|
77
133
|
.d-shop-network-part {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
134
|
+
position: absolute;
|
|
135
|
+
min-height: 500px;
|
|
136
|
+
background: #f2f2f2;
|
|
137
|
+
}
|
|
138
|
+
.d-shop-network-no-position {
|
|
139
|
+
position: static;
|
|
81
140
|
}
|
|
@@ -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
|
NetWorkErrorList,
|
|
25
25
|
NetWorkErrorTip,
|
|
26
26
|
NetWorkErrorSubTip,
|
|
27
27
|
NetWorkShowType,
|
|
28
28
|
NetWork_Image_Type,
|
|
29
29
|
NetWorkStyleType,
|
|
30
30
|
const {
|
|
31
31
|
className = '',
|
|
32
32
|
message = '',
|
|
33
33
|
subMessage = '',
|
|
34
34
|
btnLabel = global?.languageJsonData?.reload || '重新加载',
|
|
35
35
|
backgroundColorWhite = false,
|
|
36
36
|
netWorkDataType = NETWORK_DATA_TYPE.NORMAL,
|
|
37
37
|
netWorkShowType = NetWorkShowType.FULL,
|
|
38
38
|
netWorkImageType = NetWork_Image_Type.No_Data_Default_Tip,
|
|
39
39
|
netWorkStyleType = NetWorkStyleType.OLD,
|
|
40
40
|
refreshCallBackFn = null,
|
|
41
41
|
viewMaxHeight = '',
|
|
42
42
|
noPosition = false,
|
|
43
43
|
} = props;
|
|
44
44
|
const refershInitData = useCallback(() => {
|
|
45
45
|
refreshCallBackFn && refreshCallBackFn(true);
|
|
46
46
|
}, []);
|
|
47
47
|
const useErrorTip = message != '' ? message : NetWorkErrorTip[netWorkDataType];
|
|
48
48
|
const useErrorSubTip = subMessage
|
|
49
49
|
? subMessage
|
|
50
50
|
: message != ''
|
|
51
51
|
? ''
|
|
52
52
|
: NetWorkErrorSubTip[netWorkDataType];
|
|
53
53
|
const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {};
|
|
54
54
|
const onePlusOneBottomPlaceHeight = global.info?.sysInfo?.onePlusOneBottomPlaceHeight
|
|
55
55
|
? global.info?.sysInfo?.onePlusOneBottomPlaceHeight + 20
|
|
56
56
|
: 0;
|
|
57
57
|
const maxHeight = latestRes.displayHeight || onePlusOneBottomPlaceHeight + 546;
|
|
58
58
|
return NetWorkErrorList.includes(netWorkDataType as NETWORK_DATA_TYPE) ? (
|
|
59
59
|
<View
|
|
60
60
|
style={{
|
|
61
61
|
maxHeight: viewMaxHeight !== '' ? viewMaxHeight : isMemberPage ? '100vh' : maxHeight,
|
|
62
62
|
}}
|
|
63
63
|
className={classNames(
|
|
64
64
|
netWorkErrorStyle['d-shop-network'],
|
|
65
65
|
{
|
|
66
66
|
[netWorkErrorStyle['d-shop-network-white']]: backgroundColorWhite,
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
[netWorkErrorStyle['d-shop-network-part']]: netWorkShowType === NetWorkShowType.PART,
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
[netWorkErrorStyle['d-network-jd-shop-view']]: isH5AndJdShopView,
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
[netWorkErrorStyle['d-shop-network-no-position']]: noPosition,
|
|
76
76
|
},
|
|
77
77
|
'flexible-center-box',
|
|
78
78
|
className,
|
|
79
79
|
)}
|
|
80
80
|
>
|
|
81
81
|
<View
|
|
82
82
|
className={classNames(
|
|
83
83
|
netWorkErrorStyle['d-error-content'],
|
|
84
84
|
netWorkErrorStyle[`d-${netWorkStyleType}-style-content`],
|
|
85
85
|
'd-error-content',
|
|
86
86
|
)}
|
|
87
87
|
>
|
|
88
88
|
<View
|
|
89
89
|
className={classNames(
|
|
90
90
|
netWorkErrorStyle['d-error-type'],
|
|
91
91
|
netWorkErrorStyle[`d-${netWorkDataType}`],
|
|
92
92
|
netWorkErrorStyle[`d-${netWorkImageType}`],
|
|
93
93
|
'd-error-type',
|
|
94
94
|
)}
|
|
95
95
|
/>
|
|
96
96
|
<View
|
|
97
97
|
className={classNames(
|
|
98
98
|
netWorkErrorStyle['d-error-tip'],
|
|
99
99
|
netWorkErrorStyle[`d-${netWorkDataType}-tip`],
|
|
100
100
|
'd-error-tip',
|
|
101
101
|
)}
|
|
102
102
|
>
|
|
103
103
|
{useErrorTip}
|
|
104
104
|
</View>
|
|
105
105
|
{useErrorSubTip ? (
|
|
106
106
|
<View
|
|
107
107
|
className={classNames(
|
|
108
108
|
netWorkErrorStyle['d-error-sub-tip'],
|
|
109
109
|
netWorkErrorStyle[`d-${netWorkDataType}-sub-tip`],
|
|
110
110
|
'd-error-sub-tip',
|
|
111
111
|
)}
|
|
112
112
|
>
|
|
113
113
|
{useErrorSubTip}
|
|
114
114
|
</View>
|
|
115
115
|
) : null}
|
|
116
116
|
<View className={'flexible-horizontal-center-box'}>
|
|
117
117
|
{refreshCallBackFn && (
|
|
118
118
|
<Button
|
|
119
119
|
onClick={refershInitData}
|
|
120
120
|
className={classNames(
|
|
121
121
|
netWorkErrorStyle['d-opt-btn'],
|
|
122
122
|
'd-button-no-border',
|
|
123
123
|
'd-opt-btn',
|
|
124
124
|
)}
|
|
125
125
|
plain
|
|
126
126
|
size="mini"
|
|
127
127
|
>
|
|
128
128
|
{btnLabel}
|
|
129
129
|
</Button>
|
|
130
130
|
)}
|
|
131
131
|
</View>
|
|
132
132
|
</View>
|
|
133
133
|
</View>
|
|
134
134
|
) : null;
|
|
File without changes
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
|
|
2
|
+
:global {
|
|
3
|
+
.d-mini-price {
|
|
4
|
+
--after-ele-color: '';
|
|
5
|
+
position: relative;
|
|
6
|
+
color: #f23030;
|
|
7
|
+
display: inline-block;
|
|
8
|
+
font-family: 'JDZhengHT-Regular';
|
|
9
|
+
&.d-font-v2 {
|
|
10
|
+
font-family: 'JDZhengHeiV2-Regular';
|
|
11
|
+
}
|
|
12
|
+
&.d-font-v2-bold {
|
|
13
|
+
font-family: 'JDZhengHeiV2-Bold';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&-sym {
|
|
17
|
+
font-size: 22px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.int-txt {
|
|
21
|
+
font-size: 36px;
|
|
22
|
+
}
|
|
23
|
+
.off-shelf {
|
|
24
|
+
color: rgb(162, 164, 172);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.dec-txt {
|
|
28
|
+
font-size: 22px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.sym-sup {
|
|
32
|
+
vertical-align: top;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.dec-sup {
|
|
36
|
+
vertical-align: top;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.del {
|
|
40
|
+
.sym-sub,
|
|
41
|
+
.int-txt,
|
|
42
|
+
.dec-txt {
|
|
43
|
+
font-size: 22px;
|
|
44
|
+
color: #2e2e2e;
|
|
45
|
+
text-decoration: line-through;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
&.d-plus-price,
|
|
49
|
+
&.d-sams-price,
|
|
50
|
+
&.d-sfp-price,
|
|
51
|
+
&.d-member-price {
|
|
52
|
+
&:after {
|
|
53
|
+
content: '';
|
|
54
|
+
display: inline-block;
|
|
55
|
+
margin-left: 5px;
|
|
56
|
+
width: 58px;
|
|
57
|
+
height: 20px;
|
|
58
|
+
background-repeat: no-repeat;
|
|
59
|
+
background-size: contain;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
&.d-price-label {
|
|
63
|
+
&:after {
|
|
64
|
+
// 价格后面追加显示文案例如“到手价”的默认样式
|
|
65
|
+
content: attr(data-after);
|
|
66
|
+
font-size: 20px;
|
|
67
|
+
color: #ffffff;
|
|
68
|
+
margin-left: 8px;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
&.d-price-text-clor {
|
|
72
|
+
&:after {
|
|
73
|
+
color: var(--after-ele-color) !important;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
&.d-plus-price {
|
|
77
|
+
.int-txt,
|
|
78
|
+
.sym-sub,
|
|
79
|
+
.dec-txt {
|
|
80
|
+
font-size: 24px;
|
|
81
|
+
color: #232326;
|
|
82
|
+
}
|
|
83
|
+
&:after {
|
|
84
|
+
background-image: url('../../../../assets/plus-icon.png');
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
&.d-sams-price {
|
|
88
|
+
.int-txt,
|
|
89
|
+
.sym-sub,
|
|
90
|
+
.dec-txt {
|
|
91
|
+
font-size: 24px;
|
|
92
|
+
color: #1a68bc;
|
|
93
|
+
}
|
|
94
|
+
&:after {
|
|
95
|
+
background-image: url('../../../../assets/jsbundles_jdreactshopactivitytab_images_samprice.png');
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
&.d-sfp-price {
|
|
99
|
+
.int-txt,
|
|
100
|
+
.sym-sub,
|
|
101
|
+
.dec-txt {
|
|
102
|
+
font-size: 24px;
|
|
103
|
+
color: #714aff;
|
|
104
|
+
}
|
|
105
|
+
&:after {
|
|
106
|
+
background-image: url('../../../../assets/fans_price@2x.png');
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
&.d-member-price {
|
|
110
|
+
.int-txt,
|
|
111
|
+
.sym-sub,
|
|
112
|
+
.dec-txt {
|
|
113
|
+
font-size: 24px;
|
|
114
|
+
color: #f3c416;
|
|
115
|
+
}
|
|
116
|
+
// 默认v1会员
|
|
117
|
+
&:after {
|
|
118
|
+
background-image: url('https://m.360buyimg.com/cc/jfs/t1/132940/18/11320/4920/5f770610E07069747/92f14ae503ca8b7b.png');
|
|
119
|
+
}
|
|
120
|
+
// v1 会员
|
|
121
|
+
&.d-member-price-tab_214 {
|
|
122
|
+
&:after {
|
|
123
|
+
background-image: url('https://m.360buyimg.com/cc/jfs/t1/132940/18/11320/4920/5f770610E07069747/92f14ae503ca8b7b.png');
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
&.d-member-price-tab_215 {
|
|
127
|
+
&:after {
|
|
128
|
+
background-image: url('https://m.360buyimg.com/cc/jfs/t1/135428/5/11263/5100/5f770623E87b73485/a3624a844f220489.png');
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
&.d-member-price-tab_216 {
|
|
132
|
+
&:after {
|
|
133
|
+
background-image: url('https://m.360buyimg.com/cc/jfs/t1/142590/8/9888/5220/5f770639E992a10a9/1decbf1689dd500c.png');
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
&.d-member-price-tab_217 {
|
|
137
|
+
&:after {
|
|
138
|
+
background-image: url('https://m.360buyimg.com/cc/jfs/t1/128048/23/13979/5063/5f77064aE56b826d7/5e07702ee673629d.png');
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
&.d-member-price-tab_218 {
|
|
142
|
+
&:after {
|
|
143
|
+
background-image: url('https://m.360buyimg.com/cc/jfs/t1/117816/19/19334/5167/5f77065eEbd592fb5/75091c85ca7d0895.png');
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import React, { useEffect, useRef } 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,
|
|
44
46
|
symPos,
|
|
45
47
|
symbol,
|
|
46
48
|
decPos,
|
|
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,
|
|
56
58
|
decToIntegerState,
|
|
57
59
|
isPlusPrice,
|
|
58
60
|
isSamsPrice,
|
|
59
61
|
isMemberPrice,
|
|
60
62
|
isSfpPrice,
|
|
61
63
|
memberPriceIcon,
|
|
62
64
|
isShowPriceLabel,
|
|
63
65
|
priceLabelText,
|
|
64
66
|
priceTextColor,
|
|
65
67
|
useFontV2 = false,
|
|
66
68
|
useFontV2Bold = false,
|
|
67
69
|
} = props;
|
|
68
70
|
const cRef = useRef<any>(null);
|
|
69
71
|
useEffect(() => {
|
|
70
72
|
if (isShowPriceLabel && priceTextColor && cRef.current) {
|
|
71
73
|
cRef.current?.style?.setProperty('--after-ele-color', priceTextColor);
|
|
72
74
|
}
|
|
73
75
|
}, [isShowPriceLabel, priceTextColor]);
|
|
74
76
|
const cls = classNames(
|
|
75
77
|
className ? `${className}` : '',
|
|
76
78
|
prefixCls,
|
|
77
79
|
{
|
|
78
80
|
'd-font-v2': useFontV2,
|
|
79
81
|
'd-font-v2-bold': useFontV2Bold,
|
|
80
82
|
},
|
|
81
83
|
'd-imag-rendering-crisp-edges',
|
|
82
84
|
{
|
|
83
85
|
del: status === 'del',
|
|
84
86
|
},
|
|
85
87
|
{
|
|
86
88
|
'd-plus-price': isPlusPrice,
|
|
87
89
|
},
|
|
88
90
|
{
|
|
89
91
|
'd-sams-price': isSamsPrice,
|
|
90
92
|
},
|
|
91
93
|
{
|
|
92
94
|
'd-sfp-price': isSfpPrice,
|
|
93
95
|
},
|
|
94
96
|
{
|
|
95
97
|
'd-member-price': isMemberPrice,
|
|
96
98
|
},
|
|
97
99
|
{
|
|
98
100
|
[`d-member-price-${memberPriceIcon}`]: memberPriceIcon,
|
|
99
101
|
},
|
|
100
102
|
{
|
|
101
103
|
'd-price-label': isShowPriceLabel,
|
|
102
104
|
},
|
|
103
105
|
{
|
|
104
106
|
'd-price-text-clor': isShowPriceLabel && priceTextColor,
|
|
105
107
|
},
|
|
106
108
|
);
|
|
107
109
|
const symCls = classNames(symClassName ? `${symClassName}` : '', {
|
|
108
110
|
'sym-sub': symPos === 'sub',
|
|
109
111
|
'sym-sup': symPos === 'sup',
|
|
110
112
|
});
|
|
111
113
|
const intCls = classNames(intClassName ? `${intClassName}` : '');
|
|
112
114
|
const decCls = classNames(decClassName ? `${decClassName}` : '', {
|
|
113
115
|
'dec-sub': decPos === 'sub',
|
|
114
116
|
'dec-sup': decPos === 'sup',
|
|
115
117
|
});
|
|
116
118
|
const noPriceCls = classNames(noPriceClassName ? `${noPriceClassName}` : '');
|
|
117
119
|
const { currencySymbol, intVal, decimalVal } = dealPrice(
|
|
118
120
|
value,
|
|
119
121
|
decLength,
|
|
120
122
|
symbol,
|
|
121
123
|
decToIntegerState,
|
|
122
124
|
);
|
|
123
125
|
return (
|
|
124
126
|
<View
|
|
125
127
|
ref={cRef}
|
|
126
128
|
className={cls}
|
|
127
129
|
style={style}
|
|
128
130
|
data-after={isShowPriceLabel ? priceLabelText : ''}
|
|
129
131
|
>
|
|
130
132
|
{intVal === '-1' ? (
|
|
131
133
|
<Text className={`${prefixCls}-txt int-txt off-shelf ${noPriceCls}`}>{`暂无报价`}</Text>
|
|
132
134
|
) : (
|
|
133
135
|
<>
|
|
134
136
|
<Text className={`${prefixCls}-sym ${symCls}`}>{currencySymbol}</Text>
|
|
135
137
|
<Text className={`${prefixCls}-txt int-txt ${intCls}`}>{intVal}</Text>
|
|
136
138
|
{!!decimalVal && (
|
|
137
139
|
<Text className={`${prefixCls}-txt dec-txt ${decCls}`}>.{decimalVal}</Text>
|
|
138
140
|
)}
|
|
139
141
|
</>
|
|
140
142
|
)}
|
|
141
143
|
</View>
|
|
142
144
|
);
|
|
143
145
|
prefixCls: 'd-mini-price',
|
|
144
146
|
style: {},
|
|
145
147
|
status: '',
|
|
146
148
|
symbol: '¥',
|
|
147
149
|
symPos: 'sub',
|
|
148
150
|
decLength: 2,
|
|
149
151
|
decPos: 'sub',
|
|
150
152
|
decToIntegerState: false,
|
|
151
153
|
isPlusPrice: false,
|
|
152
154
|
isShowPriceLabel: false,
|
|
153
155
|
priceLabelText: '到手价',
|
|
154
156
|
priceTextColor: '',
|
|
155
157
|
useFontV2: false,
|
|
156
158
|
useFontV2Bold: false,
|