@conecli/cone-render 0.10.1-shop3.5 → 0.10.1-shop3.51
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 +1 -1
- package/dist/common/accessibility.h5.ts +1 -0
- package/dist/common/accessibility.ts +0 -0
- 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/jdplayerSdk.weapp.tsx +1 -0
- package/dist/common/jssdk.ts +1 -1
- package/dist/common/jssdk.weapp.ts +1 -0
- package/dist/common/pageType.ts +1 -1
- package/dist/common/token/index.h5.ts +1 -1
- package/dist/common/token/token.jd.ts +1 -1
- 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.tsx +1 -1
- package/dist/components/base/CustomScrollView/index-back.tsx +1 -0
- package/dist/components/base/CustomScrollView/index.tsx +1 -1
- package/dist/components/base/CustomVideo/index.tsx +1 -1
- package/dist/components/base/CustomVideo/index.weapp.tsx +1 -0
- package/dist/components/base/Dialog/index.module.scss +11 -0
- package/dist/components/base/InOrOutViewObserver/index.weapp.tsx +1 -0
- package/dist/components/base/InViewRender/index.tsx +1 -1
- package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
- package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
- package/dist/components/base/MobileCommonHeader/index.weapp.tsx +1 -0
- package/dist/components/base/NetworkDataError/const.ts +1 -1
- package/dist/components/base/NetworkDataError/index.module.scss +118 -72
- 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 +24 -0
- package/dist/components/base/Price/Double/index.tsx +1 -1
- package/dist/components/debug/DebugLayout/index.module.scss +2 -2
- package/dist/components/floorItem.weapp.tsx +1 -1
- package/dist/interface/common.ts +1 -1
- package/dist/interface/component.ts +1 -1
- package/dist/interface/jumpEventReport.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.weapp.ts +1 -1
- package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
- package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
- package/dist/jumpEventReport/logEventConfig.h5.ts +1 -0
- 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.pc.ts +1 -1
- package/dist/jumpEventReport/web.tjm.ts +1 -1
- 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 -56
- package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
- package/dist/modules/ContainerFloorList/index.tsx +1 -1
- package/dist/modules/DecorateContainerFloorList/index.weapp.tsx +1 -0
- package/dist/open/api/environment.ts +1 -1
- package/dist/open/api/shopMember.ts +1 -1
- package/dist/open/api/shopMember.weapp.ts +1 -0
- package/dist/open/api/util.ts +1 -1
- package/dist/open/index.ts +1 -1
- package/dist/sass/app.h5.scss +278 -224
- package/dist/service/fetchGateway.ts +1 -1
- package/dist/service/fetchGateway.weapp.ts +1 -0
- package/dist/service/fetchJsonp.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 -1
- package/dist/service/http/httpInterceptors.weapp.ts +1 -0
- package/dist/service/requestServer.h5.ts +1 -1
- 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/h5Utils.ts +1 -1
- package/dist/utils/harmonyCallRouter.h5.ts +1 -0
- package/dist/utils/harmonyCallRouter.ts +0 -0
- 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/jumpExtMapUtil.h5.ts +1 -0
- package/dist/utils/jumpExtMapUtil.ts +1 -0
- package/dist/utils/log.ts +1 -0
- package/dist/utils/{sColor.js → sColor.ts} +1 -1
- package/dist/utils/sColor.weapp.ts +1 -0
- package/dist/utils/utils.ts +1 -1
- package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
- package/dist/wxapp/common/user_info.js +1 -1
- package/package.json +160 -141
- package/dist/jumpEventReport/web/wqshop.report.ts +0 -1
- package/dist/utils/priceUtils.js +0 -1
|
@@ -1,94 +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
|
-
|
|
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;
|
|
33
80
|
margin: 0 auto;
|
|
34
|
-
|
|
81
|
+
}
|
|
35
82
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
+
}
|
|
40
87
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
88
|
+
.d-data-error {
|
|
89
|
+
background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/256437/5/21857/22576/67b438adFed8a2665/7df7277fec7e3e8e.png');
|
|
90
|
+
}
|
|
44
91
|
.d-risk {
|
|
45
|
-
background-image: url('https://
|
|
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');
|
|
46
99
|
}
|
|
47
|
-
.d-no-data {
|
|
48
|
-
background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/190994/19/325/42717/6088fed0Ec4b502d5/0e8de7593fb0d06c.png');
|
|
49
|
-
}
|
|
50
|
-
.d-no-data-tip-1 {
|
|
51
|
-
background-image: url('https://img14.360buyimg.com/imagetools/jfs/t1/152550/40/8432/21643/5fc9cae0E5391a506/523da679188ff687.png');
|
|
52
|
-
}
|
|
53
|
-
|
|
54
100
|
.d-no-data-tip-2 {
|
|
55
|
-
background-image: url('https://img11.360buyimg.com/imagetools/jfs/t1/
|
|
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');
|
|
56
105
|
}
|
|
57
|
-
.d-no-network-err-tip {
|
|
58
|
-
background-image: url('https://img14.360buyimg.com/imagetools/jfs/t1/146556/1/17745/7493/5fd1e62dE86e86669/96f5c91befa8e991.png');
|
|
59
|
-
}
|
|
60
106
|
.d-no-data-bmall {
|
|
61
107
|
background-image: url('https://img12.360buyimg.com/imagetools/jfs/t1/217798/34/32933/150484/64ccadf3Fde1a93bf/9b1b8929a9631469.png');
|
|
62
108
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
+
}
|
|
81
127
|
}
|
|
82
128
|
|
|
83
129
|
.d-network-jd-shop-view {
|
|
84
|
-
|
|
130
|
+
min-height: 500px;
|
|
85
131
|
}
|
|
86
132
|
|
|
87
133
|
.d-shop-network-part {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
134
|
+
position: absolute;
|
|
135
|
+
min-height: 500px;
|
|
136
|
+
background: #f2f2f2;
|
|
91
137
|
}
|
|
92
138
|
.d-shop-network-no-position {
|
|
93
|
-
|
|
139
|
+
position: static;
|
|
94
140
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { Button, View } from '@tarojs/components'
|
|
2
1
|
NetWorkErrorList,
|
|
3
2
|
NetWorkErrorTip,
|
|
4
3
|
NetWorkErrorSubTip,
|
|
5
4
|
NetWorkShowType,
|
|
6
5
|
NetWork_Image_Type,
|
|
7
6
|
const {
|
|
8
7
|
className = '',
|
|
9
8
|
message = '',
|
|
10
9
|
subMessage = '',
|
|
11
10
|
btnLabel = '重新加载',
|
|
12
11
|
backgroundColorWhite = false,
|
|
13
12
|
netWorkDataType = NETWORK_DATA_TYPE.NORMAL,
|
|
14
13
|
netWorkImageType = NetWork_Image_Type.No_Data_Default_Tip,
|
|
15
14
|
netWorkShowType = NetWorkShowType.FULL,
|
|
16
15
|
refreshCallBackFn = null,
|
|
17
16
|
viewMaxHeight = '',
|
|
18
17
|
noPosition = false,
|
|
19
18
|
} = props
|
|
20
19
|
const refershInitData = useCallback(() => {
|
|
21
20
|
refreshCallBackFn && refreshCallBackFn(true)
|
|
22
21
|
}, [])
|
|
23
22
|
const useErrorTip = message != '' ? message : NetWorkErrorTip[netWorkDataType]
|
|
24
23
|
const useErrorSubTip = subMessage
|
|
25
24
|
? subMessage
|
|
26
25
|
: NetWorkErrorSubTip[netWorkDataType]
|
|
27
26
|
const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
|
|
28
27
|
const maxHeight = latestRes.displayHeight || 546
|
|
29
28
|
return NetWorkErrorList.includes(netWorkDataType as NETWORK_DATA_TYPE) ? (
|
|
30
29
|
<View
|
|
31
30
|
style={{
|
|
32
31
|
maxHeight:
|
|
33
32
|
viewMaxHeight !== ''
|
|
34
33
|
? viewMaxHeight
|
|
35
34
|
: isMemberPage || isAppStowShop
|
|
36
35
|
? '100vh'
|
|
37
36
|
: maxHeight,
|
|
38
37
|
}}
|
|
39
38
|
className={classNames(
|
|
40
39
|
netWorkErrorStyle['d-shop-network'],
|
|
41
40
|
{
|
|
42
41
|
[netWorkErrorStyle['d-shop-network-white']]: backgroundColorWhite,
|
|
43
42
|
},
|
|
44
43
|
{
|
|
45
44
|
[netWorkErrorStyle['d-shop-network-part']]:
|
|
46
45
|
netWorkShowType === NetWorkShowType.PART,
|
|
47
46
|
},
|
|
48
47
|
{
|
|
49
48
|
[netWorkErrorStyle['d-network-jd-shop-view']]: isH5AndJdShopView,
|
|
50
49
|
},
|
|
51
50
|
{
|
|
52
51
|
[netWorkErrorStyle['d-shop-network-no-position']]: noPosition,
|
|
53
52
|
},
|
|
54
53
|
'flexible-center-box',
|
|
55
54
|
className,
|
|
56
55
|
)}
|
|
57
56
|
>
|
|
58
57
|
<View
|
|
59
58
|
className={classNames(
|
|
60
59
|
netWorkErrorStyle['d-error-content'],
|
|
61
60
|
'd-error-content',
|
|
62
61
|
)}
|
|
63
62
|
>
|
|
64
63
|
<View
|
|
65
64
|
className={classNames(
|
|
66
65
|
netWorkErrorStyle['d-error-type'],
|
|
67
66
|
netWorkErrorStyle[`d-${netWorkDataType}`],
|
|
68
67
|
netWorkErrorStyle[`d-${netWorkImageType}`],
|
|
69
68
|
'd-error-type',
|
|
70
69
|
)}
|
|
71
70
|
/>
|
|
72
71
|
<View
|
|
73
72
|
className={classNames(
|
|
74
73
|
netWorkErrorStyle['d-error-tip'],
|
|
75
74
|
'd-error-tip',
|
|
76
75
|
)}
|
|
77
76
|
>
|
|
78
77
|
{useErrorTip}
|
|
79
78
|
</View>
|
|
80
79
|
{useErrorSubTip ? (
|
|
81
80
|
<View
|
|
82
81
|
className={classNames(
|
|
83
82
|
netWorkErrorStyle['d-error-sub-tip'],
|
|
84
83
|
'd-error-sub-tip',
|
|
85
84
|
)}
|
|
86
85
|
>
|
|
87
86
|
{useErrorSubTip}
|
|
88
87
|
</View>
|
|
89
88
|
) : null}
|
|
90
89
|
<View className={'flexible-horizontal-center-box'}>
|
|
91
90
|
{refreshCallBackFn && (
|
|
92
91
|
<Button
|
|
93
92
|
onClick={refershInitData}
|
|
94
93
|
className={classNames(
|
|
95
94
|
netWorkErrorStyle['d-opt-btn'],
|
|
96
95
|
'd-button-no-border',
|
|
97
96
|
'd-opt-btn',
|
|
98
97
|
)}
|
|
99
98
|
plain
|
|
100
99
|
size="mini"
|
|
101
100
|
>
|
|
102
101
|
{btnLabel}
|
|
103
102
|
</Button>
|
|
104
103
|
)}
|
|
105
104
|
</View>
|
|
106
105
|
</View>
|
|
107
106
|
</View>
|
|
108
107
|
) : null
|
|
108
|
+
import { Button, View } from '@tarojs/components';
|
|
109
109
|
NetWorkErrorList,
|
|
110
110
|
NetWorkErrorTip,
|
|
111
111
|
NetWorkErrorSubTip,
|
|
112
112
|
NetWorkShowType,
|
|
113
113
|
NetWork_Image_Type,
|
|
114
114
|
NetWorkStyleType,
|
|
115
115
|
const {
|
|
116
116
|
className = '',
|
|
117
117
|
message = '',
|
|
118
118
|
subMessage = '',
|
|
119
119
|
btnLabel = global?.languageJsonData?.reload || '重新加载',
|
|
120
120
|
backgroundColorWhite = false,
|
|
121
121
|
netWorkDataType = NETWORK_DATA_TYPE.NORMAL,
|
|
122
122
|
netWorkShowType = NetWorkShowType.FULL,
|
|
123
123
|
netWorkImageType = NetWork_Image_Type.No_Data_Default_Tip,
|
|
124
124
|
netWorkStyleType = NetWorkStyleType.OLD,
|
|
125
125
|
refreshCallBackFn = null,
|
|
126
126
|
viewMaxHeight = '',
|
|
127
127
|
noPosition = false,
|
|
128
128
|
} = props;
|
|
129
129
|
const refershInitData = useCallback(() => {
|
|
130
130
|
refreshCallBackFn && refreshCallBackFn(true);
|
|
131
131
|
}, []);
|
|
132
132
|
const useErrorTip = message != '' ? message : NetWorkErrorTip[netWorkDataType];
|
|
133
133
|
const useErrorSubTip = subMessage
|
|
134
134
|
? subMessage
|
|
135
135
|
: message != ''
|
|
136
136
|
? ''
|
|
137
137
|
: NetWorkErrorSubTip[netWorkDataType];
|
|
138
138
|
const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {};
|
|
139
139
|
const onePlusOneBottomPlaceHeight = global.info?.sysInfo?.onePlusOneBottomPlaceHeight
|
|
140
140
|
? global.info?.sysInfo?.onePlusOneBottomPlaceHeight + 20
|
|
141
141
|
: 0;
|
|
142
142
|
const maxHeight = latestRes.displayHeight || onePlusOneBottomPlaceHeight + 546;
|
|
143
143
|
return NetWorkErrorList.includes(netWorkDataType as NETWORK_DATA_TYPE) ? (
|
|
144
144
|
<View
|
|
145
145
|
style={{
|
|
146
146
|
maxHeight: viewMaxHeight !== '' ? viewMaxHeight : isMemberPage ? '100vh' : maxHeight,
|
|
147
147
|
}}
|
|
148
148
|
className={classNames(
|
|
149
149
|
netWorkErrorStyle['d-shop-network'],
|
|
150
150
|
{
|
|
151
151
|
[netWorkErrorStyle['d-shop-network-white']]: backgroundColorWhite,
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
154
|
[netWorkErrorStyle['d-shop-network-part']]: netWorkShowType === NetWorkShowType.PART,
|
|
155
155
|
},
|
|
156
156
|
{
|
|
157
157
|
[netWorkErrorStyle['d-network-jd-shop-view']]: isH5AndJdShopView,
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
[netWorkErrorStyle['d-shop-network-no-position']]: noPosition,
|
|
161
161
|
},
|
|
162
162
|
'flexible-center-box',
|
|
163
163
|
className,
|
|
164
164
|
)}
|
|
165
165
|
>
|
|
166
166
|
<View
|
|
167
167
|
className={classNames(
|
|
168
168
|
netWorkErrorStyle['d-error-content'],
|
|
169
169
|
netWorkErrorStyle[`d-${netWorkStyleType}-style-content`],
|
|
170
170
|
'd-error-content',
|
|
171
171
|
)}
|
|
172
172
|
>
|
|
173
173
|
<View
|
|
174
174
|
className={classNames(
|
|
175
175
|
netWorkErrorStyle['d-error-type'],
|
|
176
176
|
netWorkErrorStyle[`d-${netWorkDataType}`],
|
|
177
177
|
netWorkErrorStyle[`d-${netWorkImageType}`],
|
|
178
178
|
'd-error-type',
|
|
179
179
|
)}
|
|
180
180
|
/>
|
|
181
181
|
<View
|
|
182
182
|
className={classNames(
|
|
183
183
|
netWorkErrorStyle['d-error-tip'],
|
|
184
184
|
netWorkErrorStyle[`d-${netWorkDataType}-tip`],
|
|
185
185
|
'd-error-tip',
|
|
186
186
|
)}
|
|
187
187
|
>
|
|
188
188
|
{useErrorTip}
|
|
189
189
|
</View>
|
|
190
190
|
{useErrorSubTip ? (
|
|
191
191
|
<View
|
|
192
192
|
className={classNames(
|
|
193
193
|
netWorkErrorStyle['d-error-sub-tip'],
|
|
194
194
|
netWorkErrorStyle[`d-${netWorkDataType}-sub-tip`],
|
|
195
195
|
'd-error-sub-tip',
|
|
196
196
|
)}
|
|
197
197
|
>
|
|
198
198
|
{useErrorSubTip}
|
|
199
199
|
</View>
|
|
200
200
|
) : null}
|
|
201
201
|
<View className={'flexible-horizontal-center-box'}>
|
|
202
202
|
{refreshCallBackFn && (
|
|
203
203
|
<Button
|
|
204
204
|
onClick={refershInitData}
|
|
205
205
|
className={classNames(
|
|
206
206
|
netWorkErrorStyle['d-opt-btn'],
|
|
207
207
|
'd-button-no-border',
|
|
208
208
|
'd-opt-btn',
|
|
209
209
|
)}
|
|
210
210
|
plain
|
|
211
211
|
size="mini"
|
|
212
212
|
>
|
|
213
213
|
{btnLabel}
|
|
214
214
|
</Button>
|
|
215
215
|
)}
|
|
216
216
|
</View>
|
|
217
217
|
</View>
|
|
218
218
|
</View>
|
|
219
219
|
) : 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
|
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, { useEffect, useRef } 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,
|
|
68
68
|
symPos,
|
|
69
69
|
symbol,
|
|
70
70
|
decPos,
|
|
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,
|
|
80
80
|
decToIntegerState,
|
|
81
81
|
isPlusPrice,
|
|
82
82
|
isSamsPrice,
|
|
83
83
|
isMemberPrice,
|
|
84
84
|
isSfpPrice,
|
|
85
85
|
memberPriceIcon,
|
|
86
86
|
isShowPriceLabel,
|
|
87
87
|
priceLabelText,
|
|
88
88
|
priceTextColor,
|
|
89
89
|
useFontV2 = false,
|
|
90
90
|
useFontV2Bold = false,
|
|
91
91
|
} = props;
|
|
92
92
|
const cRef = useRef<any>(null);
|
|
93
93
|
useEffect(() => {
|
|
94
94
|
if (isShowPriceLabel && priceTextColor && cRef.current) {
|
|
95
95
|
cRef.current?.style?.setProperty('--after-ele-color', priceTextColor);
|
|
96
96
|
}
|
|
97
97
|
}, [isShowPriceLabel, priceTextColor]);
|
|
98
98
|
const cls = classNames(
|
|
99
99
|
className ? `${className}` : '',
|
|
100
100
|
prefixCls,
|
|
101
101
|
{
|
|
102
102
|
'd-font-v2': useFontV2,
|
|
103
103
|
'd-font-v2-bold': useFontV2Bold,
|
|
104
104
|
},
|
|
105
105
|
'd-imag-rendering-crisp-edges',
|
|
106
106
|
{
|
|
107
107
|
del: status === 'del',
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
110
|
'd-plus-price': isPlusPrice,
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
113
|
'd-sams-price': isSamsPrice,
|
|
114
114
|
},
|
|
115
115
|
{
|
|
116
116
|
'd-sfp-price': isSfpPrice,
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
119
|
'd-member-price': isMemberPrice,
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
[`d-member-price-${memberPriceIcon}`]: memberPriceIcon,
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
'd-price-label': isShowPriceLabel,
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
128
|
'd-price-text-clor': isShowPriceLabel && priceTextColor,
|
|
129
129
|
},
|
|
130
130
|
);
|
|
131
131
|
const symCls = classNames(symClassName ? `${symClassName}` : '', {
|
|
132
132
|
'sym-sub': symPos === 'sub',
|
|
133
133
|
'sym-sup': symPos === 'sup',
|
|
134
134
|
});
|
|
135
135
|
const intCls = classNames(intClassName ? `${intClassName}` : '');
|
|
136
136
|
const decCls = classNames(decClassName ? `${decClassName}` : '', {
|
|
137
137
|
'dec-sub': decPos === 'sub',
|
|
138
138
|
'dec-sup': decPos === 'sup',
|
|
139
139
|
});
|
|
140
140
|
const noPriceCls = classNames(noPriceClassName ? `${noPriceClassName}` : '');
|
|
141
141
|
const { currencySymbol, intVal, decimalVal } = dealPrice(
|
|
142
142
|
value,
|
|
143
143
|
decLength,
|
|
144
144
|
symbol,
|
|
145
145
|
decToIntegerState,
|
|
146
146
|
);
|
|
147
147
|
return (
|
|
148
148
|
<View
|
|
149
149
|
ref={cRef}
|
|
150
150
|
className={cls}
|
|
151
151
|
style={style}
|
|
152
152
|
data-after={isShowPriceLabel ? priceLabelText : ''}
|
|
153
153
|
>
|
|
154
154
|
{intVal === '-1' ? (
|
|
155
155
|
<Text className={`${prefixCls}-txt int-txt off-shelf ${noPriceCls}`}>{`暂无报价`}</Text>
|
|
156
156
|
) : (
|
|
157
157
|
<>
|
|
158
158
|
<Text className={`${prefixCls}-sym ${symCls}`}>{currencySymbol}</Text>
|
|
159
159
|
<Text className={`${prefixCls}-txt int-txt ${intCls}`}>{intVal}</Text>
|
|
160
160
|
{!!decimalVal && (
|
|
161
161
|
<Text className={`${prefixCls}-txt dec-txt ${decCls}`}>.{decimalVal}</Text>
|
|
162
162
|
)}
|
|
163
163
|
</>
|
|
164
164
|
)}
|
|
165
165
|
</View>
|
|
166
166
|
);
|
|
167
167
|
prefixCls: 'd-mini-price',
|
|
168
168
|
style: {},
|
|
169
169
|
status: '',
|
|
170
170
|
symbol: '¥',
|
|
171
171
|
symPos: 'sub',
|
|
172
172
|
decLength: 2,
|
|
173
173
|
decPos: 'sub',
|
|
174
174
|
decToIntegerState: false,
|
|
175
175
|
isPlusPrice: false,
|
|
176
176
|
isShowPriceLabel: false,
|
|
177
177
|
priceLabelText: '到手价',
|
|
178
178
|
priceTextColor: '',
|
|
179
179
|
useFontV2: false,
|
|
180
180
|
useFontV2Bold: false,
|
|
@@ -117,6 +117,24 @@
|
|
|
117
117
|
.priceDescXS {
|
|
118
118
|
font-size: 20px;
|
|
119
119
|
}
|
|
120
|
+
.priceUnit {
|
|
121
|
+
font-family: PingFang SC;
|
|
122
|
+
}
|
|
123
|
+
.priceUnitXL {
|
|
124
|
+
font-size: 26px;
|
|
125
|
+
}
|
|
126
|
+
.priceUnitL {
|
|
127
|
+
font-size: 24px;
|
|
128
|
+
}
|
|
129
|
+
.priceUnitM {
|
|
130
|
+
font-size: 22px;
|
|
131
|
+
}
|
|
132
|
+
.priceUnitS {
|
|
133
|
+
font-size: 20px;
|
|
134
|
+
}
|
|
135
|
+
.priceUnitXS {
|
|
136
|
+
font-size: 18px;
|
|
137
|
+
}
|
|
120
138
|
|
|
121
139
|
.missPriceDesc {
|
|
122
140
|
}
|
|
@@ -164,3 +182,9 @@
|
|
|
164
182
|
.memberStyle {
|
|
165
183
|
color: #f6b303;
|
|
166
184
|
}
|
|
185
|
+
.fontV2 {
|
|
186
|
+
font-family: 'JDZhengHeiV2-Regular';
|
|
187
|
+
}
|
|
188
|
+
.fontV2Bold {
|
|
189
|
+
font-family: 'JDZhengHeiV2-Bold';
|
|
190
|
+
}
|