@conecli/cone-render 0.9.1-shop2.0 → 0.9.1-shop2.10
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/environmentType.ts +1 -0
- package/dist/common/index.h5.ts +1 -1
- package/dist/common/index.jd.ts +1 -1
- package/dist/common/index.ts +1 -1
- package/dist/common/index.weapp.ts +1 -1
- package/dist/common/jssdk.ts +1 -0
- package/dist/common/pageType.ts +1 -0
- package/dist/common/sgmCustomCode.ts +1 -0
- package/dist/common/token/index.h5.ts +1 -1
- package/dist/common/token/token.jd.ts +1 -1
- package/dist/common/token/token.ts +1 -1
- package/dist/common/wxappApi.jd.ts +1 -0
- package/dist/components/ErrorBoundary.tsx +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.jd.tsx +1 -0
- package/dist/components/base/CustomScrollView/index.module.scss +7 -0
- package/dist/components/base/CustomScrollView/index.tsx +1 -1
- package/dist/components/base/Dialog/index.module.scss +5 -0
- package/dist/components/base/Dialog/index.tsx +1 -1
- package/dist/components/base/Exposure/index.h5.tsx +1 -1
- package/dist/components/base/ExposureSmart/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/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/LazyLoadImage/const.ts +1 -1
- package/dist/components/base/LazyLoadImage/index.h5.module.scss +20 -20
- package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
- package/dist/components/base/MobileCommonHeader/index.module.scss +9 -0
- package/dist/components/base/MobileCommonHeader/index.tsx +1 -0
- package/dist/components/base/NetworkDataError/const.ts +1 -1
- package/dist/components/base/NetworkDataError/index.module.scss +4 -0
- package/dist/components/base/NetworkDataError/index.tsx +1 -1
- package/dist/components/base/Price/Double/index.tsx +1 -1
- package/dist/components/base/Price/index.tsx +1 -1
- package/dist/components/decorate/DecorateFloorModule/index.module.scss +21 -2
- package/dist/components/decorate/DecorateFloorModule/index.tsx +1 -1
- package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
- package/dist/components/floorItem.jd.tsx +1 -1
- package/dist/components/floorItem.tsx +1 -1
- package/dist/components/floorItem.weapp.tsx +1 -1
- package/dist/components/isv/Floor/index.tsx +1 -1
- package/dist/components/remoteFloorItem.tsx +1 -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/interface/utils.ts +1 -1
- package/dist/jumpEventReport/base.ts +1 -1
- package/dist/jumpEventReport/const.ts +1 -1
- package/dist/jumpEventReport/createReportFloorData.ts +1 -1
- package/dist/jumpEventReport/index.h5.ts +1 -1
- package/dist/jumpEventReport/index.jd.ts +1 -1
- package/dist/jumpEventReport/index.weapp.ts +1 -1
- package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
- package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
- package/dist/jumpEventReport/logEventConfig.ts +1 -1
- package/dist/jumpEventReport/web/report.ts +1 -1
- package/dist/jumpEventReport/web.base.ts +1 -1
- package/dist/jumpEventReport/web.jd.ts +1 -1
- package/dist/jumpEventReport/web.jdb.ts +1 -1
- package/dist/jumpEventReport/web.jdjch.ts +1 -1
- package/dist/jumpEventReport/web.jxwxapp.ts +1 -0
- package/dist/jumpEventReport/web.pc.ts +1 -0
- package/dist/jumpEventReport/web.tjapp.ts +1 -0
- package/dist/jumpEventReport/web.tjm.ts +1 -0
- package/dist/jumpEventReport/web.wxapp.ts +1 -1
- package/dist/modules/ContainerFloorList/index.h5.module.scss +17 -1
- package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
- package/dist/modules/ContainerFloorList/index.tsx +1 -1
- package/dist/open/api/environment.ts +1 -1
- package/dist/open/api/index.ts +1 -1
- package/dist/open/api/jump copy.ts +1 -1
- package/dist/open/api/shopMember.ts +1 -1
- package/dist/open/api/track.ts +1 -1
- package/dist/open/api/util.ts +1 -1
- package/dist/open/components/index.ts +1 -1
- package/dist/sass/app.h5.scss +39 -3
- package/dist/sass/base.scss +12 -0
- package/dist/service/fetchGateway.ts +1 -1
- package/dist/service/http/const.ts +1 -1
- package/dist/service/requestServer.ts +1 -1
- package/dist/utils/connectNativeJsBridge.ts +1 -1
- package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
- package/dist/utils/draExceptionAndProfile.ts +1 -1
- package/dist/utils/h5Utils.ts +1 -1
- package/dist/utils/index.h5.ts +1 -1
- package/dist/utils/index.ts +1 -1
- package/dist/utils/index.weapp.ts +1 -1
- package/dist/utils/jm-common.js +1 -1
- package/dist/utils/sgmCodeUtils.ts +1 -0
- package/dist/utils/taroRenderUtil.ts +1 -1
- package/dist/utils/utils.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
const { floorData, renderSourceType, builtInComponents = {} } = props
|
|
3
2
|
const isDevMode = renderSourceType === BUSINESS_TYPE.DECORATE
|
|
4
3
|
const floorModuleType: any = floorData?.floorExtInfo?.moduleFlag
|
|
5
4
|
const FloorContentItem =
|
|
6
5
|
(floorModuleType && builtInComponents[floorModuleType]) || null
|
|
7
6
|
const dataDefines = getFloorDataToDataDefines(floorData)
|
|
8
7
|
|
|
9
8
|
const renderDecorateDefaultModule = () => {
|
|
10
9
|
return (
|
|
11
10
|
<View
|
|
12
11
|
style={{
|
|
13
12
|
lineHeight: '120px',
|
|
14
13
|
textAlign: 'center',
|
|
15
14
|
}}
|
|
16
15
|
>
|
|
17
16
|
当前模块是{floorData.moduleName}
|
|
18
17
|
</View>
|
|
19
18
|
)
|
|
20
19
|
}
|
|
21
20
|
if (floorModuleType && RemoteLoadFloorList.includes(floorModuleType)) {
|
|
22
21
|
return (
|
|
23
22
|
<RemoteFloorItem {...props} dataDefines={dataDefines}></RemoteFloorItem>
|
|
24
23
|
)
|
|
25
24
|
} else {
|
|
26
25
|
return FloorContentItem ? (
|
|
27
26
|
<ErrorBoundary {...props}>
|
|
28
27
|
<FloorContentItem {...props} dataDefines={dataDefines} />
|
|
29
28
|
</ErrorBoundary>
|
|
30
29
|
) : isDevMode ? (
|
|
31
30
|
renderDecorateDefaultModule()
|
|
32
31
|
) : null
|
|
33
32
|
}
|
|
34
33
|
renderSourceType: BUSINESS_TYPE.ONLINE,
|
|
35
34
|
switch (moduleId) {
|
|
36
35
|
case 83158:
|
|
37
36
|
return 'freeLayout'
|
|
38
37
|
case 99654:
|
|
39
38
|
return 'activeText'
|
|
40
39
|
case 100382:
|
|
41
40
|
return 'superGoods'
|
|
42
41
|
}
|
|
43
42
|
floorList.map((item) => {
|
|
44
43
|
if (!item.floorExtInfo) {
|
|
45
44
|
return null
|
|
46
45
|
}
|
|
47
46
|
const moduleFlag = item.floorExtInfo.moduleFlag
|
|
48
47
|
if (!moduleFlag) {
|
|
49
48
|
const newModuleFlag = moduleId2ModuleFlag(item.moduleId)
|
|
50
49
|
if (newModuleFlag) {
|
|
51
50
|
item.floorExtInfo.moduleFlag = newModuleFlag
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
53
|
})
|
|
54
|
+
import React from 'react'
|
|
55
55
|
const { floorData, renderSourceType, builtInComponents = {} } = props
|
|
56
56
|
const isDevMode = renderSourceType === BUSINESS_TYPE.DECORATE
|
|
57
57
|
const floorModuleType: any = floorData?.floorExtInfo?.moduleFlag
|
|
58
58
|
const FloorContentItem =
|
|
59
59
|
(floorModuleType && builtInComponents[floorModuleType]) || null
|
|
60
60
|
const dataDefines = getFloorDataToDataDefines(floorData)
|
|
61
61
|
|
|
62
62
|
const renderDecorateDefaultModule = () => {
|
|
63
63
|
return (
|
|
64
64
|
<View
|
|
65
65
|
style={{
|
|
66
66
|
lineHeight: '120px',
|
|
67
67
|
textAlign: 'center',
|
|
68
68
|
}}
|
|
69
69
|
>
|
|
70
70
|
当前模块是{floorData.moduleName}
|
|
71
71
|
</View>
|
|
72
72
|
)
|
|
73
73
|
}
|
|
74
74
|
if (floorModuleType && (RemoteLoadFloorList.includes(floorModuleType) || floorData?.floorExtInfo?.floorLoadWay === 2)) {
|
|
75
75
|
return (
|
|
76
76
|
<RemoteFloorItem {...props} dataDefines={dataDefines}></RemoteFloorItem>
|
|
77
77
|
)
|
|
78
78
|
} else {
|
|
79
79
|
return FloorContentItem ? (
|
|
80
80
|
<ErrorBoundary {...props}>
|
|
81
81
|
<FloorContentItem {...props} dataDefines={dataDefines} />
|
|
82
82
|
</ErrorBoundary>
|
|
83
83
|
) : isDevMode ? (
|
|
84
84
|
renderDecorateDefaultModule()
|
|
85
85
|
) : null
|
|
86
86
|
}
|
|
87
87
|
renderSourceType: BUSINESS_TYPE.ONLINE,
|
|
88
88
|
switch (moduleId) {
|
|
89
89
|
case 83158:
|
|
90
90
|
return 'freeLayout'
|
|
91
91
|
case 99654:
|
|
92
92
|
return 'activeText'
|
|
93
93
|
case 100382:
|
|
94
94
|
return 'superGoods'
|
|
95
95
|
}
|
|
96
96
|
floorList.map((item) => {
|
|
97
97
|
if (!item.floorExtInfo) {
|
|
98
98
|
return null
|
|
99
99
|
}
|
|
100
100
|
const moduleFlag = item.floorExtInfo.moduleFlag
|
|
101
101
|
if (!moduleFlag) {
|
|
102
102
|
const newModuleFlag = moduleId2ModuleFlag(item.moduleId)
|
|
103
103
|
if (newModuleFlag) {
|
|
104
104
|
item.floorExtInfo.moduleFlag = newModuleFlag
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
return FloorContentItem ? (
|
|
3
2
|
<FloorContentItem {...props} dataDefines={dataDefines} />
|
|
4
3
|
) : isDevMode ? (
|
|
5
4
|
renderDecorateDefaultModule()
|
|
6
5
|
) : null
|
|
6
|
+
import React from 'react'
|
|
7
7
|
return FloorContentItem ? (
|
|
8
8
|
<ErrorBoundary {...props}>
|
|
9
9
|
<FloorContentItem {...props} dataDefines={dataDefines} />
|
|
10
10
|
</ErrorBoundary>
|
|
11
11
|
) : isDevMode ? (
|
|
12
12
|
renderDecorateDefaultModule()
|
|
13
13
|
) : null
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React, { useCallback } from 'react'
|
|
2
1
|
{floorData?.showCommonFloorHead === false ? null : (
|
|
3
2
|
<CommonFloorHead dataDefines={dataDefines} floorData={floorData} />
|
|
4
3
|
)}
|
|
4
|
+
import React, { useCallback } from 'react'
|
|
5
5
|
const getRenderRealTimeKeyObj = {
|
|
6
6
|
key: isRealTimeRender ? Date.now() : forceRenderTime
|
|
7
7
|
}
|
|
8
8
|
console.log("远程加载楼层渲染key信息", getRenderRealTimeKeyObj)
|
|
9
9
|
{floorData?.showCommonFloorHead === false ? null : <CommonFloorHead dataDefines={dataDefines} floorData={floorData} {...getRenderRealTimeKeyObj} />}
|
|
10
10
|
...getRenderRealTimeKeyObj
|
|
11
11
|
isRealTimeRender: false,
|
|
12
12
|
forceRenderTime: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React, { Suspense, lazy } from 'react'
|
|
2
1
|
getBundleUrl,
|
|
3
2
|
getBundleFileName,
|
|
4
3
|
formatPackResult,
|
|
5
4
|
const { floorData, renderSourceType, updateContainerFloorListDataFn } = props
|
|
6
5
|
const dataDefines = getFloorDataToDataDefines(floorData)
|
|
7
6
|
|
|
8
7
|
const getFloorSetHeight = (item) => {
|
|
9
8
|
const getHeight = item?.floorExtInfo?.floorHeight
|
|
10
9
|
? Number(item?.floorExtInfo?.floorHeight)
|
|
11
10
|
: 200
|
|
12
11
|
return getHeight > 0 ? getHeight : 200
|
|
13
12
|
}
|
|
14
13
|
console.log(
|
|
15
14
|
'>>>>>>>>>> floorModuleType === FloorModuleType.ISVDESIGNERH5MODULE >>>>>>>>>>',
|
|
16
15
|
)
|
|
17
16
|
const renderResult = (() => {
|
|
18
17
|
try {
|
|
19
18
|
console.log('>>>>>>>>>> 开始渲染1个isv模块 >>>>>>>>>>')
|
|
20
19
|
console.log(
|
|
21
20
|
'==========当前业务类型renderSourceType、楼层floorId: ',
|
|
22
21
|
renderSourceType,
|
|
23
22
|
floorData.uid,
|
|
24
23
|
)
|
|
25
24
|
const modularPackResult = floorData?.floorExtInfo?.modularPackResult
|
|
26
25
|
const modularPackResultObj = formatPackResult(modularPackResult)
|
|
27
26
|
const bundleUrl = getBundleUrl(modularPackResultObj)
|
|
28
27
|
const bundleFileName = getBundleFileName(modularPackResultObj)
|
|
29
28
|
const opt = {
|
|
30
29
|
msg: `店铺首页isv h5楼层隐藏不显示。原因:modularPackResult数据不完备。页面类型-buildType: ${buildType}。楼层顺序-floorIdx: ${floorData?.floorIdx}`,
|
|
31
30
|
buildType,
|
|
32
31
|
uid: floorData?.uid,
|
|
33
32
|
floorIdx: floorData?.floorIdx,
|
|
34
33
|
shopId: floorData?.floorExtInfo?.shopId,
|
|
35
34
|
moduleId: floorData?.moduleId,
|
|
36
35
|
moduleName: floorData?.moduleName,
|
|
37
36
|
middleTemplateId: floorData?.middleTemplateId,
|
|
38
37
|
modularPackResult: modularPackResult,
|
|
39
38
|
}
|
|
40
39
|
if (bundleUrl && bundleFileName) {
|
|
41
40
|
let ISVModule =
|
|
42
41
|
taroJdBaseInfo?.renderedIsvComponents[
|
|
43
42
|
`${floorData.uid}_${bundleFileName}`
|
|
44
43
|
] || null
|
|
45
44
|
if (!ISVModule) {
|
|
46
45
|
ISVModule = lazy(() => import(bundleFileName + '@@@@@@' + bundleUrl))
|
|
47
46
|
console.log(
|
|
48
47
|
'1|加载isv模块==========走lazy import生成新的isv模块react组件',
|
|
49
48
|
bundleFileName,
|
|
50
49
|
)
|
|
51
50
|
taroJdBaseInfo.renderedIsvComponents[
|
|
52
51
|
`${floorData.uid}_${bundleFileName}`
|
|
53
52
|
] = ISVModule
|
|
54
53
|
console.log(
|
|
55
54
|
'2|渲染isv模块的react组件==========,window.taroJshopH5WebpackJsonp上的组件是否已就绪: ',
|
|
56
55
|
bundleFileName,
|
|
57
56
|
window['taroJshopH5WebpackJsonp'].find(
|
|
58
57
|
(item) => item[0][0] == bundleFileName,
|
|
59
58
|
),
|
|
60
59
|
)
|
|
61
60
|
} else {
|
|
62
61
|
console.log(
|
|
63
62
|
'1|加载isv模块==========不走lazy import生成新的isv模块react组件,从已加载中获取,taroJdBaseInfo: ',
|
|
64
63
|
taroJdBaseInfo,
|
|
65
64
|
)
|
|
66
65
|
console.log(
|
|
67
66
|
'2|渲染isv模块的react组件==========,taroJdBaseInfo.renderedIsvComponents上的组件是否已就绪: ',
|
|
68
67
|
taroJdBaseInfo.renderedIsvComponents[
|
|
69
68
|
`${floorData.uid}_${bundleFileName}`
|
|
70
69
|
],
|
|
71
70
|
)
|
|
72
71
|
}
|
|
73
72
|
const _floorHeight = getFloorSetHeight(floorData)
|
|
74
73
|
return (
|
|
75
74
|
<ErrorBoundary {...props}>
|
|
76
75
|
<Suspense
|
|
77
76
|
fallback={
|
|
78
77
|
<View
|
|
79
78
|
style={{
|
|
80
79
|
position: 'relative',
|
|
81
80
|
background: `#ffffff url('${JD_PLACEHOLDER_IMG}') center center no-repeat`,
|
|
82
81
|
height: `${_floorHeight}px`,
|
|
83
82
|
}}
|
|
84
83
|
></View>
|
|
85
84
|
}
|
|
86
85
|
>
|
|
87
86
|
<ISVFloor {...props} dataDefines={dataDefines}>
|
|
88
87
|
<ISVModule {...props} dataDefines={dataDefines}></ISVModule>
|
|
89
88
|
</ISVFloor>
|
|
90
89
|
</Suspense>
|
|
91
90
|
</ErrorBoundary>
|
|
92
91
|
)
|
|
93
92
|
} else {
|
|
94
93
|
console.log(
|
|
95
94
|
'3|isv模块渲染异常,modularPackResult中缺少bundleUrl或bundleFileName==========modularPackResult: ',
|
|
96
95
|
modularPackResultObj,
|
|
97
96
|
)
|
|
98
97
|
sgmCustomReport({
|
|
99
98
|
code: 'isvModuleError',
|
|
100
99
|
msg: opt,
|
|
101
100
|
})
|
|
102
101
|
return null
|
|
103
102
|
}
|
|
104
103
|
} catch (err) {
|
|
105
104
|
console.log('3|isv模块渲染异常,floorItem逻辑错误==========err: ', err)
|
|
106
105
|
sgmCustomReport({
|
|
107
106
|
code: 'isvModuleError',
|
|
108
107
|
msg: {
|
|
109
108
|
msg: 'remoteFloorItem try catch 异常',
|
|
110
109
|
err,
|
|
111
110
|
},
|
|
112
111
|
})
|
|
113
112
|
return null
|
|
114
113
|
}
|
|
115
114
|
})()
|
|
116
115
|
if (renderResult === null) {
|
|
117
116
|
updateContainerFloorListDataFn &&
|
|
118
117
|
updateContainerFloorListDataFn({
|
|
119
118
|
type: 'filter',
|
|
120
119
|
containerId: floorData?.uid,
|
|
121
120
|
})
|
|
122
121
|
console.log('renderResult === null: 命中了!')
|
|
123
122
|
taroEventSendPageScrollInfo()
|
|
124
123
|
} else {
|
|
125
124
|
console.log('renderResult !== null: 没命中', renderResult)
|
|
126
125
|
}
|
|
127
126
|
return renderResult
|
|
127
|
+
import Taro from '@tarojs/taro'
|
|
128
128
|
getBundleUrl,
|
|
129
129
|
getBundleFileName,
|
|
130
130
|
formatPackResult,
|
|
131
131
|
const { floorData, renderSourceType, updateContainerFloorListDataFn } = props
|
|
132
132
|
const dataDefines = getFloorDataToDataDefines(floorData)
|
|
133
133
|
const [forceRenderTime,setForceRenderTime] = useState(1)
|
|
134
134
|
useEffect(() => {
|
|
135
135
|
isJdAndAndroidDevice && Taro.eventCenter.on(TaroEventType.FORCE_UPDATE_PAGE_LAYOUT, (_result) => {
|
|
136
136
|
setForceRenderTime(Date.now())
|
|
137
137
|
})
|
|
138
138
|
return () => {
|
|
139
139
|
isJdAndAndroidDevice && Taro.eventCenter.off(TaroEventType.FORCE_UPDATE_PAGE_LAYOUT)
|
|
140
140
|
}
|
|
141
141
|
},[])
|
|
142
142
|
|
|
143
143
|
const getFloorSetHeight = (item) => {
|
|
144
144
|
const getHeight = item?.floorExtInfo?.floorHeight
|
|
145
145
|
? Number(item?.floorExtInfo?.floorHeight)
|
|
146
146
|
: 200
|
|
147
147
|
return getHeight > 0 ? getHeight : 200
|
|
148
148
|
}
|
|
149
149
|
console.log(
|
|
150
150
|
'>>>>>>>>>> floorModuleType === FloorModuleType.ISVDESIGNERH5MODULE >>>>>>>>>>',
|
|
151
151
|
)
|
|
152
152
|
const renderResult = (() => {
|
|
153
153
|
try {
|
|
154
154
|
console.log('>>>>>>>>>> 开始渲染1个isv模块 >>>>>>>>>>')
|
|
155
155
|
console.log(
|
|
156
156
|
'==========当前业务类型renderSourceType、楼层floorId: ',
|
|
157
157
|
renderSourceType,
|
|
158
158
|
floorData.uid,
|
|
159
159
|
)
|
|
160
160
|
const modularPackResult = floorData?.floorExtInfo?.modularPackResult
|
|
161
161
|
const modularPackResultObj = formatPackResult(modularPackResult)
|
|
162
162
|
const bundleUrl = getBundleUrl(modularPackResultObj)
|
|
163
163
|
const bundleFileName = getBundleFileName(modularPackResultObj)
|
|
164
164
|
const opt = {
|
|
165
165
|
msg: `店铺h5楼层隐藏不显示。原因:模块数据不完备,楼层过滤。`,
|
|
166
166
|
floorIdx: floorData?.floorIdx,
|
|
167
167
|
uid: floorData?.uid,
|
|
168
168
|
shopId: floorData?.floorExtInfo?.shopId,
|
|
169
169
|
moduleId: floorData?.moduleId,
|
|
170
170
|
moduleDesignerType: floorData?.floorExtInfo?.moduleDesignerType,
|
|
171
171
|
floorLoadWay: floorData?.floorExtInfo?.floorLoadWay,
|
|
172
172
|
floorKind: floorData?.floorExtInfo?.floorKind,
|
|
173
173
|
middleTemplateId: floorData?.middleTemplateId,
|
|
174
174
|
modularPackResult: modularPackResult,
|
|
175
175
|
}
|
|
176
176
|
if (bundleUrl && bundleFileName) {
|
|
177
177
|
let ISVModule =
|
|
178
178
|
taroJdBaseInfo?.renderedIsvComponents[
|
|
179
179
|
`${floorData.uid}_${bundleFileName}`
|
|
180
180
|
] || null
|
|
181
181
|
if (!ISVModule) {
|
|
182
182
|
ISVModule = lazy(() => import(bundleFileName + '@@@@@@' + bundleUrl))
|
|
183
183
|
console.log(
|
|
184
184
|
'1|加载isv模块==========走lazy import生成新的isv模块react组件',
|
|
185
185
|
bundleFileName,
|
|
186
186
|
)
|
|
187
187
|
taroJdBaseInfo.renderedIsvComponents[
|
|
188
188
|
`${floorData.uid}_${bundleFileName}`
|
|
189
189
|
] = ISVModule
|
|
190
190
|
console.log(
|
|
191
191
|
'2|渲染isv模块的react组件==========,window.taroJshopH5WebpackJsonp上的组件是否已就绪: ',
|
|
192
192
|
bundleFileName,
|
|
193
193
|
window['taroJshopH5WebpackJsonp'].find(
|
|
194
194
|
(item) => item[0][0] == bundleFileName,
|
|
195
195
|
),
|
|
196
196
|
)
|
|
197
197
|
} else {
|
|
198
198
|
console.log(
|
|
199
199
|
'1|加载isv模块==========不走lazy import生成新的isv模块react组件,从已加载中获取,taroJdBaseInfo: ',
|
|
200
200
|
taroJdBaseInfo,
|
|
201
201
|
)
|
|
202
202
|
console.log(
|
|
203
203
|
'2|渲染isv模块的react组件==========,taroJdBaseInfo.renderedIsvComponents上的组件是否已就绪: ',
|
|
204
204
|
taroJdBaseInfo.renderedIsvComponents[
|
|
205
205
|
`${floorData.uid}_${bundleFileName}`
|
|
206
206
|
],
|
|
207
207
|
)
|
|
208
208
|
}
|
|
209
209
|
const _floorHeight = getFloorSetHeight(floorData)
|
|
210
210
|
return (
|
|
211
211
|
<ErrorBoundary {...props}>
|
|
212
212
|
<Suspense
|
|
213
213
|
fallback={
|
|
214
214
|
<View
|
|
215
215
|
style={{
|
|
216
216
|
position: 'relative',
|
|
217
217
|
background: `#ffffff url('${JD_PLACEHOLDER_IMG}') center center no-repeat`,
|
|
218
218
|
height: `${_floorHeight}px`,
|
|
219
219
|
}}
|
|
220
220
|
></View>
|
|
221
221
|
}
|
|
222
222
|
>
|
|
223
223
|
<ISVFloor {...props} dataDefines={dataDefines} forceRenderTime={forceRenderTime} isRealTimeRender={realTimerRenderTypeList.includes(taroJdBaseInfo.info.pageInfo.dataType)}>
|
|
224
224
|
<ISVModule {...props} dataDefines={dataDefines}></ISVModule>
|
|
225
225
|
</ISVFloor>
|
|
226
226
|
</Suspense>
|
|
227
227
|
</ErrorBoundary>
|
|
228
228
|
)
|
|
229
229
|
} else {
|
|
230
230
|
console.log(
|
|
231
231
|
'3|isv模块渲染异常,modularPackResult中缺少bundleUrl或bundleFileName==========modularPackResult: ',
|
|
232
232
|
modularPackResultObj,
|
|
233
233
|
)
|
|
234
234
|
sgmCustomReport({
|
|
235
235
|
code: getSgmCustomCode(SgmCustomCode.REMOTEMODULE_DATA),
|
|
236
236
|
msg: opt,
|
|
237
237
|
})
|
|
238
238
|
return null
|
|
239
239
|
}
|
|
240
240
|
} catch (err) {
|
|
241
241
|
console.log('3|isv模块渲染异常,floorItem逻辑错误==========err: ', err)
|
|
242
242
|
return null
|
|
243
243
|
}
|
|
244
244
|
})()
|
|
245
245
|
if (renderResult === null) {
|
|
246
246
|
updateContainerFloorListDataFn &&
|
|
247
247
|
updateContainerFloorListDataFn({
|
|
248
248
|
type: 'filter',
|
|
249
249
|
containerId: floorData?.uid,
|
|
250
250
|
})
|
|
251
251
|
console.log('renderResult === null: 命中了!')
|
|
252
252
|
taroEventSendPageScrollInfo()
|
|
253
253
|
} else {
|
|
254
254
|
console.log('renderResult !== null: 没命中', renderResult)
|
|
255
255
|
}
|
|
256
256
|
return renderResult
|
package/dist/interface/common.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
subMessage?: string
|
|
3
2
|
showCommonFloorHead?: boolean
|
|
4
3
|
customErrorIsvFloorModule?: React.ReactElement | undefined
|
|
5
4
|
containerIndex?: number
|
|
6
5
|
containerData?: any
|
|
7
6
|
shopTotalInfo?: any
|
|
8
7
|
selectContainerFn?: Function
|
|
9
8
|
selectContainerId?: string
|
|
10
9
|
placeHolderPreContainerId?: string
|
|
11
10
|
children?: any
|
|
12
11
|
style?: {
|
|
13
12
|
[key: string]: any
|
|
14
13
|
};
|
|
15
14
|
layoutLeftRightMargin?: number
|
|
16
15
|
}
|
|
17
16
|
onFormSubmit?: Function
|
|
18
17
|
onFormReset?: Function
|
|
19
18
|
isFormDialog?: boolean
|
|
20
19
|
forbiddenBgScrollState?: boolean
|
|
20
|
+
import React from 'react'
|
|
21
21
|
subMessage?: string
|
|
22
22
|
viewMaxHeight?: string
|
|
23
23
|
floorLoadWay?: number
|
|
24
24
|
floorKind?: number
|
|
25
25
|
shopId?: string
|
|
26
26
|
moduleDesignerType?: string
|
|
27
27
|
showCommonFloorHead?: boolean
|
|
28
28
|
borderRadius: number
|
|
29
29
|
borderTopLeftRadius?: number
|
|
30
30
|
borderTopRightRadius?: number
|
|
31
31
|
borderBottomLeftRadius?: number
|
|
32
32
|
borderBottomRightRadius?: number
|
|
33
33
|
marginTop?: number
|
|
34
34
|
marginBottom?: number
|
|
35
35
|
marginLeft?: number
|
|
36
36
|
marginRight?: number
|
|
37
37
|
paddingTop?: number
|
|
38
38
|
paddingBottom?: number
|
|
39
39
|
paddingLeft?: number
|
|
40
40
|
paddingRight?: number
|
|
41
41
|
containerId: string
|
|
42
42
|
background?: string
|
|
43
43
|
containerPosition?: string
|
|
44
44
|
key?: string
|
|
45
45
|
floors: floorItemData[]
|
|
46
46
|
includeUids: string[]
|
|
47
47
|
typeCn: string
|
|
48
48
|
typeCode?: string
|
|
49
49
|
addLuxuryStyle?: boolean
|
|
50
50
|
addLuxuryBackupStyle?: boolean
|
|
51
51
|
renderExtendComponent?: Function
|
|
52
52
|
floorExtendData?: any
|
|
53
53
|
}
|
|
54
54
|
isRealTimeRender: boolean
|
|
55
55
|
forceRenderTime: number
|
|
56
56
|
customErrorIsvFloorModule?: React.ReactElement | undefined
|
|
57
57
|
containerIndex?: number
|
|
58
58
|
containerData?: any
|
|
59
59
|
shopTotalInfo?: any
|
|
60
60
|
selectContainerFn?: Function
|
|
61
61
|
selectContainerId?: string
|
|
62
62
|
placeHolderPreContainerId?: string
|
|
63
63
|
children?: any
|
|
64
64
|
style?: {
|
|
65
65
|
[key: string]: any
|
|
66
66
|
};
|
|
67
67
|
layoutLeftRightMargin?: number
|
|
68
68
|
}
|
|
69
69
|
showDayToSecondState?: boolean
|
|
70
70
|
onFormSubmit?: Function
|
|
71
71
|
onFormReset?: Function
|
|
72
72
|
isFormDialog?: boolean
|
|
73
73
|
forbiddenBgScrollState?: boolean
|
|
74
74
|
evenList: any[]
|
|
75
75
|
oddList: any[]
|