@conecli/cone-render 0.10.1-shop-beta.11 → 0.10.1-shop-beta.13
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/const.ts +1 -1
- package/dist/common/index.dynamic.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/jssdk.ts +1 -1
- package/dist/common/token/index.h5.ts +1 -1
- package/dist/common/wxappApi.ts +1 -1
- package/dist/components/base/CommonFloorHead/index.tsx +1 -1
- package/dist/components/base/CountDown/index.tsx +1 -1
- package/dist/components/base/CustomScrollView/index.tsx +1 -1
- package/dist/components/base/Dialog/index.dynamic.module.scss +126 -0
- package/dist/components/base/Dialog/index.dynamic.tsx +1 -0
- package/dist/components/base/DynamicTest/index.dynamic.module.scss +15 -0
- package/dist/components/base/DynamicTest/index.module.scss +16 -0
- package/dist/components/base/DynamicTest/index.tsx +1 -0
- package/dist/components/base/ExposureSmart/index.tsx +1 -1
- package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
- package/dist/components/base/JdLoading/index.module.scss +2 -0
- package/dist/components/base/JdLoading/index.tsx +1 -1
- package/dist/components/base/LazyLoadImage/index.tsx +1 -1
- package/dist/components/base/NetworkDataError/const.ts +1 -1
- package/dist/components/base/NetworkDataError/index.module.scss +116 -70
- package/dist/components/base/NetworkDataError/index.tsx +1 -1
- package/dist/components/base/Price/Base/index.dynamic.module.scss +63 -0
- package/dist/components/base/Price/Base/index.dynamic.tsx +1 -0
- package/dist/components/base/Price/Base/index.module.scss +6 -0
- package/dist/components/base/Price/Base/index.tsx +1 -1
- package/dist/components/base/Price/Double/index.dynamic.module.scss +172 -0
- package/dist/components/base/Price/Double/index.dynamic.tsx +1 -0
- package/dist/components/base/Price/Double/index.module.scss +6 -0
- package/dist/components/base/Price/Double/index.tsx +1 -1
- package/dist/components/debug/DebugLayout/index.module.scss +2 -2
- 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/jumpEventReport/const.ts +1 -1
- package/dist/jumpEventReport/index.dynamic.ts +1 -0
- package/dist/jumpEventReport/index.h5.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.base.ts +1 -1
- package/dist/jumpEventReport/web.jd.ts +1 -1
- package/dist/language/zh_CN.json +162 -0
- package/dist/open/api/index.ts +1 -1
- package/dist/open/api/shopMember.dynamic.ts +1 -0
- package/dist/open/api/shopMember.ts +1 -1
- package/dist/open/components/index.dynamic.ts +1 -0
- package/dist/open/components/index.ts +1 -1
- package/dist/sass/app.dynamic.scss +306 -0
- package/dist/service/fetchGateway.h5.ts +1 -0
- package/dist/service/fetchGateway.ts +1 -1
- package/dist/service/fetchGateway.weapp.ts +1 -1
- package/dist/service/fetchJsonp.h5.ts +1 -0
- package/dist/service/fetchJsonp.ts +1 -1
- package/dist/service/http/colorSign.dynamic.ts +1 -0
- package/dist/service/http/http.ts +1 -1
- 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.dynamic.ts +1 -0
- 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/intersectionObserver.ts +1 -1
- package/dist/utils/jumpExtMapUtil.ts +1 -0
- package/dist/utils/log.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 +51 -31
- /package/dist/utils/{jumpExtMapUtil.js → jumpExtMapUtil.h5.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import Taro from '@tarojs/taro'
|
|
2
|
title: '',
|
|
1
3
|
message: null,
|
|
2
4
|
className: '',
|
|
3
5
|
maskCloseable: false,
|
|
4
6
|
show: true,
|
|
5
7
|
hasFooter: true,
|
|
6
8
|
isCustom: false,
|
|
7
9
|
titleNode: null,
|
|
8
10
|
bodyNode: null,
|
|
9
11
|
footerNode: null,
|
|
10
12
|
closeBtnText: '取消',
|
|
11
13
|
closeBtnHideState: false,
|
|
12
14
|
confirmBtnText: '确定',
|
|
13
15
|
confirmBtnHideState: false,
|
|
14
16
|
onBeforeConfirm: null,
|
|
15
17
|
onConfirm: null,
|
|
16
18
|
onClose: null,
|
|
17
19
|
onBackground: null,
|
|
18
20
|
onHide: null,
|
|
19
21
|
onInit: null,
|
|
20
22
|
isFormDialog: false,
|
|
21
23
|
onFormSubmit: null,
|
|
22
24
|
onFormReset: null,
|
|
23
25
|
forbiddenBgScrollState: true,
|
|
24
26
|
const [dialogShowState, setDialogShowState] = useState(false)
|
|
25
27
|
const [dialogConfig, setDialogConfig] =
|
|
26
28
|
useState<ComponentInterFace.DialogConfigProps>({
|
|
27
29
|
type: DialogType.BASE,
|
|
28
30
|
})
|
|
29
31
|
const dialogBackFnRef = useRef<ComponentInterFace.DialogConfigBackFn>({})
|
|
30
32
|
useEffect(() => {
|
|
31
33
|
|
|
32
34
|
Taro.eventCenter.on(TaroEventType.DIALOG, (res) => {
|
|
33
35
|
res.show ? dialogInit(res) : setDialogShowState(false)
|
|
34
36
|
})
|
|
35
37
|
return () => {
|
|
36
38
|
Taro.eventCenter.off(TaroEventType.DIALOG)
|
|
37
39
|
}
|
|
38
40
|
}, [])
|
|
39
41
|
|
|
40
42
|
useEffect(() => {
|
|
41
43
|
if (dialogConfig.forbiddenBgScrollState && taroJdBaseInfo.rootEleNode) {
|
|
42
44
|
!dialogShowState ? taroJdBaseInfo.rootEleNode.classList.remove('over-hidden') : taroJdBaseInfo.rootEleNode.classList.add('over-hidden')
|
|
43
45
|
}
|
|
44
46
|
}, [dialogConfig, dialogShowState])
|
|
45
47
|
const dialogInit = useCallback((opts) => {
|
|
46
48
|
const {
|
|
47
49
|
onBeforeConfirm,
|
|
48
50
|
onConfirm,
|
|
49
51
|
onClose,
|
|
50
52
|
onBackground,
|
|
51
53
|
onHide,
|
|
52
54
|
onInit,
|
|
53
55
|
onFormSubmit,
|
|
54
56
|
onFormReset,
|
|
55
57
|
...otherOpts
|
|
56
58
|
} = opts
|
|
57
59
|
const dialogOpts = Object.assign(
|
|
58
60
|
{},
|
|
59
61
|
{
|
|
60
62
|
...dialogDefaultConfig,
|
|
61
63
|
type: DialogType.BASE,
|
|
62
64
|
},
|
|
63
65
|
otherOpts,
|
|
64
66
|
)
|
|
65
67
|
dialogBackFnRef.current = {
|
|
66
68
|
onInit,
|
|
67
69
|
onBeforeConfirm,
|
|
68
70
|
onConfirm,
|
|
69
71
|
onClose,
|
|
70
72
|
onBackground,
|
|
71
73
|
onHide,
|
|
72
74
|
onFormSubmit,
|
|
73
75
|
onFormReset,
|
|
74
76
|
}
|
|
75
77
|
setDialogConfig(dialogOpts)
|
|
76
78
|
setDialogShowState(true)
|
|
77
79
|
}, [])
|
|
78
80
|
const hideDialog = useCallback(() => {
|
|
79
81
|
setDialogShowState(false)
|
|
80
82
|
}, [])
|
|
81
83
|
const closeDialog = useCallback(() => {
|
|
82
84
|
hideDialog()
|
|
83
85
|
dialogBackFnRef.current.onHide &&
|
|
84
86
|
typeof dialogBackFnRef.current.onHide === 'function' &&
|
|
85
87
|
dialogBackFnRef.current.onHide(dialogConfig)
|
|
86
88
|
}, [dialogConfig])
|
|
87
89
|
|
|
88
90
|
const updateDialogContentFn = (changeDialogConfig) => {
|
|
89
91
|
setDialogConfig({
|
|
90
92
|
...dialogConfig,
|
|
91
93
|
...changeDialogConfig
|
|
92
94
|
})
|
|
93
95
|
}
|
|
94
96
|
useEffect(() => {
|
|
95
97
|
dialogShowState &&
|
|
96
98
|
dialogBackFnRef.current.onInit &&
|
|
97
99
|
typeof dialogBackFnRef.current.onInit === 'function' &&
|
|
98
100
|
dialogBackFnRef.current.onInit(hideDialog, dialogConfig, updateDialogContentFn)
|
|
99
101
|
}, [dialogShowState])
|
|
100
102
|
|
|
101
103
|
const dialogConfirmFn = useCallback(
|
|
102
104
|
(e) => {
|
|
103
105
|
e.stopPropagation()
|
|
104
106
|
if (
|
|
105
107
|
dialogBackFnRef.current.onBeforeConfirm &&
|
|
106
108
|
typeof dialogBackFnRef.current.onBeforeConfirm === 'function'
|
|
107
109
|
) {
|
|
108
110
|
dialogBackFnRef.current.onBeforeConfirm(
|
|
109
111
|
hideDialog,
|
|
110
112
|
dialogConfig,
|
|
111
113
|
)
|
|
112
114
|
} else {
|
|
113
115
|
closeDialog()
|
|
114
116
|
dialogBackFnRef.current.onConfirm &&
|
|
115
117
|
typeof dialogBackFnRef.current.onConfirm === 'function' &&
|
|
116
118
|
dialogBackFnRef.current.onConfirm(dialogConfig)
|
|
117
119
|
}
|
|
118
120
|
},
|
|
119
121
|
[dialogConfig],
|
|
120
122
|
)
|
|
121
123
|
const dialogCloseFn = useCallback(
|
|
122
124
|
(e) => {
|
|
123
125
|
e.stopPropagation()
|
|
124
126
|
closeDialog()
|
|
125
127
|
dialogBackFnRef.current.onClose &&
|
|
126
128
|
typeof dialogBackFnRef.current.onClose === 'function' &&
|
|
127
129
|
dialogBackFnRef.current.onClose(dialogConfig)
|
|
128
130
|
},
|
|
129
131
|
[dialogConfig],
|
|
130
132
|
)
|
|
131
133
|
const dialogBackgroundFn = useCallback(() => {
|
|
132
134
|
if (dialogConfig.maskCloseable) {
|
|
133
135
|
closeDialog()
|
|
134
136
|
}
|
|
135
137
|
if (
|
|
136
138
|
dialogBackFnRef.current.onBackground &&
|
|
137
139
|
typeof dialogBackFnRef.current.onBackground === 'function'
|
|
138
140
|
) {
|
|
139
141
|
dialogBackFnRef.current.onBackground()
|
|
140
142
|
}
|
|
141
143
|
}, [dialogConfig])
|
|
142
144
|
const renderCustomViewCompontent = (children) => {
|
|
143
145
|
return <>{children}</>
|
|
144
146
|
}
|
|
145
147
|
return dialogShowState ? renderCustomViewCompontent(
|
|
146
148
|
<>
|
|
147
149
|
<View
|
|
148
150
|
className={classNames(dialogStyle['d-dialog-layout'],"J_customLayout")}
|
|
149
151
|
onClick={dialogBackgroundFn}
|
|
150
152
|
>
|
|
151
153
|
<View
|
|
152
154
|
className={classNames(
|
|
153
155
|
dialogStyle['d-dialog-wrap'],
|
|
154
156
|
dialogStyle[`d-dialog-type-${dialogConfig.type}`],
|
|
155
157
|
{
|
|
156
158
|
[dialogStyle['d-dialog-jdapp-wrap']]: isJdApp
|
|
157
159
|
},
|
|
158
160
|
'flexible-center-box',
|
|
159
161
|
dialogConfig.className,
|
|
160
162
|
)}
|
|
161
163
|
>
|
|
162
164
|
{dialogConfig.isCustom ? (
|
|
163
165
|
dialogConfig.bodyNode ? (
|
|
164
166
|
dialogConfig.bodyNode
|
|
165
167
|
) : null
|
|
166
168
|
) : (
|
|
167
169
|
<View
|
|
168
170
|
className={classNames(
|
|
169
171
|
dialogStyle['d-dialog-content'],
|
|
170
172
|
'd-dialog-content',
|
|
171
173
|
)}
|
|
172
174
|
onClick={(e) => e.stopPropagation()}
|
|
173
175
|
>
|
|
174
176
|
{dialogConfig.title && dialogConfig.title != '' && (
|
|
175
177
|
<View
|
|
176
178
|
className={classNames(
|
|
177
179
|
dialogStyle['d-dialog-header'],
|
|
178
180
|
'd-dialog-header',
|
|
179
181
|
)}
|
|
180
182
|
>
|
|
181
183
|
{dialogConfig.title}
|
|
182
184
|
</View>
|
|
183
185
|
)}
|
|
184
186
|
{dialogConfig.message && (
|
|
185
187
|
<View
|
|
186
188
|
className={classNames(
|
|
187
189
|
dialogStyle['d-dialog-body'],
|
|
188
190
|
'd-dialog-body',
|
|
189
191
|
)}
|
|
190
192
|
>{dialogConfig.message}</View>
|
|
191
193
|
)}
|
|
192
194
|
{dialogConfig.bodyNode && (
|
|
193
195
|
<View
|
|
194
196
|
className={classNames(
|
|
195
197
|
dialogStyle['d-dialog-body'],
|
|
196
198
|
'd-dialog-body',
|
|
197
199
|
)}
|
|
198
200
|
>
|
|
199
201
|
{dialogConfig.bodyNode
|
|
200
202
|
? dialogConfig.bodyNode
|
|
201
203
|
: null}
|
|
202
204
|
</View>
|
|
203
205
|
)}
|
|
204
206
|
{dialogConfig.footerNode ? (
|
|
205
207
|
dialogConfig.footerNode
|
|
206
208
|
) : dialogConfig.hasFooter ? (
|
|
207
209
|
<View
|
|
208
210
|
className={classNames(
|
|
209
211
|
dialogStyle['d-dialog-footer'],
|
|
210
212
|
{
|
|
211
213
|
[dialogStyle['d-dialog-footer-btn-line']]: !dialogConfig.closeBtnHideState && !dialogConfig.confirmBtnHideState
|
|
212
214
|
},
|
|
213
215
|
'd-dialog-footer',
|
|
214
216
|
'flexible-box',
|
|
215
217
|
)}
|
|
216
218
|
>
|
|
217
219
|
{!dialogConfig.closeBtnHideState && (
|
|
218
220
|
<Button
|
|
219
221
|
className={classNames(
|
|
220
222
|
dialogStyle['d-dialog-btn'],
|
|
221
223
|
dialogStyle[
|
|
222
224
|
'd-dialog-cancel-btn'
|
|
223
225
|
],
|
|
224
226
|
'd-dialog-cancel-btn',
|
|
225
227
|
'adaptive-box-flex',
|
|
226
228
|
)}
|
|
227
229
|
form-type={dialogConfig.isFormDialog ? 'reset' : ''}
|
|
228
230
|
onClick={dialogCloseFn}
|
|
229
231
|
>
|
|
230
232
|
{dialogConfig.closeBtnText}
|
|
231
233
|
</Button>
|
|
232
234
|
)}
|
|
233
235
|
{!dialogConfig.confirmBtnHideState && (
|
|
234
236
|
<Button
|
|
235
237
|
className={classNames(
|
|
236
238
|
dialogStyle['d-dialog-btn'],
|
|
237
239
|
dialogStyle[
|
|
238
240
|
'd-dialog-ensure-btn'
|
|
239
241
|
],
|
|
240
242
|
'd-dialog-ensure-btn',
|
|
241
243
|
'adaptive-box-flex',
|
|
242
244
|
)}
|
|
243
245
|
onClick={dialogConfirmFn}
|
|
244
246
|
>
|
|
245
247
|
{dialogConfig.confirmBtnText}
|
|
246
248
|
</Button>
|
|
247
249
|
)}
|
|
248
250
|
</View>
|
|
249
251
|
) : null}
|
|
250
252
|
</View>
|
|
251
253
|
)
|
|
252
254
|
}
|
|
253
255
|
</View>
|
|
254
256
|
</View>
|
|
255
257
|
</>,
|
|
256
258
|
) : null
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import Taro from '@tarojs/taro'
|
|
2
|
const onClick = () => {
|
|
1
3
|
Taro.showToast({
|
|
2
4
|
title: 'cone-render动态化引入测试'
|
|
3
5
|
})
|
|
4
6
|
}
|
|
5
7
|
return <View className={styles['d-sub-dynamic']}>
|
|
6
8
|
<Button className={styles['d-btn']} onClick={onClick}>动态化楼层按钮测试</Button>
|
|
7
9
|
<Text className={styles['d-text']}>你好,动态化</Text>
|
|
8
10
|
</View>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import Taro from '@tarojs/taro'
|
|
2
1
|
const { type, className, reportData, customReportDataKey, customReportDataFn, trackCallback } = props
|
|
3
2
|
const isViewOnlineState =
|
|
4
3
|
taroJdBaseInfo.info.pageInfo.dataType === BUSINESS_TYPE.ONLINE
|
|
5
4
|
const isCustomReport = customReportDataKey && customReportDataFn
|
|
6
5
|
const checkReportData = Array.isArray(reportData)
|
|
7
6
|
const [floorData, mInfo] = checkReportData ? reportData : []
|
|
8
7
|
const showRenderState = isCustomReport ? true : floorData && mInfo
|
|
9
8
|
const getFloorPointClassName = isCustomReport ? `J_custom_${customReportDataKey}` : `J_floor_${floorData?.uid}_index_${mInfo?.pos}`
|
|
10
9
|
const getTaroSelector = isCustomReport ? `#J_miniShopRoot >>> .${getFloorPointClassName}` : `#J_floor_${floorData?.uid} >>> .${getFloorPointClassName}`
|
|
11
10
|
useEffect(() => {
|
|
12
11
|
if (isViewOnlineState && reportData) {
|
|
13
12
|
Taro.nextTick(() => {
|
|
14
13
|
if (
|
|
15
14
|
!taroJdBaseInfo.info.pageInfo.floorExposureInfo[
|
|
16
15
|
getFloorPointClassName
|
|
17
16
|
]
|
|
18
17
|
){
|
|
19
18
|
const createIntersectionObserver = new intersectionObserver({
|
|
20
19
|
selector: getTaroSelector,
|
|
21
20
|
context: this,
|
|
22
21
|
onFinal: (res) => {
|
|
23
22
|
taroJdBaseInfo.info.pageInfo.floorExposureInfo[
|
|
24
23
|
getFloorPointClassName
|
|
25
24
|
] = true
|
|
26
25
|
console.log('小程序曝光埋点收到进入可视区域啦!', getFloorPointClassName, reportData, res)
|
|
27
26
|
if(!isCustomReport){
|
|
28
27
|
addReportData(reportData)
|
|
29
28
|
typeof trackCallback === 'function' && trackCallback(reportData)
|
|
30
29
|
}else {
|
|
31
30
|
typeof customReportDataFn === 'function' && customReportDataFn(customReportDataKey)
|
|
32
31
|
}
|
|
33
32
|
createIntersectionObserver.disconnect()
|
|
34
33
|
},
|
|
35
34
|
})
|
|
36
35
|
createIntersectionObserver.connect()
|
|
37
36
|
}
|
|
38
37
|
})
|
|
39
38
|
}
|
|
40
39
|
}, [])
|
|
41
40
|
return (showRenderState ? (
|
|
42
41
|
<View
|
|
43
42
|
className={classNames(
|
|
44
43
|
{
|
|
45
44
|
[exposureStyle['d-report-point']]: type === TrackType.point,
|
|
46
45
|
},
|
|
47
46
|
{
|
|
48
47
|
[exposureStyle['d-report-floor']]: type === TrackType.floor,
|
|
49
48
|
},
|
|
50
49
|
getFloorPointClassName,
|
|
51
50
|
className,
|
|
52
51
|
)}
|
|
53
52
|
/>
|
|
54
53
|
) : null
|
|
55
54
|
)
|
|
56
55
|
return useMemo(() => {
|
|
57
56
|
return <ExposureFloor {...props} />
|
|
58
57
|
}, [])
|
|
59
58
|
reportData: null,
|
|
60
59
|
trackCallback: null,
|
|
61
60
|
type: TrackType.point,
|
|
61
|
+
import Taro from '@tarojs/taro'
|
|
62
62
|
const { type = TrackType.point, className, reportData = null, customReportDataKey, customReportDataFn, trackCallback = null } = props
|
|
63
63
|
const isViewOnlineState =
|
|
64
64
|
taroJdBaseInfo.info.pageInfo.dataType === BUSINESS_TYPE.ONLINE
|
|
65
65
|
const isCustomReport = customReportDataKey && customReportDataFn
|
|
66
66
|
const checkReportData = Array.isArray(reportData)
|
|
67
67
|
const [floorData, mInfo] = checkReportData ? reportData : []
|
|
68
68
|
const showRenderState = isCustomReport ? true : floorData && mInfo
|
|
69
69
|
const getFloorPointClassName = isCustomReport ? `J_custom_${customReportDataKey}` : `J_floor_${floorData?.uid}_index_${mInfo?.pos}`
|
|
70
70
|
const getTaroSelector = !isDynamic ? isCustomReport ? `#J_miniShopRoot >>> .${getFloorPointClassName}` : `#J_floor_${floorData?.uid} >>> .${getFloorPointClassName}` : isCustomReport ? `#J_shopRoot .${getFloorPointClassName}` : `#J_floor_${floorData?.uid} .${getFloorPointClassName}`
|
|
71
71
|
useEffect(() => {
|
|
72
72
|
if (isViewOnlineState && reportData) {
|
|
73
73
|
Taro.nextTick(() => {
|
|
74
74
|
if (
|
|
75
75
|
!taroJdBaseInfo.info.pageInfo.floorExposureInfo[
|
|
76
76
|
getFloorPointClassName
|
|
77
77
|
]
|
|
78
78
|
){
|
|
79
79
|
const createIntersectionObserver = new intersectionObserver({
|
|
80
80
|
selector: getTaroSelector,
|
|
81
81
|
context: this,
|
|
82
82
|
onFinal: (res) => {
|
|
83
83
|
taroJdBaseInfo.info.pageInfo.floorExposureInfo[
|
|
84
84
|
getFloorPointClassName
|
|
85
85
|
] = true
|
|
86
86
|
console.log(`${isDynamic ? 'taro动态化' : '小程序'}曝光埋点收到进入可视区域啦!`, getFloorPointClassName, reportData, res)
|
|
87
87
|
if(!isCustomReport){
|
|
88
88
|
addReportData(reportData)
|
|
89
89
|
typeof trackCallback === 'function' && trackCallback(reportData)
|
|
90
90
|
}else {
|
|
91
91
|
typeof customReportDataFn === 'function' && customReportDataFn(customReportDataKey)
|
|
92
92
|
}
|
|
93
93
|
createIntersectionObserver.disconnect()
|
|
94
94
|
},
|
|
95
95
|
})
|
|
96
96
|
createIntersectionObserver.connect()
|
|
97
97
|
}
|
|
98
98
|
})
|
|
99
99
|
}
|
|
100
100
|
}, [])
|
|
101
101
|
return (showRenderState ? (
|
|
102
102
|
<View
|
|
103
103
|
className={classNames(
|
|
104
104
|
{
|
|
105
105
|
[exposureStyle['d-report-point']]: type === TrackType.point,
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
[exposureStyle['d-report-floor']]: type === TrackType.floor,
|
|
109
109
|
},
|
|
110
110
|
getFloorPointClassName,
|
|
111
111
|
className,
|
|
112
112
|
)}
|
|
113
113
|
/>
|
|
114
114
|
) : null
|
|
115
115
|
)
|
|
116
116
|
return useMemo(() => {
|
|
117
117
|
return <ExposureFloor {...props} />
|
|
118
118
|
}, [])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React, { useRef } from 'react';
|
|
2
1
|
const {
|
|
3
2
|
className,
|
|
4
3
|
pointClassName,
|
|
5
4
|
children,
|
|
6
5
|
reportData,
|
|
7
6
|
customReportDataKey,
|
|
8
7
|
customReportDataFn,
|
|
9
8
|
trackCallback,
|
|
10
9
|
...otherProps
|
|
11
10
|
} = props;
|
|
12
11
|
const itemViewExposureRef = useRef(null);
|
|
13
12
|
const isCustomReport = customReportDataKey && customReportDataFn;
|
|
14
13
|
const checkReportData = Array.isArray(reportData);
|
|
15
14
|
const [floorData, mInfo] = checkReportData ? reportData : [];
|
|
16
15
|
const checkReportDataState = isCustomReport ? true : floorData && mInfo;
|
|
17
16
|
|
|
18
17
|
floorData && mInfo && !mInfo.hasOwnProperty('pos') && (mInfo.pos = 0);
|
|
19
18
|
return (
|
|
20
19
|
<View
|
|
21
20
|
ref={itemViewExposureRef}
|
|
22
21
|
className={classNames(itemViewExposureSmartStyle['d-item-point-layout'], className)}
|
|
23
22
|
{...otherProps}
|
|
24
23
|
>
|
|
25
24
|
{children ? children : null}
|
|
26
25
|
{checkReportDataState && (
|
|
27
26
|
<ExposureSmart
|
|
28
27
|
className={classNames(pointClassName, {
|
|
29
28
|
[itemViewExposureSmartStyle['d-item-chart-point']]: isChartH5,
|
|
30
29
|
})}
|
|
31
30
|
innerRef={itemViewExposureRef}
|
|
32
31
|
reportData={reportData}
|
|
33
32
|
trackCallback={trackCallback}
|
|
34
33
|
customReportDataFn={customReportDataFn}
|
|
35
34
|
customReportDataKey={customReportDataKey}
|
|
36
35
|
markPoint
|
|
37
36
|
/>
|
|
38
37
|
)}
|
|
39
38
|
</View>
|
|
40
39
|
);
|
|
41
40
|
reportData: [],
|
|
42
41
|
customReportDataKey: null,
|
|
43
42
|
customReportDataFn: null,
|
|
44
43
|
customReportDataForMapFn: null,
|
|
44
|
+
import React, { useRef } from 'react';
|
|
45
45
|
const {
|
|
46
46
|
className,
|
|
47
47
|
pointClassName,
|
|
48
48
|
children,
|
|
49
49
|
reportData = [],
|
|
50
50
|
customReportDataKey = null,
|
|
51
51
|
customReportDataFn = null,
|
|
52
52
|
trackCallback,
|
|
53
53
|
...otherProps
|
|
54
54
|
} = props;
|
|
55
55
|
const itemViewExposureRef = useRef(null);
|
|
56
56
|
const isCustomReport = customReportDataKey && customReportDataFn;
|
|
57
57
|
const checkReportData = Array.isArray(reportData);
|
|
58
58
|
const [floorData, mInfo] = checkReportData ? reportData : [];
|
|
59
59
|
const checkReportDataState = isCustomReport ? true : floorData && mInfo;
|
|
60
60
|
|
|
61
61
|
floorData && mInfo && !mInfo.hasOwnProperty('pos') && (mInfo.pos = 0);
|
|
62
62
|
return (
|
|
63
63
|
<View
|
|
64
64
|
ref={itemViewExposureRef}
|
|
65
65
|
className={classNames(itemViewExposureSmartStyle['d-item-point-layout'], className)}
|
|
66
66
|
{...otherProps}
|
|
67
67
|
>
|
|
68
68
|
{children ? children : null}
|
|
69
69
|
{checkReportDataState && (
|
|
70
70
|
<ExposureSmart
|
|
71
71
|
className={classNames(pointClassName, {
|
|
72
72
|
[itemViewExposureSmartStyle['d-item-chart-point']]: isChartH5,
|
|
73
73
|
})}
|
|
74
74
|
innerRef={itemViewExposureRef}
|
|
75
75
|
reportData={reportData}
|
|
76
76
|
trackCallback={trackCallback}
|
|
77
77
|
customReportDataFn={customReportDataFn}
|
|
78
78
|
customReportDataKey={customReportDataKey}
|
|
79
79
|
markPoint
|
|
80
80
|
/>
|
|
81
81
|
)}
|
|
82
82
|
</View>
|
|
83
83
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
2
|
className: null,
|
|
3
3
|
hideState: false,
|
|
4
4
|
fullState: false,
|
|
5
5
|
localState: false,
|
|
6
6
|
style: {},
|
|
7
7
|
text: null,
|
|
8
8
|
const { className, hideState, fullState, localState, style, text } = Object.assign({},defaultProps,props)
|
|
9
9
|
return (
|
|
10
10
|
<View
|
|
11
11
|
style={style}
|
|
12
12
|
className={classNames(jdLoadingStyle['d-jd-loading'], className, {
|
|
13
13
|
[jdLoadingStyle['d-jd-full-loading']]: fullState,
|
|
14
14
|
[jdLoadingStyle['d-jd-local-loading']]: localState,
|
|
15
15
|
[jdLoadingStyle['d-jd-loading-hide']]: hideState,
|
|
16
16
|
})}
|
|
17
17
|
>
|
|
18
18
|
<Image
|
|
19
19
|
className={jdLoadingStyle['d-loading-image']}
|
|
20
20
|
src={JD_LOADING_GIF}
|
|
21
21
|
/>
|
|
22
22
|
{text && (
|
|
23
23
|
<Text className={jdLoadingStyle['d-loading-text']}>{text}</Text>
|
|
24
24
|
)}
|
|
25
25
|
</View>
|
|
26
26
|
)
|