@conecli/cone-render 0.10.1-beta.4 → 0.10.1-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.ts +1 -1
- package/dist/common/const.ts +1 -1
- package/dist/common/index.h5.ts +1 -1
- package/dist/common/index.weapp.ts +1 -1
- package/dist/common/sgmCustomCode.ts +1 -1
- package/dist/components/ErrorBoundary.tsx +1 -1
- package/dist/components/base/CustomScrollView/index.tsx +1 -1
- package/dist/components/base/CustomVideo/index.tsx +1 -1
- package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
- package/dist/components/base/InViewRender/index.weapp.tsx +1 -1
- package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
- package/dist/components/base/LazyLayoutLoad/index.weapp.tsx +1 -1
- package/dist/components/base/LazyLoadImage/index.h5.module.scss +3 -0
- package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
- package/dist/components/base/MobileCommonHeader/index.tsx +1 -1
- package/dist/components/base/NetworkDataError/index.module.scss +3 -0
- package/dist/components/base/NetworkDataError/index.tsx +1 -1
- package/dist/components/decorate/DecorateFloorModule/index.module.scss +11 -0
- 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.tsx +1 -1
- package/dist/components/remoteFloorItem.tsx +1 -1
- package/dist/interface/common.ts +1 -1
- package/dist/interface/component.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/jdJumpJdApp.ts +1 -1
- package/dist/jumpEventReport/web.base.ts +1 -1
- package/dist/jumpEventReport/web.jd.ts +1 -1
- package/dist/modules/ContainerFloorList/index.h5.module.scss +1 -0
- package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
- package/dist/open/api/device.ts +1 -1
- package/dist/open/api/request.ts +1 -1
- package/dist/open/api/shopMember.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 +5 -0
- package/dist/sass/base.scss +45 -0
- package/dist/service/requestServer.ts +1 -1
- package/dist/utils/connectNativeJsBridge.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/sgmCodeUtils.ts +1 -1
- package/dist/utils/taroRenderUtil.ts +1 -1
- package/dist/utils/utils.ts +1 -1
- package/package.json +24 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
import React, {useEffect, useRef} from 'react'
|
|
2
1
|
const { title, openAppParams, style, hasCommonHeader = true, hasDownloadTips = true, headerParams } = props
|
|
3
2
|
const headerRef:any = useRef(null)
|
|
4
3
|
useEffect(() => {
|
|
5
4
|
hasCommonHeader && initCommonHeader()
|
|
6
5
|
hasDownloadTips && initDownloadAppLayerConfigData()
|
|
7
6
|
}, [])
|
|
8
7
|
const scrollEventFunc = () => {
|
|
9
8
|
const stickyTop = headerRef.current?.getBoundingClientRect()?.top || 0;
|
|
10
9
|
const rootScrollEleNode = document.querySelector('#J_shopHomeRoot')
|
|
11
10
|
if (rootScrollEleNode && rootScrollEleNode.scrollTop > stickyTop) {
|
|
12
11
|
headerRef.current.classList.add('d-mobile-header-sticky');
|
|
13
12
|
} else {
|
|
14
13
|
headerRef.current.classList.remove('d-mobile-header-sticky');
|
|
15
14
|
}
|
|
16
15
|
}
|
|
17
16
|
useEffect(() => {
|
|
18
17
|
if(!headerRef.current) return
|
|
19
18
|
const rootScrollEleNode = document.querySelector('#J_shopHomeRoot')
|
|
20
19
|
rootScrollEleNode && rootScrollEleNode.addEventListener('scroll', scrollEventFunc);
|
|
21
20
|
return () => {
|
|
22
21
|
rootScrollEleNode && rootScrollEleNode.removeEventListener('scroll', scrollEventFunc)
|
|
23
22
|
}
|
|
24
23
|
},[])
|
|
25
24
|
const initCommonHeader = () => {
|
|
26
25
|
if (window?.MCommonHeaderBottom) {
|
|
27
26
|
const mchb = new MCommonHeaderBottom()
|
|
28
27
|
const headerArg = {
|
|
29
28
|
moduleName: 'shop',
|
|
30
29
|
hrederId: 'm_common_header',
|
|
31
30
|
title,
|
|
32
31
|
stype: 1,
|
|
33
32
|
onClickJdkey: function () {
|
|
34
33
|
console.log('==>m_common_header jdkey click.')
|
|
35
34
|
},
|
|
36
35
|
...headerParams
|
|
37
36
|
}
|
|
38
37
|
mchb.header(headerArg)
|
|
39
38
|
}
|
|
40
39
|
}
|
|
41
40
|
const initDownloadAppLayerConfigData = () => {
|
|
42
41
|
const getEle = document.getElementById('m_common_tip')
|
|
43
42
|
getEle &&
|
|
44
43
|
window.$ &&
|
|
45
44
|
window.$.downloadAppLayerConfigData &&
|
|
46
45
|
window.$.downloadAppLayerConfigData({
|
|
47
46
|
tipId: 'm_common_tip',
|
|
48
47
|
M_sourceFrom: 'jshop',
|
|
49
48
|
bottom: 74,
|
|
50
49
|
onClickTipX: () => {
|
|
51
50
|
Taro.eventCenter.trigger(
|
|
52
51
|
TaroEventType.DOWN_LOAD_APP_CLOSE_CHANGE,
|
|
53
52
|
true,
|
|
54
53
|
)
|
|
55
54
|
},
|
|
56
55
|
downloadAppPlugIn: {
|
|
57
56
|
M_sourceFrom: 'jshop',
|
|
58
57
|
openAppBtnId: 'download_openapp',
|
|
59
58
|
downAppURl: '//conecli.com/downloadApp/download.html?channel=jd-m',
|
|
60
59
|
inteneUrl: 'openapp.jdmobile://virtual?',
|
|
61
60
|
inteneUrlParams: {
|
|
62
61
|
category: 'jump',
|
|
63
62
|
des: 'jshopMain',
|
|
64
63
|
shopId: `${global.info.queryInfo.shopId || ''}`,
|
|
65
64
|
venderId: `${global.info.queryInfo.venderId || ''}`,
|
|
66
65
|
sourceType: global.info.queryInfo?.sourceType || 'M-H5',
|
|
67
66
|
sourceValue: global.info.queryInfo?.sourceValue || 'Mshop',
|
|
68
67
|
...openAppParams,
|
|
69
68
|
},
|
|
70
69
|
},
|
|
71
70
|
})
|
|
72
71
|
}
|
|
73
72
|
return !isWxMiniH5View && !isJdApp ? (
|
|
74
73
|
<View
|
|
75
74
|
className={mobileCommonHeaderStyle['d-mobile-header-layout']}
|
|
76
75
|
style={style}
|
|
77
76
|
ref={headerRef}
|
|
78
77
|
>
|
|
79
78
|
<View
|
|
80
79
|
id="m_common_tip"
|
|
81
80
|
className={mobileCommonHeaderStyle['d-mobile-common-tip']}
|
|
82
81
|
/>
|
|
83
82
|
{hasCommonHeader && (
|
|
84
83
|
<View
|
|
85
84
|
id="m_common_header"
|
|
86
85
|
className={mobileCommonHeaderStyle['d-mobile-common-header']}
|
|
87
86
|
/>
|
|
88
87
|
)}
|
|
89
88
|
</View>
|
|
90
89
|
) : null
|
|
91
90
|
title: '店铺',
|
|
92
91
|
openAppParams: {},
|
|
92
|
+
import React, {useEffect, useRef} from 'react'
|
|
93
93
|
const { title, openAppParams, style, hasCommonHeader = true, hasDownloadTips = true, headerParams } = props
|
|
94
94
|
const headerRef:any = useRef(null)
|
|
95
95
|
useEffect(() => {
|
|
96
96
|
hasCommonHeader && initCommonHeader()
|
|
97
97
|
hasDownloadTips && initDownloadAppLayerConfigData()
|
|
98
98
|
}, [])
|
|
99
99
|
const isScrolledToTop = () => {
|
|
100
100
|
return window.scrollY !== undefined ? window.scrollY === 0 :
|
|
101
101
|
document.documentElement.scrollTop === 0 || document.body.scrollTop === 0;
|
|
102
102
|
}
|
|
103
103
|
const scrollEventFunc = () => {
|
|
104
104
|
if(!headerRef.current) return
|
|
105
105
|
const stickyTop = headerRef.current?.getBoundingClientRect()?.top || 0;
|
|
106
106
|
if(Math.trunc(stickyTop) <= 0 && !isScrolledToTop()) {
|
|
107
107
|
console.log('scroll 添加class',Math.trunc(stickyTop), isScrolledToTop())
|
|
108
108
|
headerRef.current.classList.add('d-mobile-header-sticky');
|
|
109
109
|
}else {
|
|
110
110
|
console.log('scroll 移除class',Math.trunc(stickyTop), isScrolledToTop())
|
|
111
111
|
headerRef.current.classList.remove('d-mobile-header-sticky');
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
useEffect(() => {
|
|
115
115
|
Taro.eventCenter.on(TaroEventType.PAGE_SCROLL,() => {
|
|
116
116
|
scrollEventFunc()
|
|
117
117
|
})
|
|
118
118
|
},[])
|
|
119
119
|
const initCommonHeader = () => {
|
|
120
120
|
if (window?.MCommonHeaderBottom) {
|
|
121
121
|
const mchb = new MCommonHeaderBottom()
|
|
122
122
|
const headerArg = {
|
|
123
123
|
moduleName: 'shop',
|
|
124
124
|
hrederId: 'm_common_header',
|
|
125
125
|
title,
|
|
126
126
|
stype: 1,
|
|
127
127
|
onClickJdkey: function () {
|
|
128
128
|
console.log('==>m_common_header jdkey click.')
|
|
129
129
|
},
|
|
130
130
|
...headerParams
|
|
131
131
|
}
|
|
132
132
|
mchb.header(headerArg)
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
const initDownloadAppLayerConfigData = () => {
|
|
136
136
|
const getEle = document.getElementById('m_common_tip')
|
|
137
137
|
getEle &&
|
|
138
138
|
window.$ &&
|
|
139
139
|
window.$.downloadAppLayerConfigData &&
|
|
140
140
|
window.$.downloadAppLayerConfigData({
|
|
141
141
|
tipId: 'm_common_tip',
|
|
142
142
|
M_sourceFrom: 'jshop',
|
|
143
143
|
bottom: 74,
|
|
144
144
|
onClickTipX: () => {
|
|
145
145
|
Taro.eventCenter.trigger(
|
|
146
146
|
TaroEventType.DOWN_LOAD_APP_CLOSE_CHANGE,
|
|
147
147
|
true,
|
|
148
148
|
)
|
|
149
149
|
},
|
|
150
150
|
downloadAppPlugIn: {
|
|
151
151
|
M_sourceFrom: 'jshop',
|
|
152
152
|
openAppBtnId: 'download_openapp',
|
|
153
153
|
downAppURl: '//conecli.com/downloadApp/download.html?channel=jd-m',
|
|
154
154
|
inteneUrl: 'openapp.jdmobile://virtual?',
|
|
155
155
|
inteneUrlParams: {
|
|
156
156
|
category: 'jump',
|
|
157
157
|
des: 'jshopMain',
|
|
158
158
|
shopId: `${global.info.queryInfo.shopId || ''}`,
|
|
159
159
|
venderId: `${global.info.queryInfo.venderId || ''}`,
|
|
160
160
|
sourceType: global.info.queryInfo?.sourceType || 'M-H5',
|
|
161
161
|
sourceValue: global.info.queryInfo?.sourceValue || 'Mshop',
|
|
162
162
|
...openAppParams,
|
|
163
163
|
},
|
|
164
164
|
},
|
|
165
165
|
})
|
|
166
166
|
}
|
|
167
167
|
return !isWxMiniH5View && !isJdApp ? (
|
|
168
168
|
<View
|
|
169
169
|
className={mobileCommonHeaderStyle['d-mobile-header-layout']}
|
|
170
170
|
style={style}
|
|
171
171
|
ref={headerRef}
|
|
172
172
|
>
|
|
173
173
|
<View
|
|
174
174
|
id="m_common_tip"
|
|
175
175
|
className={mobileCommonHeaderStyle['d-mobile-common-tip']}
|
|
176
176
|
/>
|
|
177
177
|
{hasCommonHeader && (
|
|
178
178
|
<View
|
|
179
179
|
id="m_common_header"
|
|
180
180
|
className={mobileCommonHeaderStyle['d-mobile-common-header']}
|
|
181
181
|
/>
|
|
182
182
|
)}
|
|
183
183
|
</View>
|
|
184
184
|
) : null
|
|
185
185
|
title: '店铺',
|
|
186
186
|
openAppParams: {},
|
|
@@ -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,
|
|
13
12
|
netWorkDataType,
|
|
14
13
|
netWorkShowType,
|
|
15
14
|
netWorkImageType,
|
|
16
15
|
refreshCallBackFn,
|
|
17
16
|
viewMaxHeight,
|
|
18
17
|
} = props;
|
|
19
18
|
const refershInitData = useCallback(() => {
|
|
20
19
|
refreshCallBackFn && refreshCallBackFn(true);
|
|
21
20
|
}, []);
|
|
22
21
|
const useErrorTip =
|
|
23
22
|
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
|
"flexible-center-box",
|
|
52
51
|
className
|
|
53
52
|
)}
|
|
54
53
|
>
|
|
55
54
|
<View
|
|
56
55
|
className={classNames(
|
|
57
56
|
netWorkErrorStyle["d-error-content"],
|
|
58
57
|
"d-error-content"
|
|
59
58
|
)}
|
|
60
59
|
>
|
|
61
60
|
<View
|
|
62
61
|
className={classNames(
|
|
63
62
|
netWorkErrorStyle["d-error-type"],
|
|
64
63
|
netWorkErrorStyle[`d-${netWorkDataType}`],
|
|
65
64
|
netWorkErrorStyle[`d-${netWorkImageType}`],
|
|
66
65
|
"d-error-type"
|
|
67
66
|
)}
|
|
68
67
|
/>
|
|
69
68
|
<View
|
|
70
69
|
className={classNames(
|
|
71
70
|
netWorkErrorStyle["d-error-tip"],
|
|
72
71
|
"d-error-tip"
|
|
73
72
|
)}
|
|
74
73
|
>
|
|
75
74
|
{useErrorTip}
|
|
76
75
|
</View>
|
|
77
76
|
{useErrorSubTip ? (
|
|
78
77
|
<View
|
|
79
78
|
className={classNames(
|
|
80
79
|
netWorkErrorStyle["d-error-sub-tip"],
|
|
81
80
|
"d-error-sub-tip"
|
|
82
81
|
)}
|
|
83
82
|
>
|
|
84
83
|
{useErrorSubTip}
|
|
85
84
|
</View>
|
|
86
85
|
) : null}
|
|
87
86
|
<View className={"flexible-horizontal-center-box"}>
|
|
88
87
|
{refreshCallBackFn && (
|
|
89
88
|
<Button
|
|
90
89
|
onClick={refershInitData}
|
|
91
90
|
className={classNames(
|
|
92
91
|
netWorkErrorStyle["d-opt-btn"],
|
|
93
92
|
"d-button-no-border",
|
|
94
93
|
"d-opt-btn"
|
|
95
94
|
)}
|
|
96
95
|
plain
|
|
97
96
|
size="mini"
|
|
98
97
|
>
|
|
99
98
|
{btnLabel}
|
|
100
99
|
</Button>
|
|
101
100
|
)}
|
|
102
101
|
</View>
|
|
103
102
|
</View>
|
|
104
103
|
</View>
|
|
105
104
|
) : null;
|
|
106
105
|
className: "",
|
|
107
106
|
message: "",
|
|
108
107
|
subMessage: "",
|
|
109
108
|
btnLabel: "重新加载",
|
|
110
109
|
backgroundColorWhite: false,
|
|
111
110
|
netWorkDataType: NETWORK_DATA_TYPE.NORMAL,
|
|
112
111
|
netWorkImageType: NetWork_Image_Type.No_Data_Default_Tip,
|
|
113
112
|
netWorkShowType: NetWorkShowType.FULL,
|
|
114
113
|
refreshCallBackFn: null,
|
|
115
114
|
viewMaxHeight: "",
|
|
115
|
+
import { Button, View } from '@tarojs/components'
|
|
116
116
|
NetWorkErrorList,
|
|
117
117
|
NetWorkErrorTip,
|
|
118
118
|
NetWorkErrorSubTip,
|
|
119
119
|
NetWorkShowType,
|
|
120
120
|
NetWork_Image_Type,
|
|
121
121
|
const {
|
|
122
122
|
className = '',
|
|
123
123
|
message = '',
|
|
124
124
|
subMessage = '',
|
|
125
125
|
btnLabel = '重新加载',
|
|
126
126
|
backgroundColorWhite = false,
|
|
127
127
|
netWorkDataType = NETWORK_DATA_TYPE.NORMAL,
|
|
128
128
|
netWorkImageType = NetWork_Image_Type.No_Data_Default_Tip,
|
|
129
129
|
netWorkShowType = NetWorkShowType.FULL,
|
|
130
130
|
refreshCallBackFn = null,
|
|
131
131
|
viewMaxHeight = '',
|
|
132
132
|
noPosition = false,
|
|
133
133
|
} = props
|
|
134
134
|
const refershInitData = useCallback(() => {
|
|
135
135
|
refreshCallBackFn && refreshCallBackFn(true)
|
|
136
136
|
}, [])
|
|
137
137
|
const useErrorTip = message != '' ? message : NetWorkErrorTip[netWorkDataType]
|
|
138
138
|
const useErrorSubTip = subMessage
|
|
139
139
|
? subMessage
|
|
140
140
|
: NetWorkErrorSubTip[netWorkDataType]
|
|
141
141
|
const latestRes = latestFromNativeMsgStorage[TaroEventType.PAGE_SCROLL] || {}
|
|
142
142
|
const maxHeight = latestRes.displayHeight || 546
|
|
143
143
|
return NetWorkErrorList.includes(netWorkDataType as NETWORK_DATA_TYPE) ? (
|
|
144
144
|
<View
|
|
145
145
|
style={{
|
|
146
146
|
maxHeight:
|
|
147
147
|
viewMaxHeight !== ''
|
|
148
148
|
? viewMaxHeight
|
|
149
149
|
: isMemberPage || isAppStowShop
|
|
150
150
|
? '100vh'
|
|
151
151
|
: maxHeight,
|
|
152
152
|
}}
|
|
153
153
|
className={classNames(
|
|
154
154
|
netWorkErrorStyle['d-shop-network'],
|
|
155
155
|
{
|
|
156
156
|
[netWorkErrorStyle['d-shop-network-white']]: backgroundColorWhite,
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
159
|
[netWorkErrorStyle['d-shop-network-part']]:
|
|
160
160
|
netWorkShowType === NetWorkShowType.PART,
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
[netWorkErrorStyle['d-network-jd-shop-view']]: isH5AndJdShopView,
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
166
|
[netWorkErrorStyle['d-shop-network-no-position']]: noPosition,
|
|
167
167
|
},
|
|
168
168
|
'flexible-center-box',
|
|
169
169
|
className,
|
|
170
170
|
)}
|
|
171
171
|
>
|
|
172
172
|
<View
|
|
173
173
|
className={classNames(
|
|
174
174
|
netWorkErrorStyle['d-error-content'],
|
|
175
175
|
'd-error-content',
|
|
176
176
|
)}
|
|
177
177
|
>
|
|
178
178
|
<View
|
|
179
179
|
className={classNames(
|
|
180
180
|
netWorkErrorStyle['d-error-type'],
|
|
181
181
|
netWorkErrorStyle[`d-${netWorkDataType}`],
|
|
182
182
|
netWorkErrorStyle[`d-${netWorkImageType}`],
|
|
183
183
|
'd-error-type',
|
|
184
184
|
)}
|
|
185
185
|
/>
|
|
186
186
|
<View
|
|
187
187
|
className={classNames(
|
|
188
188
|
netWorkErrorStyle['d-error-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
|
'd-error-sub-tip',
|
|
199
199
|
)}
|
|
200
200
|
>
|
|
201
201
|
{useErrorSubTip}
|
|
202
202
|
</View>
|
|
203
203
|
) : null}
|
|
204
204
|
<View className={'flexible-horizontal-center-box'}>
|
|
205
205
|
{refreshCallBackFn && (
|
|
206
206
|
<Button
|
|
207
207
|
onClick={refershInitData}
|
|
208
208
|
className={classNames(
|
|
209
209
|
netWorkErrorStyle['d-opt-btn'],
|
|
210
210
|
'd-button-no-border',
|
|
211
211
|
'd-opt-btn',
|
|
212
212
|
)}
|
|
213
213
|
plain
|
|
214
214
|
size="mini"
|
|
215
215
|
>
|
|
216
216
|
{btnLabel}
|
|
217
217
|
</Button>
|
|
218
218
|
)}
|
|
219
219
|
</View>
|
|
220
220
|
</View>
|
|
221
221
|
</View>
|
|
222
222
|
) : null
|
|
@@ -11,7 +11,18 @@
|
|
|
11
11
|
display: none;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
+
.d-container-item-cover {
|
|
15
|
+
&:first-child {
|
|
16
|
+
z-index: 99;
|
|
17
|
+
top: 22px;
|
|
18
|
+
// top: 21px;
|
|
19
|
+
width: 98.5%;
|
|
20
|
+
left: 6px;
|
|
21
|
+
}
|
|
14
22
|
|
|
23
|
+
width: 100%;
|
|
24
|
+
position: absolute;
|
|
25
|
+
}
|
|
15
26
|
.d-container-item{
|
|
16
27
|
&.d-container-item-active {
|
|
17
28
|
:global {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { View } from '@tarojs/components'
|
|
2
1
|
const {
|
|
3
2
|
selectContainerId,
|
|
4
3
|
placeHolderPreContainerId,
|
|
5
4
|
containerData,
|
|
6
5
|
children,
|
|
7
6
|
style,
|
|
8
7
|
shopTotalInfo,
|
|
9
8
|
urlQueryData
|
|
10
9
|
} = props;
|
|
11
10
|
const { isTrusteeship = false } = urlQueryData || {}
|
|
12
11
|
const selectContainerState = selectContainerId == containerData?.containerId
|
|
13
12
|
const ChildrenComponent = useCallback(() => {
|
|
14
13
|
return children ? children : null;
|
|
15
14
|
}, [containerData, shopTotalInfo]);
|
|
16
15
|
const isHideFloor = isTrusteeship && containerData?.floors?.[0]?.status === -1
|
|
17
16
|
return (
|
|
18
17
|
<View
|
|
19
18
|
className={classNames(
|
|
20
19
|
decorateModuleStyle[isTrusteeship ? 'd-container-item-trusteeship' : 'd-container-item'],
|
|
21
20
|
'J_container',
|
|
22
21
|
{
|
|
23
22
|
[decorateModuleStyle['d-container-item-active']]:
|
|
24
23
|
selectContainerState,
|
|
25
24
|
},
|
|
26
25
|
{
|
|
27
26
|
J_floorItemActive: selectContainerState,
|
|
28
27
|
},
|
|
29
28
|
{
|
|
30
29
|
[decorateModuleStyle['d-container-item-hide']]:
|
|
31
30
|
isHideFloor,
|
|
32
31
|
}
|
|
33
32
|
)}
|
|
34
33
|
id={`J_container_${containerData?.containerId}`}
|
|
35
34
|
data-container-id={containerData?.containerId}
|
|
36
35
|
data-container-type={containerData?.typeCode}
|
|
37
36
|
data-container-cn={containerData?.typeCn}
|
|
38
37
|
data-container-floorFlag={containerData?.extInfo?.floorFlag || ''}
|
|
39
38
|
data-container-moduleInstanceType={containerData?.extInfo?.moduleInstanceType || ''}
|
|
40
39
|
data-container-position={containerData?.containerPosition}
|
|
41
40
|
data-container-alias={
|
|
42
41
|
containerData?.containerAlias
|
|
43
42
|
? containerData?.containerAlias
|
|
44
43
|
: ''
|
|
45
44
|
}
|
|
46
45
|
data-container-empty={containerData?.floors?.[0]?.configEmpty || 'false'}
|
|
47
46
|
style={
|
|
48
47
|
containerData?.typeCode !== ContainerShopHeaderType ? style : {}
|
|
49
48
|
}
|
|
50
49
|
>
|
|
51
50
|
<input
|
|
52
51
|
type="hidden"
|
|
53
52
|
value={`container_${containerData?.containerId}`}
|
|
54
53
|
/>
|
|
55
54
|
<ChildrenComponent />
|
|
56
55
|
<PlaceHolder
|
|
57
56
|
placeHolderPreContainerId={placeHolderPreContainerId}
|
|
58
57
|
containerId={containerData?.containerId}
|
|
59
58
|
/>
|
|
60
59
|
</View>
|
|
61
60
|
)
|
|
61
|
+
import { View } from '@tarojs/components'
|
|
62
62
|
const {
|
|
63
63
|
selectContainerId,
|
|
64
64
|
placeHolderPreContainerId,
|
|
65
65
|
containerData,
|
|
66
66
|
children,
|
|
67
67
|
style,
|
|
68
68
|
shopTotalInfo,
|
|
69
69
|
urlQueryData,
|
|
70
70
|
containerIndex = -1,
|
|
71
71
|
luxuryFixed = false
|
|
72
72
|
} = props;
|
|
73
73
|
const { isTrusteeship = false } = urlQueryData || {}
|
|
74
74
|
const selectContainerState = selectContainerId == containerData?.containerId
|
|
75
75
|
const ChildrenComponent = useCallback(() => {
|
|
76
76
|
return children ? children : null;
|
|
77
77
|
}, [containerData, shopTotalInfo]);
|
|
78
78
|
const isHideFloor = isTrusteeship && containerData?.floors?.[0]?.status === -1
|
|
79
79
|
return (
|
|
80
80
|
<View
|
|
81
81
|
className={classNames(
|
|
82
82
|
decorateModuleStyle[isTrusteeship ? 'd-container-item-trusteeship' : 'd-container-item'],
|
|
83
83
|
'J_container',
|
|
84
84
|
{
|
|
85
85
|
[decorateModuleStyle['d-container-item-active']]:
|
|
86
86
|
selectContainerState,
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
J_floorItemActive: selectContainerState,
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
[decorateModuleStyle['d-container-item-hide']]:
|
|
93
93
|
isHideFloor,
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
[decorateModuleStyle['d-container-item-cover']]:
|
|
97
97
|
containerIndex === 0 && luxuryFixed && !isTrusteeship,
|
|
98
98
|
},
|
|
99
99
|
)}
|
|
100
100
|
id={`J_container_${containerData?.containerId}`}
|
|
101
101
|
data-container-id={containerData?.containerId}
|
|
102
102
|
data-container-type={containerData?.typeCode}
|
|
103
103
|
data-container-cn={containerData?.typeCn}
|
|
104
104
|
data-container-floorFlag={containerData?.extInfo?.floorFlag || ''}
|
|
105
105
|
data-container-moduleInstanceType={containerData?.extInfo?.moduleInstanceType || ''}
|
|
106
106
|
data-container-position={containerData?.containerPosition}
|
|
107
107
|
data-container-alias={
|
|
108
108
|
containerData?.containerAlias
|
|
109
109
|
? containerData?.containerAlias
|
|
110
110
|
: ''
|
|
111
111
|
}
|
|
112
112
|
data-container-empty={containerData?.floors?.[0]?.configEmpty || 'false'}
|
|
113
113
|
style={
|
|
114
114
|
containerData?.typeCode !== ContainerShopHeaderType ? style : {}
|
|
115
115
|
}
|
|
116
116
|
>
|
|
117
117
|
<input
|
|
118
118
|
type="hidden"
|
|
119
119
|
value={`container_${containerData?.containerId}`}
|
|
120
120
|
/>
|
|
121
121
|
<ChildrenComponent />
|
|
122
122
|
<PlaceHolder
|
|
123
123
|
placeHolderPreContainerId={placeHolderPreContainerId}
|
|
124
124
|
containerId={containerData?.containerId}
|
|
125
125
|
{...(selectContainerId === "luxuryHeader-isUpperHalf" && { isShowPlaceHolder: false })}
|
|
126
126
|
/>
|
|
127
127
|
</View>
|
|
128
128
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { View, Text } from '@tarojs/components'
|
|
2
1
|
'//img11.360buyimg.com/imagetools/jfs/t1/141506/22/31698/7923/637b6db9E2af80265/10e76e2c31e0e356.png'
|
|
3
2
|
const {
|
|
4
3
|
moduleType,
|
|
5
4
|
configEmpty,
|
|
6
5
|
previewUri = null,
|
|
7
6
|
uid,
|
|
8
7
|
moduleFlag,
|
|
9
8
|
moduleName,
|
|
10
9
|
} = props.floorData
|
|
11
10
|
let previewUrl = previewUri
|
|
12
11
|
const newModuleFloorTypeList = [100, 101, 100000, 99999]
|
|
13
12
|
const isNewFloorState = newModuleFloorTypeList.includes(moduleType)
|
|
14
13
|
if ((moduleType == 99999 || moduleType == 101) && !previewUri) {
|
|
15
14
|
previewUrl = decorateModulePrevDefaultUrl
|
|
16
15
|
}
|
|
17
16
|
const loadImageErr = e => {
|
|
18
17
|
e.target.src = decorateModulePrevDefaultUrl
|
|
19
18
|
}
|
|
20
19
|
if (moduleFlag && TRUSTEESHIP_MODULE_FLAG_LIST.indexOf(moduleFlag) !== -1)
|
|
21
20
|
return null
|
|
22
21
|
return isNewFloorState && configEmpty && previewUrl ? (
|
|
23
22
|
<View
|
|
24
23
|
className={emptyModuleStyle['d-empty-module']}
|
|
25
24
|
data-floor-uid={uid}
|
|
26
25
|
data-floor-type={moduleFlag}
|
|
27
26
|
data-floor-modulename={moduleName}
|
|
28
27
|
>
|
|
29
28
|
{}
|
|
30
29
|
{}
|
|
31
30
|
{}
|
|
32
31
|
{}
|
|
33
32
|
{}
|
|
34
33
|
{}
|
|
35
34
|
{}
|
|
36
35
|
<View className={classNames(emptyModuleStyle['d-empty-img'])}>
|
|
37
36
|
<img
|
|
38
37
|
width={355}
|
|
39
38
|
className={classNames('J_floorEmptyDataImg')}
|
|
40
39
|
src={previewUrl}
|
|
41
40
|
onError={loadImageErr.bind(this)}
|
|
42
41
|
/>
|
|
43
42
|
</View>
|
|
44
43
|
</View>
|
|
45
44
|
) : (
|
|
46
45
|
<View
|
|
47
46
|
className={classNames(
|
|
48
47
|
emptyModuleStyle['d-empty-module'],
|
|
49
48
|
emptyModuleStyle['d-empty-text-warp'],
|
|
50
49
|
)}
|
|
51
50
|
data-floor-uid={uid}
|
|
52
51
|
data-floor-type={moduleFlag}
|
|
53
52
|
data-floor-modulename={moduleName}
|
|
54
53
|
>
|
|
55
54
|
<Text className={emptyModuleStyle['d-empty-text']}>
|
|
56
55
|
该楼层还未配置数据
|
|
57
56
|
</Text>
|
|
58
57
|
</View>
|
|
59
58
|
)
|
|
59
|
+
import { View, Text } from '@tarojs/components'
|
|
60
60
|
'//img11.360buyimg.com/imagetools/jfs/t1/141506/22/31698/7923/637b6db9E2af80265/10e76e2c31e0e356.png'
|
|
61
61
|
'//img14.360buyimg.com/imagetools/jfs/t1/247708/11/19310/58975/66ecefa4Fe36ade02/370c18c961aceef1.png'
|
|
62
62
|
const {
|
|
63
63
|
moduleType,
|
|
64
64
|
configEmpty,
|
|
65
65
|
previewUri = null,
|
|
66
66
|
uid,
|
|
67
67
|
moduleFlag,
|
|
68
68
|
moduleName,
|
|
69
69
|
} = props.floorData
|
|
70
70
|
const { luxuryFixed = false } = props
|
|
71
71
|
let previewUrl = previewUri
|
|
72
72
|
const newModuleFloorTypeList = [100, 101, 100000, 99999]
|
|
73
73
|
const isNewFloorState = newModuleFloorTypeList.includes(moduleType)
|
|
74
74
|
if ((moduleType == 99999 || moduleType == 101) && !previewUri) {
|
|
75
75
|
previewUrl = luxuryFixed ? luxuryDecorateModulePrevDefaultUrl : decorateModulePrevDefaultUrl
|
|
76
76
|
}
|
|
77
77
|
const loadImageErr = e => {
|
|
78
78
|
e.target.src = decorateModulePrevDefaultUrl
|
|
79
79
|
}
|
|
80
80
|
if (moduleFlag && TRUSTEESHIP_MODULE_FLAG_LIST.indexOf(moduleFlag) !== -1)
|
|
81
81
|
return null
|
|
82
82
|
return isNewFloorState && configEmpty && previewUrl ? (
|
|
83
83
|
<View
|
|
84
84
|
className={emptyModuleStyle['d-empty-module']}
|
|
85
85
|
data-floor-uid={uid}
|
|
86
86
|
data-floor-type={moduleFlag}
|
|
87
87
|
data-floor-modulename={moduleName}
|
|
88
88
|
>
|
|
89
89
|
{}
|
|
90
90
|
{}
|
|
91
91
|
{}
|
|
92
92
|
{}
|
|
93
93
|
{}
|
|
94
94
|
{}
|
|
95
95
|
{}
|
|
96
96
|
<View className={classNames(emptyModuleStyle['d-empty-img'])}>
|
|
97
97
|
<img
|
|
98
98
|
width={luxuryFixed ? 375 : 355}
|
|
99
99
|
className={classNames('J_floorEmptyDataImg')}
|
|
100
100
|
src={previewUrl}
|
|
101
101
|
onError={loadImageErr.bind(this)}
|
|
102
102
|
/>
|
|
103
103
|
</View>
|
|
104
104
|
</View>
|
|
105
105
|
) : (
|
|
106
106
|
<View
|
|
107
107
|
className={classNames(
|
|
108
108
|
emptyModuleStyle['d-empty-module'],
|
|
109
109
|
emptyModuleStyle['d-empty-text-warp'],
|
|
110
110
|
)}
|
|
111
111
|
data-floor-uid={uid}
|
|
112
112
|
data-floor-type={moduleFlag}
|
|
113
113
|
data-floor-modulename={moduleName}
|
|
114
114
|
>
|
|
115
115
|
<Text className={emptyModuleStyle['d-empty-text']}>
|
|
116
116
|
该楼层还未配置数据
|
|
117
117
|
</Text>
|
|
118
118
|
</View>
|
|
119
119
|
)
|