@conecli/cone-render 0.8.20-beta.0 → 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/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/index.h5.ts +1 -1
- package/dist/common/token/token.jd.ts +1 -1
- package/dist/common/token/token.ts +1 -1
- 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/index.tsx +1 -1
- package/dist/components/base/Dialog/index.module.scss +16 -0
- 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 +125 -69
- package/dist/components/base/NetworkDataError/index.tsx +1 -1
- package/dist/components/base/Price/Base/index.module.scss +12 -0
- package/dist/components/base/Price/Base/index.tsx +1 -1
- package/dist/components/base/Price/Double/index.module.scss +32 -0
- package/dist/components/base/Price/Double/index.tsx +1 -1
- 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 -1
- 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 -1
- 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 copy.ts +1 -1
- package/dist/open/api/request.ts +1 -1
- package/dist/open/api/shopMember.ts +1 -1
- package/dist/open/api/track.ts +1 -1
- 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 -1
- package/dist/service/fetchGateway.ts +1 -1
- package/dist/service/fetchGateway.weapp.ts +1 -0
- package/dist/service/http/colorSign.ts +1 -1
- package/dist/service/http/const.ts +1 -1
- package/dist/service/http/h5Http.ts +1 -0
- package/dist/service/http/index.h5.ts +1 -0
- package/dist/service/requestServer.h5.ts +1 -0
- package/dist/service/requestServer.ts +1 -1
- 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/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 -115
- package/dist/components/base/Skeleton/old.tsx +0 -1
- package/dist/customHooks/useDocumentVisibilitychange.ts +0 -1
- package/dist/utils/memberFormatUtils.js +0 -1
- /package/dist/service/{bMallConst.wxapp.ts → bMallConst.weapp.ts} +0 -0
- /package/dist/service/http/{colorSign.wxapp.ts → colorSign.weapp.ts} +0 -0
|
@@ -1,84 +1,140 @@
|
|
|
1
1
|
|
|
2
2
|
.d-shop-network {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
+
}
|
|
34
62
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
+
}
|
|
39
82
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
+
}
|
|
43
87
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
+
}
|
|
53
106
|
.d-no-data-bmall {
|
|
54
107
|
background-image: url('https://img12.360buyimg.com/imagetools/jfs/t1/217798/34/32933/150484/64ccadf3Fde1a93bf/9b1b8929a9631469.png');
|
|
55
108
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
+
}
|
|
74
127
|
}
|
|
75
128
|
|
|
76
129
|
.d-network-jd-shop-view {
|
|
77
|
-
|
|
130
|
+
min-height: 500px;
|
|
78
131
|
}
|
|
79
132
|
|
|
80
133
|
.d-shop-network-part {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
134
|
+
position: absolute;
|
|
135
|
+
min-height: 500px;
|
|
136
|
+
background: #f2f2f2;
|
|
137
|
+
}
|
|
138
|
+
.d-shop-network-no-position {
|
|
139
|
+
position: static;
|
|
84
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: isMemberPage ? '100vh' : 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;
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
:global {
|
|
3
3
|
.d-mini-price {
|
|
4
|
+
--after-ele-color: '';
|
|
4
5
|
position: relative;
|
|
5
6
|
color: #f23030;
|
|
6
7
|
display: inline-block;
|
|
7
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
|
+
}
|
|
8
15
|
|
|
9
16
|
&-sym {
|
|
10
17
|
font-size: 22px;
|
|
@@ -61,6 +68,11 @@
|
|
|
61
68
|
margin-left: 8px;
|
|
62
69
|
}
|
|
63
70
|
}
|
|
71
|
+
&.d-price-text-clor {
|
|
72
|
+
&:after {
|
|
73
|
+
color: var(--after-ele-color) !important;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
64
76
|
&.d-plus-price {
|
|
65
77
|
.int-txt,
|
|
66
78
|
.sym-sub,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
priceLabelText: "到手价"
|
|
2
|
+
import React, { useEffect, useRef } from 'react';
|
|
3
3
|
let value = `${initValue}`;
|
|
4
4
|
if (!cnPriceTextList.includes(value)) {
|
|
5
5
|
if (value && !/^[0123456789-]*$/.test(value.substring(0, 1))) {
|
|
6
6
|
symbol = value.substring(0, 1);
|
|
7
7
|
value = value.substring(1);
|
|
8
8
|
}
|
|
9
9
|
if (/^\d+(\.\d+)?[eE][+-]?\d+$/.test(value)) {
|
|
10
10
|
sgmCustomReport({
|
|
11
11
|
code: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_basePrice`),
|
|
12
12
|
msg: {
|
|
13
13
|
price: value,
|
|
14
14
|
originalPrice: initValue,
|
|
15
15
|
msg: '当前价格为科学计数数据,上报关注该价格',
|
|
16
16
|
},
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
if (!decToIntegerState) {
|
|
20
20
|
value = parseFloat(value).toFixed(decLength);
|
|
21
21
|
} else {
|
|
22
22
|
if (value.indexOf('.') !== -1) {
|
|
23
23
|
value = parseFloat(value).toFixed(decLength);
|
|
24
24
|
value = `${value}`.replace(/0+$/, '');
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
if (value === 'NaN') {
|
|
28
28
|
sgmCustomReport({
|
|
29
29
|
code: getSgmCustomCode(`${SgmCustomCode.PRICE_RENDER}_basePrice`),
|
|
30
30
|
msg: {
|
|
31
31
|
price: value,
|
|
32
32
|
originalPrice: initValue,
|
|
33
33
|
msg: '价格转换异常,兜底展示暂无报价',
|
|
34
34
|
},
|
|
35
35
|
});
|
|
36
36
|
value = '暂无报价';
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
const [intVal, decimalVal] = `${value}`.split('.');
|
|
40
40
|
return {
|
|
41
41
|
currencySymbol: !cnPriceTextList.includes(intVal) ? symbol : '',
|
|
42
42
|
intVal,
|
|
43
43
|
decimalVal,
|
|
44
44
|
};
|
|
45
45
|
const {
|
|
46
46
|
prefixCls,
|
|
47
47
|
symPos,
|
|
48
48
|
symbol,
|
|
49
49
|
decPos,
|
|
50
50
|
status,
|
|
51
51
|
className,
|
|
52
52
|
style,
|
|
53
53
|
symClassName,
|
|
54
54
|
intClassName,
|
|
55
55
|
decClassName,
|
|
56
56
|
noPriceClassName,
|
|
57
57
|
value,
|
|
58
58
|
decLength,
|
|
59
59
|
decToIntegerState,
|
|
60
60
|
isPlusPrice,
|
|
61
61
|
isSamsPrice,
|
|
62
62
|
isMemberPrice,
|
|
63
63
|
isSfpPrice,
|
|
64
64
|
memberPriceIcon,
|
|
65
65
|
isShowPriceLabel,
|
|
66
66
|
priceLabelText,
|
|
67
67
|
priceTextColor,
|
|
68
68
|
useFontV2 = false,
|
|
69
69
|
useFontV2Bold = false,
|
|
70
70
|
} = props;
|
|
71
71
|
const cRef = useRef<any>(null);
|
|
72
72
|
useEffect(() => {
|
|
73
73
|
if (isShowPriceLabel && priceTextColor && cRef.current) {
|
|
74
74
|
cRef.current?.style?.setProperty('--after-ele-color', priceTextColor);
|
|
75
75
|
}
|
|
76
76
|
}, [isShowPriceLabel, priceTextColor]);
|
|
77
77
|
const cls = classNames(
|
|
78
78
|
className ? `${className}` : '',
|
|
79
79
|
prefixCls,
|
|
80
80
|
{
|
|
81
81
|
'd-font-v2': useFontV2,
|
|
82
82
|
'd-font-v2-bold': useFontV2Bold,
|
|
83
83
|
},
|
|
84
84
|
'd-imag-rendering-crisp-edges',
|
|
85
85
|
{
|
|
86
86
|
del: status === 'del',
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
'd-plus-price': isPlusPrice,
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
'd-sams-price': isSamsPrice,
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
'd-sfp-price': isSfpPrice,
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
'd-member-price': isMemberPrice,
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
101
|
[`d-member-price-${memberPriceIcon}`]: memberPriceIcon,
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
'd-price-label': isShowPriceLabel,
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
107
|
'd-price-text-clor': isShowPriceLabel && priceTextColor,
|
|
108
108
|
},
|
|
109
109
|
);
|
|
110
110
|
const symCls = classNames(symClassName ? `${symClassName}` : '', {
|
|
111
111
|
'sym-sub': symPos === 'sub',
|
|
112
112
|
'sym-sup': symPos === 'sup',
|
|
113
113
|
});
|
|
114
114
|
const intCls = classNames(intClassName ? `${intClassName}` : '');
|
|
115
115
|
const decCls = classNames(decClassName ? `${decClassName}` : '', {
|
|
116
116
|
'dec-sub': decPos === 'sub',
|
|
117
117
|
'dec-sup': decPos === 'sup',
|
|
118
118
|
});
|
|
119
119
|
const noPriceCls = classNames(noPriceClassName ? `${noPriceClassName}` : '');
|
|
120
120
|
const { currencySymbol, intVal, decimalVal } = dealPrice(
|
|
121
121
|
value,
|
|
122
122
|
decLength,
|
|
123
123
|
symbol,
|
|
124
124
|
decToIntegerState,
|
|
125
125
|
);
|
|
126
126
|
return (
|
|
127
127
|
<View
|
|
128
128
|
ref={cRef}
|
|
129
129
|
className={cls}
|
|
130
130
|
style={style}
|
|
131
131
|
data-after={isShowPriceLabel ? priceLabelText : ''}
|
|
132
132
|
>
|
|
133
133
|
{intVal === '-1' ? (
|
|
134
134
|
<Text className={`${prefixCls}-txt int-txt off-shelf ${noPriceCls}`}>{`暂无报价`}</Text>
|
|
135
135
|
) : (
|
|
136
136
|
<>
|
|
137
137
|
<Text className={`${prefixCls}-sym ${symCls}`}>{currencySymbol}</Text>
|
|
138
138
|
<Text className={`${prefixCls}-txt int-txt ${intCls}`}>{intVal}</Text>
|
|
139
139
|
{!!decimalVal && (
|
|
140
140
|
<Text className={`${prefixCls}-txt dec-txt ${decCls}`}>.{decimalVal}</Text>
|
|
141
141
|
)}
|
|
142
142
|
</>
|
|
143
143
|
)}
|
|
144
144
|
</View>
|
|
145
145
|
);
|
|
146
146
|
prefixCls: 'd-mini-price',
|
|
147
147
|
style: {},
|
|
148
148
|
status: '',
|
|
149
149
|
symbol: '¥',
|
|
150
150
|
symPos: 'sub',
|
|
151
151
|
decLength: 2,
|
|
152
152
|
decPos: 'sub',
|
|
153
153
|
decToIntegerState: false,
|
|
154
154
|
isPlusPrice: false,
|
|
155
155
|
isShowPriceLabel: false,
|
|
156
156
|
priceLabelText: '到手价',
|
|
157
157
|
priceTextColor: '',
|
|
158
158
|
useFontV2: false,
|
|
159
159
|
useFontV2Bold: false,
|
|
@@ -93,6 +93,14 @@
|
|
|
93
93
|
.priceDesc {
|
|
94
94
|
margin-left: 4px;
|
|
95
95
|
font-family: PingFang SC;
|
|
96
|
+
&.priceHiddenDesc {
|
|
97
|
+
width: 0;
|
|
98
|
+
visibility: hidden;
|
|
99
|
+
}
|
|
100
|
+
&.priceEnDesc {
|
|
101
|
+
width: 0;
|
|
102
|
+
visibility: hidden;
|
|
103
|
+
}
|
|
96
104
|
}
|
|
97
105
|
.priceDescXL {
|
|
98
106
|
font-size: 28px;
|
|
@@ -109,6 +117,24 @@
|
|
|
109
117
|
.priceDescXS {
|
|
110
118
|
font-size: 20px;
|
|
111
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
|
+
}
|
|
112
138
|
|
|
113
139
|
.missPriceDesc {
|
|
114
140
|
}
|
|
@@ -156,3 +182,9 @@
|
|
|
156
182
|
.memberStyle {
|
|
157
183
|
color: #f6b303;
|
|
158
184
|
}
|
|
185
|
+
.fontV2 {
|
|
186
|
+
font-family: 'JDZhengHeiV2-Regular';
|
|
187
|
+
}
|
|
188
|
+
.fontV2Bold {
|
|
189
|
+
font-family: 'JDZhengHeiV2-Bold';
|
|
190
|
+
}
|