@conecli/cone-render 0.10.1-shop-beta.22 → 0.10.1-shop-beta.24
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/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.weapp.ts +1 -0
- package/dist/common/pageType.ts +1 -1
- package/dist/common/token/token.jd.ts +1 -1
- package/dist/components/ErrorBoundary.tsx +1 -1
- package/dist/components/base/CountDown/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/ExposureSmart/index.h5.tsx +1 -1
- package/dist/components/base/ExposureSmart/index.tsx +1 -1
- package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
- package/dist/components/base/InOrOutViewObserver/index.weapp.tsx +1 -0
- package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
- package/dist/components/base/JdLoading/index.module.scss +0 -2
- package/dist/components/base/JdLoading/index.tsx +1 -1
- package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
- package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
- package/dist/components/base/LazyLoadImage/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.tsx +1 -1
- package/dist/components/base/Price/Base/index.tsx +1 -1
- package/dist/components/base/Price/Double/index.module.scss +18 -0
- package/dist/components/base/Price/Double/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/floorItem.tsx +1 -1
- package/dist/components/isv/Floor/index.tsx +1 -1
- package/dist/components/remoteFloorItem.tsx +1 -1
- package/dist/config/env.ts +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/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.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.wxapp.ts +1 -1
- package/dist/language/en_US.json +179 -83
- package/dist/language/zh_CN.json +178 -82
- package/dist/language/zh_HK.json +178 -82
- package/dist/libs/openShopBridge.js +161 -0
- package/dist/libs/openShopBridge.min.js +1 -0
- package/dist/libs/taroAppReport.js +2 -2
- package/dist/modules/ContainerFloorList/index.h5.module.scss +16 -2
- 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/index.ts +1 -1
- package/dist/open/api/shopMember.weapp.ts +1 -0
- 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/open/index.ts +1 -1
- package/dist/sass/app.h5.scss +6 -1
- package/dist/service/fetchGateway.ts +1 -1
- package/dist/service/fetchGateway.weapp.ts +1 -1
- package/dist/service/fetchJsonp.ts +1 -1
- package/dist/service/fetchJsonp.weapp.ts +1 -0
- package/dist/service/http/h5Http.ts +1 -1
- package/dist/service/http/http.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 -1
- 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/intersectionObserver.ts +1 -1
- package/dist/utils/sColor.weapp.ts +1 -0
- package/dist/utils/utils.ts +1 -1
- package/package.json +13 -15
- package/dist/common/index.dynamic.ts +0 -1
- package/dist/components/base/Dialog/index.dynamic.module.scss +0 -126
- package/dist/components/base/Dialog/index.dynamic.tsx +0 -1
- package/dist/components/base/DynamicTest/index.dynamic.module.scss +0 -15
- package/dist/components/base/DynamicTest/index.module.scss +0 -16
- package/dist/components/base/DynamicTest/index.tsx +0 -1
- package/dist/components/base/LazyLoadImage/index.dynamic.module.scss +0 -40
- package/dist/components/base/LazyLoadImage/index.dynamic.tsx +0 -1
- package/dist/components/base/NetworkDataError/index.dynamic.module.scss +0 -95
- package/dist/components/base/NetworkDataError/index.dynamic.tsx +0 -1
- package/dist/components/base/Price/Base/index.dynamic.module.scss +0 -63
- package/dist/components/base/Price/Base/index.dynamic.tsx +0 -1
- package/dist/components/base/Price/Double/index.dynamic.module.scss +0 -172
- package/dist/components/base/Price/Double/index.dynamic.tsx +0 -1
- package/dist/jumpEventReport/index.dynamic.ts +0 -1
- package/dist/jumpEventReport/web/wqshop.report.ts +0 -1
- package/dist/open/api/shopMember.dynamic.ts +0 -1
- package/dist/open/components/index.dynamic.ts +0 -1
- package/dist/sass/app.dynamic.scss +0 -306
- package/dist/service/fetchGateway.h5.ts +0 -1
- package/dist/service/fetchJsonp.h5.ts +0 -1
- package/dist/service/http/colorSign.dynamic.ts +0 -1
- package/dist/utils/connectNativeJsBridge.dynamic.ts +0 -1
- package/dist/utils/priceUtils.js +0 -1
- /package/dist/utils/{sColor.js → sColor.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import React, { useCallback, useState } from 'react'
|
|
2
1
|
const {
|
|
3
2
|
src = null,
|
|
4
3
|
lazyLoad = true,
|
|
5
4
|
imagRenderingSet = true,
|
|
6
5
|
width = null,
|
|
7
6
|
height = null,
|
|
8
7
|
className = null,
|
|
9
8
|
isSkuImage = false,
|
|
10
9
|
hideErrorImage = false,
|
|
11
10
|
style = null,
|
|
12
11
|
backgroundColor = null,
|
|
13
12
|
errorSrc = null,
|
|
14
13
|
onLoad = null,
|
|
15
14
|
onError = null,
|
|
16
15
|
...otherOption
|
|
17
16
|
} = props
|
|
18
17
|
getNetWorkType === NetWorkTypeQuality.default &&
|
|
19
18
|
(getNetWorkType = taroJdBaseInfo.info.sysInfo.netWorkType)
|
|
20
19
|
const [loadSuccess, setLoadSuccess] = useState(false)
|
|
21
20
|
const [imgSrc, setImgSrc] = useState(src)
|
|
22
21
|
const [imageErrState, setImageErrState] = useState(false)
|
|
23
22
|
const imageError = useCallback(
|
|
24
23
|
(e) => {
|
|
25
24
|
console.log('图片加载错误', e)
|
|
26
25
|
errorSrc && setImgSrc(errorSrc)
|
|
27
26
|
hideErrorImage && setImageErrState(true)
|
|
28
27
|
typeof onError === 'function' && onError(e, src, props)
|
|
29
28
|
},
|
|
30
29
|
[src],
|
|
31
30
|
)
|
|
32
31
|
|
|
33
32
|
const imageLoad = useCallback(
|
|
34
33
|
(event) => {
|
|
35
34
|
setLoadSuccess(true)
|
|
36
35
|
typeof onLoad === 'function' && onLoad(event, src, props)
|
|
37
36
|
},
|
|
38
37
|
[src],
|
|
39
38
|
)
|
|
40
39
|
|
|
41
40
|
const changeStyleIncludeWidthAndHeightAndBgColor = () => {
|
|
42
41
|
const changeStyle = {}
|
|
43
42
|
width && (changeStyle['width'] = width)
|
|
44
43
|
height && (changeStyle['height'] = height)
|
|
45
44
|
backgroundColor && (changeStyle['backgroundColor'] = backgroundColor)
|
|
46
45
|
return changeStyle
|
|
47
46
|
}
|
|
48
47
|
return (
|
|
49
48
|
<Image
|
|
50
49
|
style={{
|
|
51
50
|
...style,
|
|
52
51
|
...changeStyleIncludeWidthAndHeightAndBgColor(),
|
|
53
52
|
}}
|
|
54
53
|
className={classNames(
|
|
55
54
|
imageStyle['d-lazy-image'],
|
|
56
55
|
{
|
|
57
56
|
[imageStyle['d-lazy-sku-image']]: isSkuImage,
|
|
58
57
|
},
|
|
59
58
|
{
|
|
60
59
|
[imageStyle['d-hide-image-error']]: imageErrState,
|
|
61
60
|
},
|
|
62
61
|
{
|
|
63
62
|
[imageStyle['d-load-completed']]: loadSuccess,
|
|
64
63
|
},
|
|
65
64
|
{
|
|
66
65
|
'd-imag-rendering-crisp-edges': imagRenderingSet,
|
|
67
66
|
},
|
|
68
67
|
className,
|
|
69
68
|
)}
|
|
70
69
|
src={getQualityImage(imgSrc, NetWorkTypeQuality[getNetWorkType])}
|
|
71
70
|
lazyLoad={lazyLoad}
|
|
72
71
|
onError={imageError}
|
|
73
72
|
onLoad={imageLoad}
|
|
74
73
|
{...otherOption}
|
|
75
74
|
/>
|
|
76
75
|
)
|
|
76
|
+
import React, { useCallback, useState } from 'react'
|
|
77
77
|
const {
|
|
78
78
|
src = null,
|
|
79
79
|
lazyLoad = true,
|
|
80
80
|
imagRenderingSet = true,
|
|
81
81
|
width = null,
|
|
82
82
|
height = null,
|
|
83
83
|
className = null,
|
|
84
84
|
isSkuImage = false,
|
|
85
85
|
hideErrorImage = false,
|
|
86
86
|
style = null,
|
|
87
87
|
backgroundColor = null,
|
|
88
88
|
errorSrc = null,
|
|
89
89
|
onLoad = null,
|
|
90
90
|
onError = null,
|
|
91
91
|
...otherOption
|
|
92
92
|
} = props
|
|
93
93
|
getNetWorkType === NetWorkTypeQuality.default &&
|
|
94
94
|
(getNetWorkType = taroJdBaseInfo.info.sysInfo.netWorkType)
|
|
95
95
|
const [loadSuccess, setLoadSuccess] = useState(false)
|
|
96
96
|
const [imgSrc, setImgSrc] = useState(src)
|
|
97
97
|
const [imageErrState, setImageErrState] = useState(false)
|
|
98
98
|
const imageError = useCallback(
|
|
99
99
|
(e) => {
|
|
100
100
|
console.log('图片加载错误', e)
|
|
101
101
|
errorSrc && setImgSrc(errorSrc)
|
|
102
102
|
hideErrorImage && setImageErrState(true)
|
|
103
103
|
typeof onError === 'function' && onError(e, src, props)
|
|
104
104
|
},
|
|
105
105
|
[src],
|
|
106
106
|
)
|
|
107
107
|
|
|
108
108
|
const imageLoad = useCallback(
|
|
109
109
|
(event) => {
|
|
110
110
|
setLoadSuccess(true)
|
|
111
111
|
typeof onLoad === 'function' && onLoad(event, src, props)
|
|
112
112
|
},
|
|
113
113
|
[src],
|
|
114
114
|
)
|
|
115
115
|
|
|
116
116
|
const changeStyleIncludeWidthAndHeightAndBgColor = () => {
|
|
117
117
|
const changeStyle = {}
|
|
118
118
|
width && (changeStyle['width'] = width)
|
|
119
119
|
height && (changeStyle['height'] = height)
|
|
120
120
|
backgroundColor && (changeStyle['backgroundColor'] = backgroundColor)
|
|
121
121
|
return changeStyle
|
|
122
122
|
}
|
|
123
123
|
return (
|
|
124
124
|
<Image
|
|
125
125
|
style={{
|
|
126
126
|
...style,
|
|
127
127
|
...changeStyleIncludeWidthAndHeightAndBgColor(),
|
|
128
128
|
}}
|
|
129
129
|
className={classNames(
|
|
130
130
|
imageStyle['d-lazy-image'],
|
|
131
131
|
{
|
|
132
132
|
[imageStyle['d-lazy-sku-image']]: isSkuImage,
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
135
|
[imageStyle['d-hide-image-error']]: imageErrState,
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
138
|
[imageStyle['d-load-completed']]: loadSuccess,
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
141
|
'd-imag-rendering-crisp-edges': imagRenderingSet,
|
|
142
142
|
},
|
|
143
143
|
className,
|
|
144
144
|
)}
|
|
145
145
|
src={getQualityImage(imgSrc, NetWorkTypeQuality[getNetWorkType])}
|
|
146
146
|
lazyLoad={lazyLoad}
|
|
147
147
|
onError={imageError}
|
|
148
148
|
onLoad={imageLoad}
|
|
149
149
|
{...otherOption}
|
|
150
150
|
/>
|
|
151
151
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { NETWORK_DATA_TYPE } from '../../../common/const';
|
|
2
1
|
[NETWORK_DATA_TYPE.NO_NET_WORK]: global?.languageJsonData?.loseNetwork || '网络连接已断开',
|
|
3
2
|
[NETWORK_DATA_TYPE.DATA_ERROR]:
|
|
4
3
|
global?.languageJsonData?.highTraffic || '活动太火爆,访问人数较多',
|
|
5
4
|
[NETWORK_DATA_TYPE.NO_DATA]: global?.languageJsonData?.highTraffic || '活动太火爆,访问人数较多',
|
|
6
5
|
[NETWORK_DATA_TYPE.RISK]: global?.languageJsonData?.highTraffic || '活动太火爆,访问人数较多',
|
|
7
6
|
[NETWORK_DATA_TYPE.NO_NET_WORK]: global?.languageJsonData?.checkNetwork || '请检查您的网络设置',
|
|
8
7
|
[NETWORK_DATA_TYPE.DATA_ERROR]:
|
|
9
8
|
global?.languageJsonData?.pageLoadFailed || '排队进场中,请稍后再试',
|
|
10
9
|
[NETWORK_DATA_TYPE.NO_DATA]: global?.languageJsonData?.pageLoadFailed || '排队进场中,请稍后再试',
|
|
11
10
|
[NETWORK_DATA_TYPE.RISK]: `${
|
|
12
11
|
global?.languageJsonData?.pageLoadFailed || '排队进场中,请稍后再试'
|
|
13
12
|
}。`,
|
|
14
13
|
NETWORK_DATA_TYPE.NO_NET_WORK,
|
|
15
14
|
NETWORK_DATA_TYPE.DATA_ERROR,
|
|
16
15
|
NETWORK_DATA_TYPE.NO_DATA,
|
|
17
16
|
NETWORK_DATA_TYPE.RISK,
|
|
18
17
|
PART: 'part',
|
|
19
18
|
FULL: 'full',
|
|
20
19
|
No_Data_Default_Tip: 'no-data-default-tip',
|
|
21
20
|
No_Data_Tip_1: 'no-data-tip-1',
|
|
22
21
|
No_Data_Tip_2: 'no-data-tip-2',
|
|
23
22
|
No_Network_Err_Tip: 'no-network',
|
|
24
23
|
No_Data_Bmall: 'no-data-bmall',
|
|
25
24
|
noData: 'no-data-empty',
|
|
26
25
|
netWorkErr: 'network-err',
|
|
27
26
|
searchEmpty: 'search-empty',
|
|
28
27
|
shopClose: 'shop-close',
|
|
29
28
|
OLD: 'old',
|
|
30
29
|
NEW: 'new',
|
|
30
|
+
import { NETWORK_DATA_TYPE } from '../../../common/const';
|
|
31
31
|
[NETWORK_DATA_TYPE.NO_NET_WORK]: global?.languageJsonData?.loseNetwork || '网络连接已断开',
|
|
32
32
|
[NETWORK_DATA_TYPE.DATA_ERROR]:
|
|
33
33
|
global?.languageJsonData?.highTraffic || '活动太火爆,访问人数较多',
|
|
34
34
|
[NETWORK_DATA_TYPE.NO_DATA]: global?.languageJsonData?.highTraffic || '活动太火爆,访问人数较多',
|
|
35
35
|
[NETWORK_DATA_TYPE.RISK]: global?.languageJsonData?.highTraffic || '活动太火爆,访问人数较多',
|
|
36
36
|
[NETWORK_DATA_TYPE.NO_NET_WORK]: global?.languageJsonData?.checkNetwork || '请检查您的网络设置',
|
|
37
37
|
[NETWORK_DATA_TYPE.DATA_ERROR]:
|
|
38
38
|
global?.languageJsonData?.pageLoadFailed || '排队进场中,请稍后再试',
|
|
39
39
|
[NETWORK_DATA_TYPE.NO_DATA]: global?.languageJsonData?.pageLoadFailed || '排队进场中,请稍后再试',
|
|
40
40
|
[NETWORK_DATA_TYPE.RISK]: `${
|
|
41
41
|
global?.languageJsonData?.pageLoadFailed || '排队进场中,请稍后再试'
|
|
42
42
|
}。`,
|
|
43
43
|
NETWORK_DATA_TYPE.NO_NET_WORK,
|
|
44
44
|
NETWORK_DATA_TYPE.DATA_ERROR,
|
|
45
45
|
NETWORK_DATA_TYPE.NO_DATA,
|
|
46
46
|
NETWORK_DATA_TYPE.RISK,
|
|
47
47
|
PART: 'part',
|
|
48
48
|
FULL: 'full',
|
|
49
49
|
No_Data_Default_Tip: 'no-data-default-tip',
|
|
50
50
|
No_Data_Tip_1: 'no-data-tip-1',
|
|
51
51
|
No_Data_Tip_2: 'no-data-tip-2',
|
|
52
52
|
No_Network_Err_Tip: 'no-network',
|
|
53
53
|
No_Data_Bmall: 'no-data-bmall',
|
|
54
54
|
OLD: 'old',
|
|
55
55
|
NEW: 'new',
|
|
@@ -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
|
NetWorkStyleType,
|
|
8
7
|
const {
|
|
9
8
|
className = '',
|
|
10
9
|
message = '',
|
|
11
10
|
subMessage = '',
|
|
12
11
|
btnLabel = global?.languageJsonData?.reload || '重新加载',
|
|
13
12
|
backgroundColorWhite = false,
|
|
14
13
|
netWorkDataType = NETWORK_DATA_TYPE.NORMAL,
|
|
15
14
|
netWorkShowType = NetWorkShowType.FULL,
|
|
16
15
|
netWorkImageType = NetWork_Image_Type.No_Data_Default_Tip,
|
|
17
16
|
netWorkStyleType = NetWorkStyleType.OLD,
|
|
18
17
|
refreshCallBackFn = null,
|
|
19
18
|
viewMaxHeight = '',
|
|
20
19
|
noPosition = false,
|
|
21
20
|
} = props;
|
|
22
21
|
const refershInitData = useCallback(() => {
|
|
23
22
|
refreshCallBackFn && refreshCallBackFn(true);
|
|
24
23
|
}, []);
|
|
25
24
|
const useErrorTip = message != '' ? message : NetWorkErrorTip[netWorkDataType];
|
|
26
25
|
const useErrorSubTip = subMessage
|
|
27
26
|
? subMessage
|
|
28
27
|
: message != ''
|
|
29
28
|
? ''
|
|
30
29
|
: NetWorkErrorSubTip[netWorkDataType];
|
|
31
30
|
const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {};
|
|
32
31
|
const maxHeight = latestRes.displayHeight || 546;
|
|
33
32
|
return NetWorkErrorList.includes(netWorkDataType as NETWORK_DATA_TYPE) ? (
|
|
34
33
|
<View
|
|
35
34
|
style={{
|
|
36
35
|
maxHeight: viewMaxHeight !== '' ? viewMaxHeight : isMemberPage ? '100vh' : maxHeight,
|
|
37
36
|
}}
|
|
38
37
|
className={classNames(
|
|
39
38
|
netWorkErrorStyle['d-shop-network'],
|
|
40
39
|
{
|
|
41
40
|
[netWorkErrorStyle['d-shop-network-white']]: backgroundColorWhite,
|
|
42
41
|
},
|
|
43
42
|
{
|
|
44
43
|
[netWorkErrorStyle['d-shop-network-part']]: netWorkShowType === NetWorkShowType.PART,
|
|
45
44
|
},
|
|
46
45
|
{
|
|
47
46
|
[netWorkErrorStyle['d-network-jd-shop-view']]: isH5AndJdShopView,
|
|
48
47
|
},
|
|
49
48
|
{
|
|
50
49
|
[netWorkErrorStyle['d-shop-network-no-position']]: noPosition,
|
|
51
50
|
},
|
|
52
51
|
'flexible-center-box',
|
|
53
52
|
className,
|
|
54
53
|
)}
|
|
55
54
|
>
|
|
56
55
|
<View
|
|
57
56
|
className={classNames(
|
|
58
57
|
netWorkErrorStyle['d-error-content'],
|
|
59
58
|
netWorkErrorStyle[`d-${netWorkStyleType}-style-content`],
|
|
60
59
|
'd-error-content',
|
|
61
60
|
)}
|
|
62
61
|
>
|
|
63
62
|
<View
|
|
64
63
|
className={classNames(
|
|
65
64
|
netWorkErrorStyle['d-error-type'],
|
|
66
65
|
netWorkErrorStyle[`d-${netWorkDataType}`],
|
|
67
66
|
netWorkErrorStyle[`d-${netWorkImageType}`],
|
|
68
67
|
'd-error-type',
|
|
69
68
|
)}
|
|
70
69
|
/>
|
|
71
70
|
<View
|
|
72
71
|
className={classNames(
|
|
73
72
|
netWorkErrorStyle['d-error-tip'],
|
|
74
73
|
netWorkErrorStyle[`d-${netWorkDataType}-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
|
netWorkErrorStyle[`d-${netWorkDataType}-sub-tip`],
|
|
85
84
|
'd-error-sub-tip',
|
|
86
85
|
)}
|
|
87
86
|
>
|
|
88
87
|
{useErrorSubTip}
|
|
89
88
|
</View>
|
|
90
89
|
) : null}
|
|
91
90
|
<View className={'flexible-horizontal-center-box'}>
|
|
92
91
|
{refreshCallBackFn && (
|
|
93
92
|
<Button
|
|
94
93
|
onClick={refershInitData}
|
|
95
94
|
className={classNames(
|
|
96
95
|
netWorkErrorStyle['d-opt-btn'],
|
|
97
96
|
'd-button-no-border',
|
|
98
97
|
'd-opt-btn',
|
|
99
98
|
)}
|
|
100
99
|
plain
|
|
101
100
|
size="mini"
|
|
102
101
|
>
|
|
103
102
|
{btnLabel}
|
|
104
103
|
</Button>
|
|
105
104
|
)}
|
|
106
105
|
</View>
|
|
107
106
|
</View>
|
|
108
107
|
</View>
|
|
109
108
|
) : null;
|
|
109
|
+
import { Button, View } from '@tarojs/components';
|
|
110
110
|
NetWorkErrorList,
|
|
111
111
|
NetWorkErrorTip,
|
|
112
112
|
NetWorkErrorSubTip,
|
|
113
113
|
NetWorkShowType,
|
|
114
114
|
NetWork_Image_Type,
|
|
115
115
|
NetWorkStyleType,
|
|
116
116
|
const {
|
|
117
117
|
className = '',
|
|
118
118
|
message = '',
|
|
119
119
|
subMessage = '',
|
|
120
120
|
btnLabel = global?.languageJsonData?.reload || '重新加载',
|
|
121
121
|
backgroundColorWhite = false,
|
|
122
122
|
netWorkDataType = NETWORK_DATA_TYPE.NORMAL,
|
|
123
123
|
netWorkShowType = NetWorkShowType.FULL,
|
|
124
124
|
netWorkImageType = NetWork_Image_Type.No_Data_Default_Tip,
|
|
125
125
|
netWorkStyleType = NetWorkStyleType.OLD,
|
|
126
126
|
refreshCallBackFn = null,
|
|
127
127
|
viewMaxHeight = '',
|
|
128
128
|
noPosition = false,
|
|
129
129
|
} = props;
|
|
130
130
|
const refershInitData = useCallback(() => {
|
|
131
131
|
refreshCallBackFn && refreshCallBackFn(true);
|
|
132
132
|
}, []);
|
|
133
133
|
const useErrorTip = message != '' ? message : NetWorkErrorTip[netWorkDataType];
|
|
134
134
|
const useErrorSubTip = subMessage
|
|
135
135
|
? subMessage
|
|
136
136
|
: message != ''
|
|
137
137
|
? ''
|
|
138
138
|
: NetWorkErrorSubTip[netWorkDataType];
|
|
139
139
|
const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {};
|
|
140
140
|
const onePlusOneBottomPlaceHeight = global.info?.sysInfo?.onePlusOneBottomPlaceHeight
|
|
141
141
|
? global.info?.sysInfo?.onePlusOneBottomPlaceHeight + 20
|
|
142
142
|
: 0;
|
|
143
143
|
const maxHeight = latestRes.displayHeight || onePlusOneBottomPlaceHeight + 546;
|
|
144
144
|
return NetWorkErrorList.includes(netWorkDataType as NETWORK_DATA_TYPE) ? (
|
|
145
145
|
<View
|
|
146
146
|
style={{
|
|
147
147
|
maxHeight: viewMaxHeight !== '' ? viewMaxHeight : isMemberPage ? '100vh' : maxHeight,
|
|
148
148
|
}}
|
|
149
149
|
className={classNames(
|
|
150
150
|
netWorkErrorStyle['d-shop-network'],
|
|
151
151
|
{
|
|
152
152
|
[netWorkErrorStyle['d-shop-network-white']]: backgroundColorWhite,
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
[netWorkErrorStyle['d-shop-network-part']]: netWorkShowType === NetWorkShowType.PART,
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
[netWorkErrorStyle['d-network-jd-shop-view']]: isH5AndJdShopView,
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
161
|
[netWorkErrorStyle['d-shop-network-no-position']]: noPosition,
|
|
162
162
|
},
|
|
163
163
|
'flexible-center-box',
|
|
164
164
|
className,
|
|
165
165
|
)}
|
|
166
166
|
>
|
|
167
167
|
<View
|
|
168
168
|
className={classNames(
|
|
169
169
|
netWorkErrorStyle['d-error-content'],
|
|
170
170
|
netWorkErrorStyle[`d-${netWorkStyleType}-style-content`],
|
|
171
171
|
'd-error-content',
|
|
172
172
|
)}
|
|
173
173
|
>
|
|
174
174
|
<View
|
|
175
175
|
className={classNames(
|
|
176
176
|
netWorkErrorStyle['d-error-type'],
|
|
177
177
|
netWorkErrorStyle[`d-${netWorkDataType}`],
|
|
178
178
|
netWorkErrorStyle[`d-${netWorkImageType}`],
|
|
179
179
|
`d-${netWorkDataType}`,
|
|
180
180
|
`d-${netWorkImageType}`,
|
|
181
181
|
'd-error-type',
|
|
182
182
|
)}
|
|
183
183
|
/>
|
|
184
184
|
<View
|
|
185
185
|
className={classNames(
|
|
186
186
|
netWorkErrorStyle['d-error-tip'],
|
|
187
187
|
netWorkErrorStyle[`d-${netWorkDataType}-tip`],
|
|
188
188
|
`d-${netWorkDataType}-tip`,
|
|
189
189
|
'd-error-tip',
|
|
190
190
|
)}
|
|
191
191
|
>
|
|
192
192
|
{useErrorTip}
|
|
193
193
|
</View>
|
|
194
194
|
{useErrorSubTip ? (
|
|
195
195
|
<View
|
|
196
196
|
className={classNames(
|
|
197
197
|
netWorkErrorStyle['d-error-sub-tip'],
|
|
198
198
|
netWorkErrorStyle[`d-${netWorkDataType}-sub-tip`],
|
|
199
199
|
`d-${netWorkDataType}-sub-tip`,
|
|
200
200
|
'd-error-sub-tip',
|
|
201
201
|
)}
|
|
202
202
|
>
|
|
203
203
|
{useErrorSubTip}
|
|
204
204
|
</View>
|
|
205
205
|
) : null}
|
|
206
206
|
<View className={'flexible-horizontal-center-box'}>
|
|
207
207
|
{refreshCallBackFn && (
|
|
208
208
|
<Button
|
|
209
209
|
onClick={refershInitData}
|
|
210
210
|
className={classNames(
|
|
211
211
|
netWorkErrorStyle['d-opt-btn'],
|
|
212
212
|
'd-button-no-border',
|
|
213
213
|
'd-opt-btn',
|
|
214
214
|
)}
|
|
215
215
|
plain
|
|
216
216
|
size="mini"
|
|
217
217
|
>
|
|
218
218
|
{btnLabel}
|
|
219
219
|
</Button>
|
|
220
220
|
)}
|
|
221
221
|
</View>
|
|
222
222
|
</View>
|
|
223
223
|
</View>
|
|
224
224
|
) : null;
|