@conecli/cone-render 0.8.19 → 0.8.20-beta.0
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.jd.ts +1 -1
- package/dist/common/isvStorage/index.h5.ts +1 -0
- package/dist/common/isvStorage/index.ts +1 -0
- package/dist/common/token/const.ts +1 -0
- package/dist/common/token/index.h5.ts +1 -0
- package/dist/common/token/index.ts +1 -0
- package/dist/common/token/token.jd.ts +1 -0
- package/dist/common/token/token.ts +1 -0
- package/dist/common/token/token.wxapp.ts +1 -0
- package/dist/components/base/CommonFloorHead/index.module.scss +1 -1
- package/dist/components/base/CommonFloorHead/index.tsx +1 -1
- package/dist/components/base/CustomVideo/const.ts +1 -0
- package/dist/components/base/CustomVideo/index.module.scss +40 -64
- package/dist/components/base/CustomVideo/index.tsx +1 -1
- package/dist/components/base/Dialog/index.module.scss +6 -2
- package/dist/components/base/Dialog/index.tsx +1 -1
- package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
- package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
- package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
- package/dist/components/base/NetworkDataError/const.ts +1 -1
- package/dist/components/base/NetworkDataError/index.module.scss +3 -0
- package/dist/components/base/NetworkDataError/index.tsx +1 -1
- package/dist/components/base/Price/{const.ts → Base/const.ts} +0 -0
- package/dist/components/base/Price/Base/index.module.scss +136 -0
- package/dist/components/base/Price/Base/index.tsx +1 -0
- package/dist/components/base/Price/Double/index.module.scss +158 -0
- package/dist/components/base/Price/Double/index.tsx +1 -0
- package/dist/components/base/Price/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.jd.tsx +1 -0
- package/dist/components/floorItem.tsx +1 -1
- package/dist/components/isv/Floor/index.tsx +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.h5.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 -0
- package/dist/jumpEventReport/web.wxapp.ts +1 -1
- package/dist/libs/taroAppReport.js +2 -2
- package/dist/modules/ContainerFloorList/index.tsx +1 -1
- package/dist/open/api/index.ts +1 -1
- package/dist/open/api/jump/business.ts +1 -0
- package/dist/open/api/jump/index.ts +1 -0
- package/dist/open/api/jump/minPath.ts +1 -0
- package/dist/open/api/jump/side.ts +1 -0
- package/dist/open/api/jump/webUrl.ts +1 -0
- package/dist/open/api/jump copy.ts +1 -0
- package/dist/open/api/moduleUtil.ts +1 -1
- package/dist/open/api/request.ts +1 -0
- package/dist/open/api/shopMember.ts +1 -0
- package/dist/open/api/userToken.ts +1 -0
- package/dist/service/bMallConst.ts +1 -0
- package/dist/service/bMallConst.wxapp.ts +1 -0
- package/dist/service/fetchGateway.ts +1 -0
- package/dist/service/fetchJsonp.ts +1 -0
- package/dist/service/http/colorSign.ts +1 -0
- package/dist/service/http/colorSign.wxapp.ts +1 -0
- package/dist/service/http/const.ts +1 -0
- package/dist/service/http/http.ts +1 -0
- package/dist/service/http/httpInterceptors.jd.ts +1 -0
- package/dist/service/http/httpInterceptors.ts +1 -0
- package/dist/service/http/index.ts +1 -0
- package/dist/service/requestServer.ts +1 -0
- package/dist/utils/connectNativeJsBridge.ts +1 -1
- package/dist/utils/connectNativeJsBridge.weapp.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/memberFormatUtils.js +1 -0
- package/dist/utils/priceUtils.js +1 -0
- package/dist/utils/ready.ts +1 -0
- package/dist/utils/utils.ts +1 -1
- package/package.json +5 -4
- package/dist/components/base/Price/index.module.scss +0 -136
- package/dist/open/api/jump.ts +0 -1
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
.wrap {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: row;
|
|
5
|
+
flex-wrap: wrap;
|
|
6
|
+
align-items: baseline;
|
|
7
|
+
line-height: 0; // 这个是保障不同平台(IOS、Android),不同font-size下多个行内元素文案底部还能对齐的基石
|
|
8
|
+
}
|
|
9
|
+
.childStyle {
|
|
10
|
+
transform: translateY(50%);
|
|
11
|
+
}
|
|
12
|
+
.bigStyle {
|
|
13
|
+
color: #fa2c19;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.bigNoPrice {
|
|
17
|
+
font-family: PingFang SC;
|
|
18
|
+
}
|
|
19
|
+
.bigNoPriceXL {
|
|
20
|
+
font-size: 48px;
|
|
21
|
+
}
|
|
22
|
+
.bigNoPriceL {
|
|
23
|
+
font-size: 42px;
|
|
24
|
+
}
|
|
25
|
+
.bigNoPriceM {
|
|
26
|
+
font-size: 36px;
|
|
27
|
+
}
|
|
28
|
+
.bigNoPriceS {
|
|
29
|
+
font-size: 30px;
|
|
30
|
+
}
|
|
31
|
+
.bigNoPriceXS {
|
|
32
|
+
font-size: 24px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.bigSymbol {
|
|
36
|
+
font-family: JDZhengHT-Regular;
|
|
37
|
+
}
|
|
38
|
+
.bigSymbolXL {
|
|
39
|
+
font-size: 28px;
|
|
40
|
+
}
|
|
41
|
+
.bigSymbolL {
|
|
42
|
+
font-size: 26px;
|
|
43
|
+
}
|
|
44
|
+
.bigSymbolM {
|
|
45
|
+
font-size: 24px;
|
|
46
|
+
}
|
|
47
|
+
.bigSymbolS {
|
|
48
|
+
font-size: 22px;
|
|
49
|
+
}
|
|
50
|
+
.bigSymbolXS {
|
|
51
|
+
font-size: 20px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.bigInteger {
|
|
55
|
+
font-family: JDZhengHT-Regular;
|
|
56
|
+
}
|
|
57
|
+
.bigIntegerXL {
|
|
58
|
+
font-size: 52px;
|
|
59
|
+
}
|
|
60
|
+
.bigIntegerL {
|
|
61
|
+
font-size: 46px;
|
|
62
|
+
}
|
|
63
|
+
.bigIntegerM {
|
|
64
|
+
font-size: 40px;
|
|
65
|
+
}
|
|
66
|
+
.bigIntegerS {
|
|
67
|
+
font-size: 34px;
|
|
68
|
+
}
|
|
69
|
+
.bigIntegerXS {
|
|
70
|
+
font-size: 28px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.bigDecimal {
|
|
74
|
+
font-family: JDZhengHT-Regular;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.bigDecimalXL {
|
|
78
|
+
font-size: 28px;
|
|
79
|
+
}
|
|
80
|
+
.bigDecimalL {
|
|
81
|
+
font-size: 26px;
|
|
82
|
+
}
|
|
83
|
+
.bigDecimalM {
|
|
84
|
+
font-size: 24px;
|
|
85
|
+
}
|
|
86
|
+
.bigDecimalS {
|
|
87
|
+
font-size: 22px;
|
|
88
|
+
}
|
|
89
|
+
.bigDecimalXS {
|
|
90
|
+
font-size: 20px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.priceDesc {
|
|
94
|
+
margin-left: 4px;
|
|
95
|
+
font-family: PingFang SC;
|
|
96
|
+
}
|
|
97
|
+
.priceDescXL {
|
|
98
|
+
font-size: 28px;
|
|
99
|
+
}
|
|
100
|
+
.priceDescL {
|
|
101
|
+
font-size: 26px;
|
|
102
|
+
}
|
|
103
|
+
.priceDescM {
|
|
104
|
+
font-size: 24px;
|
|
105
|
+
}
|
|
106
|
+
.priceDescS {
|
|
107
|
+
font-size: 22px;
|
|
108
|
+
}
|
|
109
|
+
.priceDescXS {
|
|
110
|
+
font-size: 20px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.missPriceDesc {
|
|
114
|
+
}
|
|
115
|
+
.smallStyle {
|
|
116
|
+
color: #8c8c8c;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.smallPrice {
|
|
120
|
+
font-family: JDZhengHT-Regular;
|
|
121
|
+
}
|
|
122
|
+
.smallPriceXL {
|
|
123
|
+
font-size: 28px;
|
|
124
|
+
}
|
|
125
|
+
.smallPriceL {
|
|
126
|
+
font-size: 26px;
|
|
127
|
+
}
|
|
128
|
+
.smallPriceM {
|
|
129
|
+
font-size: 24px;
|
|
130
|
+
}
|
|
131
|
+
.smallPriceS {
|
|
132
|
+
font-size: 22px;
|
|
133
|
+
}
|
|
134
|
+
.smallPriceXS {
|
|
135
|
+
font-size: 20px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.rightMargin {
|
|
139
|
+
margin-right: 16px;
|
|
140
|
+
}
|
|
141
|
+
.plusStyle {
|
|
142
|
+
color: #1c4b8c;
|
|
143
|
+
}
|
|
144
|
+
.fansStyle {
|
|
145
|
+
color: #8450e5;
|
|
146
|
+
}
|
|
147
|
+
.samStyle {
|
|
148
|
+
color: #3981e5;
|
|
149
|
+
}
|
|
150
|
+
.studentStyle {
|
|
151
|
+
color: #30bf26;
|
|
152
|
+
}
|
|
153
|
+
.yhdStyle {
|
|
154
|
+
color: #674431;
|
|
155
|
+
}
|
|
156
|
+
.memberStyle {
|
|
157
|
+
color: #f6b303;
|
|
158
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
const result = String(strPrice).match(/(-?\d+)\.?(\d+)?/);
|
|
1
3
|
if(result && Number(result[0]) > 0){
|
|
2
4
|
return {
|
|
3
5
|
integerPrice: result[1],
|
|
4
6
|
decimalPrice: (result[2] || '').replace(/0+$/, '')
|
|
5
7
|
}
|
|
6
8
|
}else{
|
|
7
9
|
return null;
|
|
8
10
|
}
|
|
9
11
|
const {
|
|
10
12
|
jdPrice,
|
|
11
13
|
finalPrice,
|
|
12
14
|
priceText = '',
|
|
13
15
|
priceType,
|
|
14
16
|
hitUserIdentity = false,
|
|
15
17
|
isAuctionWare,
|
|
16
18
|
fallbackRender = null,
|
|
17
19
|
className = null,
|
|
18
20
|
style = {},
|
|
19
21
|
childrenClassName = null,
|
|
20
22
|
bigNoPriceClassName = null,
|
|
21
23
|
bigSymbolClassName = null,
|
|
22
24
|
bigIntegerClassName = null,
|
|
23
25
|
bigDecimalClassName = null,
|
|
24
26
|
priceDescClassName = null,
|
|
25
27
|
smallPriceClassName = null,
|
|
26
28
|
lineNumber = 1,
|
|
27
29
|
size = 'M'
|
|
28
30
|
} = props
|
|
29
31
|
const especialHitStyleType = {
|
|
30
32
|
7: 'plusStyle',
|
|
31
33
|
9: 'samStyle'
|
|
32
34
|
}
|
|
33
35
|
const especialMissStyleType = {
|
|
34
36
|
7: 'plusStyle',
|
|
35
37
|
8: 'fansStyle',
|
|
36
38
|
9: 'samStyle',
|
|
37
39
|
10: 'studentStyle',
|
|
38
40
|
12: 'yhdStyle',
|
|
39
41
|
13: 'memberStyle'
|
|
40
42
|
}
|
|
41
43
|
const isNoPrice = priceType === 4
|
|
42
44
|
const isUseFinalPriceAsBigPrice = [1, 2, 6, 14, 16, 17, 18].includes(priceType)
|
|
43
45
|
const isEquivalentHit = isUseFinalPriceAsBigPrice || hitUserIdentity
|
|
44
46
|
const bigPriceObj = getDeconstructPrice(isEquivalentHit? finalPrice: jdPrice)
|
|
45
47
|
if(isAuctionWare || (!isNoPrice && bigPriceObj === null)){
|
|
46
48
|
return fallbackRender
|
|
47
49
|
}
|
|
48
50
|
const {integerPrice, decimalPrice = ''} = bigPriceObj || {}
|
|
49
51
|
const isOnlyShowBigPrice = priceType === 3
|
|
50
52
|
const isHideSmallPrice = priceType === 14
|
|
51
53
|
const smallPrice = isEquivalentHit? jdPrice: finalPrice
|
|
52
54
|
const isPriceDescInFront = isEquivalentHit
|
|
53
55
|
const hitColorStyle = isEquivalentHit? styles[especialHitStyleType[priceType]]: null
|
|
54
56
|
const missColorStyle = isEquivalentHit? null: styles[especialMissStyleType[priceType]]
|
|
55
57
|
const isBigPriceHasDecimal = decimalPrice !== '' && !/^0+$/.test(decimalPrice)
|
|
56
58
|
const sizeLineHeight = {
|
|
57
59
|
'XS': 28,
|
|
58
60
|
'S': 34,
|
|
59
61
|
'M': 40,
|
|
60
62
|
'L': 46,
|
|
61
63
|
'XL': 52
|
|
62
64
|
}
|
|
63
65
|
const lineHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25)
|
|
64
66
|
const wrapHeight = Taro.pxTransform(sizeLineHeight[size] * 1.25 * lineNumber)
|
|
65
67
|
const computedHeightStyle = {
|
|
66
68
|
height: wrapHeight
|
|
67
69
|
}
|
|
68
70
|
const itemCommonStyle = {
|
|
69
71
|
height: lineHeight
|
|
70
72
|
}
|
|
71
73
|
const needSizeStyles = ['bigNoPrice', 'bigSymbol', 'bigInteger', 'bigDecimal', 'priceDesc', 'smallPrice']
|
|
72
74
|
const sizeStyles = needSizeStyles.reduce((acc, cur) => {
|
|
73
75
|
acc[cur] = styles[cur + size]
|
|
74
76
|
return acc
|
|
75
77
|
}, {})
|
|
76
78
|
const noPriceShowText = priceText || (/^[\u4e00-\u9fa5]+$/.test(jdPrice)? jdPrice: '')
|
|
77
79
|
return (
|
|
78
80
|
<View className={classNames(styles.wrap, className)} style={{...computedHeightStyle, ...style}}>
|
|
79
81
|
{isNoPrice?
|
|
80
82
|
<Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigNoPrice, sizeStyles['bigNoPrice'], childrenClassName, bigNoPriceClassName)} style={{...itemCommonStyle}}>{noPriceShowText}</Text>
|
|
81
83
|
:
|
|
82
84
|
[
|
|
83
85
|
<Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigSymbol, sizeStyles['bigSymbol'], hitColorStyle, childrenClassName, bigSymbolClassName)} key="bigSymbol" style={{...itemCommonStyle}}>¥</Text>,
|
|
84
86
|
<Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigInteger, sizeStyles['bigInteger'], hitColorStyle, !isOnlyShowBigPrice && !isBigPriceHasDecimal && !isPriceDescInFront ? styles.rightMargin : null, childrenClassName, bigIntegerClassName)} key="bigInteger" style={{...itemCommonStyle}}>{integerPrice}</Text>,
|
|
85
87
|
isBigPriceHasDecimal?
|
|
86
88
|
<Text className={classNames(styles.childStyle, styles.bigStyle, styles.bigDecimal, sizeStyles['bigDecimal'], hitColorStyle, isPriceDescInFront ? null : styles.rightMargin, childrenClassName, bigDecimalClassName)} key="bigDecimal" style={{...itemCommonStyle}}>.{decimalPrice}</Text>
|
|
87
89
|
:
|
|
88
90
|
null
|
|
89
91
|
,
|
|
90
92
|
!isOnlyShowBigPrice && [
|
|
91
93
|
isPriceDescInFront && <Text className={classNames(styles.childStyle, styles.priceDesc, sizeStyles['priceDesc'], styles.bigStyle, hitColorStyle, isPriceDescInFront ? styles.rightMargin : null, childrenClassName, priceDescClassName)} key="descFront" style={{...itemCommonStyle}}>{priceText}</Text>,
|
|
92
94
|
smallPrice && !isHideSmallPrice ? <Text className={classNames(styles.childStyle, styles.smallPrice, sizeStyles['smallPrice'], styles.smallStyle, missColorStyle, childrenClassName, smallPriceClassName)} key="smallPrice" style={{...itemCommonStyle}}>¥{smallPrice}</Text> : null,
|
|
93
95
|
!isPriceDescInFront && <Text className={classNames(styles.childStyle, styles.priceDesc, sizeStyles['priceDesc'], styles.smallStyle, styles.missPriceDesc, missColorStyle, childrenClassName, priceDescClassName)} key="descBack" style={{...itemCommonStyle}}>{priceText}</Text>
|
|
94
96
|
]
|
|
95
97
|
]
|
|
96
98
|
}
|
|
97
99
|
</View>
|
|
98
100
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { View, Text } from '@tarojs/components'
|
|
1
|
+
import { View, Text } from '@tarojs/components'
|
|
2
2
|
'//img11.360buyimg.com/imagetools/jfs/t1/141506/22/31698/7923/637b6db9E2af80265/10e76e2c31e0e356.png'
|
|
3
3
|
const newModuleFloorTypeList = [100, 101, 100000, 99999]
|
|
4
4
|
const isNewFloorState = newModuleFloorTypeList.includes(moduleType)
|
|
5
5
|
if ((moduleType == 99999 || moduleType == 101) && !previewUri) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { View, Text } from '@tarojs/components'
|
|
1
|
+
import { View, Text } from '@tarojs/components'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { ComponentInterFace } from '../interface/component'
|
|
2
|
const { floorData, builtInComponents = {} } = props
|
|
1
3
|
const floorModuleType = floorData?.floorExtInfo?.moduleFlag
|
|
2
4
|
const FloorContentItem =
|
|
3
5
|
(floorModuleType && builtInComponents[floorModuleType]) || null
|
|
4
6
|
const dataDefines = getFloorDataToDataDefines(floorData)
|
|
5
7
|
return FloorContentItem ? (
|
|
6
8
|
<ErrorBoundary {...props}>
|
|
7
9
|
<FloorContentItem {...props} dataDefines={dataDefines} />
|
|
8
10
|
</ErrorBoundary>
|
|
9
11
|
) : null
|
|
10
12
|
renderSourceType: BUSINESS_TYPE.ONLINE,
|
|
11
13
|
switch (moduleId) {
|
|
12
14
|
case 83158:
|
|
13
15
|
return 'freeLayout'
|
|
14
16
|
case 99654:
|
|
15
17
|
return 'activeText'
|
|
16
18
|
case 100382:
|
|
17
19
|
return 'superGoods'
|
|
18
20
|
}
|
|
19
21
|
floorList.map((item) => {
|
|
20
22
|
if (!item.floorExtInfo) {
|
|
21
23
|
return null
|
|
22
24
|
}
|
|
23
25
|
const moduleFlag = item.floorExtInfo.moduleFlag
|
|
24
26
|
if (!moduleFlag) {
|
|
25
27
|
const newModuleFlag = moduleId2ModuleFlag(item.moduleId)
|
|
26
28
|
if (newModuleFlag) {
|
|
27
29
|
item.floorExtInfo.moduleFlag = newModuleFlag
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
32
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React, { Suspense, lazy } from 'react'
|
|
2
1
|
style={{
|
|
2
|
+
import React, { Suspense, lazy } from 'react'
|
|
3
3
|
BUSINESS_TYPE,
|
|
4
4
|
RemoteLoadFloorList,
|
|
5
5
|
JD_PLACEHOLDER_IMG,
|
|
6
6
|
DraJSAgentReportException,
|
|
7
7
|
DraJSAgentReport,
|
|
8
8
|
const {
|
|
9
9
|
floorData,
|
|
10
10
|
renderSourceType,
|
|
11
11
|
builtInComponents = {},
|
|
12
12
|
updateContainerFloorListDataFn,
|
|
13
13
|
} = props
|
|
14
14
|
const isDevMode = renderSourceType === BUSINESS_TYPE.DECORATE
|
|
15
15
|
const floorModuleType: any = floorData?.floorExtInfo?.moduleFlag
|
|
16
16
|
const FloorContentItem =
|
|
17
17
|
(floorModuleType && builtInComponents[floorModuleType]) || null
|
|
18
18
|
const dataDefines = getFloorDataToDataDefines(floorData)
|
|
19
19
|
|
|
20
20
|
const renderDecorateDefaultModule = () => {
|
|
21
21
|
return (
|
|
22
22
|
<View
|
|
23
23
|
style={{
|
|
24
24
|
lineHeight: '120px',
|
|
25
25
|
textAlign: 'center',
|
|
26
26
|
}}
|
|
27
27
|
>
|
|
28
28
|
当前模块是{floorData.moduleName}
|
|
29
29
|
</View>
|
|
30
30
|
)
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
const getFloorSetHeight = (item) => {
|
|
34
34
|
const getHeight = item?.floorExtInfo?.floorHeight
|
|
35
35
|
? Number(item?.floorExtInfo?.floorHeight)
|
|
36
36
|
: 200
|
|
37
37
|
return getHeight > 0 ? getHeight : 200
|
|
38
38
|
}
|
|
39
39
|
if (floorModuleType && RemoteLoadFloorList.includes(floorModuleType)) {
|
|
40
40
|
console.log(
|
|
41
41
|
'>>>>>>>>>> floorModuleType === FloorModuleType.ISVDESIGNERH5MODULE >>>>>>>>>>',
|
|
42
42
|
)
|
|
43
43
|
const renderResult = (() => {
|
|
44
44
|
try {
|
|
45
45
|
console.log('>>>>>>>>>> 开始渲染1个isv模块 >>>>>>>>>>')
|
|
46
46
|
console.log(
|
|
47
47
|
'==========当前业务类型renderSourceType、楼层floorId: ',
|
|
48
48
|
renderSourceType,
|
|
49
49
|
floorData.uid,
|
|
50
50
|
)
|
|
51
51
|
const modularPackResult = floorData?.floorExtInfo?.modularPackResult
|
|
52
52
|
const modularPackResultObj =
|
|
53
53
|
typeof modularPackResult === 'string'
|
|
54
54
|
? JSON.parse(modularPackResult)
|
|
55
55
|
: modularPackResult
|
|
56
56
|
if (modularPackResultObj) {
|
|
57
57
|
const { bundleUrl, bundleFileName } = modularPackResultObj
|
|
58
58
|
if (bundleUrl && bundleFileName) {
|
|
59
59
|
let ISVModule =
|
|
60
60
|
taroJdBaseInfo?.renderedIsvComponents[
|
|
61
61
|
`${floorData.uid}_${bundleFileName}`
|
|
62
62
|
] || null
|
|
63
63
|
if (!ISVModule) {
|
|
64
64
|
ISVModule = lazy(
|
|
65
65
|
() => import(bundleFileName + '@@@@@@' + bundleUrl),
|
|
66
66
|
)
|
|
67
67
|
console.log(
|
|
68
68
|
'1|加载isv模块==========走lazy import生成新的isv模块react组件',
|
|
69
69
|
bundleFileName,
|
|
70
70
|
)
|
|
71
71
|
taroJdBaseInfo.renderedIsvComponents[
|
|
72
72
|
`${floorData.uid}_${bundleFileName}`
|
|
73
73
|
] = ISVModule
|
|
74
74
|
console.log(
|
|
75
75
|
'2|渲染isv模块的react组件==========,window.taroJshopH5WebpackJsonp上的组件是否已就绪: ',
|
|
76
76
|
bundleFileName,
|
|
77
77
|
window['taroJshopH5WebpackJsonp'].find(
|
|
78
78
|
(item) => item[0][0] == bundleFileName,
|
|
79
79
|
),
|
|
80
80
|
)
|
|
81
81
|
} else {
|
|
82
82
|
console.log(
|
|
83
83
|
'1|加载isv模块==========不走lazy import生成新的isv模块react组件,从已加载中获取,taroJdBaseInfo: ',
|
|
84
84
|
taroJdBaseInfo,
|
|
85
85
|
)
|
|
86
86
|
console.log(
|
|
87
87
|
'2|渲染isv模块的react组件==========,taroJdBaseInfo.renderedIsvComponents上的组件是否已就绪: ',
|
|
88
88
|
taroJdBaseInfo.renderedIsvComponents[
|
|
89
89
|
`${floorData.uid}_${bundleFileName}`
|
|
90
90
|
],
|
|
91
91
|
)
|
|
92
92
|
}
|
|
93
93
|
const _floorHeight = getFloorSetHeight(floorData)
|
|
94
94
|
return (
|
|
95
95
|
<ErrorBoundary {...props}>
|
|
96
96
|
<Suspense
|
|
97
97
|
fallback={
|
|
98
98
|
<View
|
|
99
99
|
style={{
|
|
100
100
|
position: 'relative',
|
|
101
101
|
background: `#ffffff url('${JD_PLACEHOLDER_IMG}') center center no-repeat`,
|
|
102
102
|
height: `${_floorHeight}px`,
|
|
103
103
|
}}
|
|
104
104
|
></View>
|
|
105
105
|
}
|
|
106
106
|
>
|
|
107
107
|
<ISVFloor {...props} dataDefines={dataDefines}>
|
|
108
108
|
<ISVModule {...props} dataDefines={dataDefines}></ISVModule>
|
|
109
109
|
</ISVFloor>
|
|
110
110
|
</Suspense>
|
|
111
111
|
</ErrorBoundary>
|
|
112
112
|
)
|
|
113
113
|
} else {
|
|
114
114
|
console.log(
|
|
115
115
|
'3|isv模块渲染异常,modularPackResult中缺少bundleUrl或bundleFileName==========modularPackResult: ',
|
|
116
116
|
modularPackResultObj,
|
|
117
117
|
)
|
|
118
118
|
DraJSAgentReport(
|
|
119
119
|
`店铺首页isv h5楼层隐藏不显示。原因:modularPackResult数据不完备。页面类型-buildType: ${buildType}。楼层顺序-floorIdx: ${floorData?.floorIdx}`,
|
|
120
120
|
{
|
|
121
121
|
buildType,
|
|
122
122
|
uid: floorData?.uid,
|
|
123
123
|
floorIdx: floorData?.floorIdx,
|
|
124
124
|
shopId: floorData?.floorExtInfo?.shopId,
|
|
125
125
|
moduleId: floorData?.moduleId,
|
|
126
126
|
moduleName: floorData?.moduleName,
|
|
127
127
|
middleTemplateId: floorData?.middleTemplateId,
|
|
128
128
|
modularPackResult: modularPackResult,
|
|
129
129
|
},
|
|
130
130
|
)
|
|
131
131
|
return null
|
|
132
132
|
}
|
|
133
133
|
} else {
|
|
134
134
|
console.log(
|
|
135
135
|
'3|isv模块渲染异常,缺少modularPackResult==========modularPackResult: ',
|
|
136
136
|
modularPackResultObj,
|
|
137
137
|
)
|
|
138
138
|
DraJSAgentReport(
|
|
139
139
|
`店铺首页isv h5楼层隐藏不显示。原因:modularPackResult数据不完备。页面类型-buildType: ${buildType}。楼层顺序-floorIdx: ${floorData?.floorIdx}`,
|
|
140
140
|
{
|
|
141
141
|
buildType,
|
|
142
142
|
uid: floorData?.uid,
|
|
143
143
|
floorIdx: floorData?.floorIdx,
|
|
144
144
|
shopId: floorData?.floorExtInfo?.shopId,
|
|
145
145
|
moduleId: floorData?.moduleId,
|
|
146
146
|
moduleName: floorData?.moduleName,
|
|
147
147
|
middleTemplateId: floorData?.middleTemplateId,
|
|
148
148
|
modularPackResult: modularPackResult,
|
|
149
149
|
},
|
|
150
150
|
)
|
|
151
151
|
return null
|
|
152
152
|
}
|
|
153
153
|
} catch (err) {
|
|
154
154
|
console.log('3|isv模块渲染异常,floorItem逻辑错误==========err: ', err)
|
|
155
155
|
DraJSAgentReportException(err)
|
|
156
156
|
return null
|
|
157
157
|
}
|
|
158
158
|
})()
|
|
159
159
|
if (renderResult === null) {
|
|
160
160
|
updateContainerFloorListDataFn &&
|
|
161
161
|
updateContainerFloorListDataFn({
|
|
162
162
|
type: 'filter',
|
|
163
163
|
containerId: floorData?.uid,
|
|
164
164
|
})
|
|
165
165
|
console.log('renderResult === null: 命中了!')
|
|
166
166
|
taroEventSendPageScrollInfo()
|
|
167
167
|
} else {
|
|
168
168
|
console.log('renderResult !== null: 没命中', renderResult)
|
|
169
169
|
}
|
|
170
170
|
return renderResult
|
|
171
171
|
} else {
|
|
172
172
|
return FloorContentItem ? (
|
|
173
173
|
<ErrorBoundary {...props}>
|
|
174
174
|
<FloorContentItem {...props} dataDefines={dataDefines} />
|
|
175
175
|
</ErrorBoundary>
|
|
176
176
|
) : isDevMode ? (
|
|
177
177
|
renderDecorateDefaultModule()
|
|
178
178
|
) : null
|
|
179
179
|
}
|
|
180
180
|
renderSourceType: BUSINESS_TYPE.ONLINE,
|
|
181
181
|
switch (moduleId) {
|
|
182
182
|
case 83158:
|
|
183
183
|
return 'freeLayout'
|
|
184
184
|
case 99654:
|
|
185
185
|
return 'activeText'
|
|
186
186
|
case 100382:
|
|
187
187
|
return 'superGoods'
|
|
188
188
|
}
|
|
189
189
|
floorList.map((item) => {
|
|
190
190
|
if (!item.floorExtInfo) {
|
|
191
191
|
return null
|
|
192
192
|
}
|
|
193
193
|
const moduleFlag = item.floorExtInfo.moduleFlag
|
|
194
194
|
if (!moduleFlag) {
|
|
195
195
|
const newModuleFlag = moduleId2ModuleFlag(item.moduleId)
|
|
196
196
|
if (newModuleFlag) {
|
|
197
197
|
item.floorExtInfo.moduleFlag = newModuleFlag
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
1
|
subMessage?: string
|
|
3
2
|
customErrorIsvFloorModule?: React.ReactElement | undefined
|
|
4
3
|
containerIndex?: number
|
|
5
4
|
containerData?: any
|
|
6
5
|
shopTotalInfo?: any
|
|
7
6
|
selectContainerFn?: Function
|
|
8
7
|
selectContainerId?: string
|
|
9
8
|
placeHolderPreContainerId?: string
|
|
10
9
|
children?: any
|
|
11
10
|
style?: {
|
|
12
11
|
[key: string]: any
|
|
13
12
|
};
|
|
14
13
|
layoutLeftRightMargin?: number
|
|
15
14
|
}
|
|
15
|
+
import React from 'react'
|
|
16
16
|
subMessage?: string
|
|
17
17
|
showCommonFloorHead?: boolean
|
|
18
18
|
customErrorIsvFloorModule?: React.ReactElement | undefined
|
|
19
19
|
containerIndex?: number
|
|
20
20
|
containerData?: any
|
|
21
21
|
shopTotalInfo?: any
|
|
22
22
|
selectContainerFn?: Function
|
|
23
23
|
selectContainerId?: string
|
|
24
24
|
placeHolderPreContainerId?: string
|
|
25
25
|
children?: any
|
|
26
26
|
style?: {
|
|
27
27
|
[key: string]: any
|
|
28
28
|
};
|
|
29
29
|
layoutLeftRightMargin?: number
|
|
30
30
|
}
|
|
31
31
|
onFormSubmit?: Function
|
|
32
32
|
onFormReset?: Function
|
|
33
33
|
isFormDialog?: boolean
|
|
34
34
|
forbiddenBgScrollState?: boolean
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare namespace JumpEventReportInterFace {
|
|
1
|
+
export declare namespace JumpEventReportInterFace {
|
|
2
2
|
export interface ShopIdsInfo {
|
|
3
3
|
shopId?: number | string
|
|
4
4
|
venderId?: number | string
|
|
5
5
|
logEventInfo?: object
|
|
6
6
|
type?: string
|
|
7
7
|
}
|
|
8
8
|
export interface RouterInfo {
|
|
9
9
|
params: any
|
|
10
10
|
pageParamStr?: string
|
|
11
11
|
[key: string]: any
|
|
12
12
|
}
|
|
13
13
|
export interface JumpMiniPath {
|
|
14
14
|
shop: string
|
|
15
15
|
shopx: string
|
|
16
16
|
detail: string
|
|
17
17
|
searchCoupon: string
|
|
18
18
|
h5: string
|
|
19
19
|
jingGouHome: string
|
|
20
20
|
shopFans: string
|
|
21
21
|
shopLight: string
|
|
22
22
|
couponSearch: string
|
|
23
23
|
}
|
|
24
24
|
export interface jumpWebUrl {
|
|
25
25
|
mshop: string
|
|
26
26
|
pages: string
|
|
27
27
|
couponSearch: string
|
|
28
28
|
shopSecondActivity: string
|
|
29
29
|
shopLight: string
|
|
30
30
|
detail: string
|
|
31
31
|
mobileHome: string
|
|
32
32
|
rank: string
|
|
33
33
|
wqShopMember: string
|
|
34
34
|
wqShopDetail: string
|
|
35
35
|
wqShopSearch: string
|
|
36
36
|
shopMember: string
|
|
37
37
|
shopMemberPointDetail: string
|
|
38
38
|
shopMemberBenefit: string
|
|
39
39
|
shopMemberRule: string
|
|
40
40
|
shopMemberCloseAccount: string
|
|
41
41
|
shopMemberPointExchange: string
|
|
42
42
|
shopMemberBonusPurchase: string
|
|
43
43
|
shopMemberGood: string
|
|
44
44
|
beanDetail: string
|
|
45
45
|
totalPromotion: string
|
|
46
46
|
mLive: string
|
|
47
47
|
shopHome: string
|
|
48
48
|
shopIntroduce: string
|
|
49
49
|
shopSearch: string
|
|
50
50
|
shopLottery: string
|
|
51
51
|
shopCoupon: string
|
|
52
52
|
shopWares: string
|
|
53
53
|
shopFastShopping: string
|
|
54
54
|
shopSpeciSeckill: string
|
|
55
55
|
shopVideos: string
|
|
56
56
|
shopUseShareOrderUgcContent: string
|
|
57
57
|
dongDongChat: string
|
|
58
58
|
samCenter: string
|
|
59
59
|
samCard: string
|
|
60
60
|
shopH5MemberCardAPP: string
|
|
61
61
|
shopH5MemberCardM: string
|
|
62
62
|
}
|
|
63
63
|
export interface EventReportConfig {
|
|
64
64
|
routerInfo: RouterInfo
|
|
65
65
|
nativeEvent: any
|
|
66
66
|
}
|
|
67
67
|
export interface OptEventLogParams {
|
|
68
68
|
eventId?: string
|
|
69
69
|
eventParam?: string | object
|
|
70
70
|
pTag?: string
|
|
71
71
|
jsonParam?: {
|
|
72
72
|
[key: string]: any
|
|
73
73
|
}
|
|
74
74
|
skuId?: string | number
|
|
75
75
|
eventLevel?: string
|
|
76
76
|
exposureState?: boolean
|
|
77
77
|
otherParams?: object
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
export interface JumpH5ReportConfig {
|
|
81
81
|
shopId?: number | string
|
|
82
82
|
venderId?: number | string
|
|
83
83
|
sourceValue?: string
|
|
84
84
|
sourceType?: string
|
|
85
85
|
}
|
|
86
86
|
export interface JumpEventReportInit extends EventReportConfig {
|
|
87
87
|
getConfig(opt): EventReportConfig
|
|
88
88
|
updateInfo(routerInfo, logPname): void
|
|
89
89
|
}
|
|
90
90
|
export interface CouponUrlParams {
|
|
91
91
|
batchId: number
|
|
92
92
|
bindType: number
|
|
93
93
|
startTime?: number
|
|
94
94
|
endTime?: number
|
|
95
95
|
quangoufrom?: number
|
|
96
96
|
sceneId?: number
|
|
97
97
|
}
|
|
98
98
|
export interface JdMiniJumpParams {
|
|
99
99
|
param: string | object
|
|
100
100
|
sourceValue: string
|
|
101
101
|
sourceType: string
|
|
102
102
|
des?: any
|
|
103
103
|
logEventInfo?: object
|
|
104
104
|
}
|
|
105
105
|
export interface LinkMiniParams {
|
|
106
106
|
param?: {
|
|
107
107
|
pageType?: string
|
|
108
108
|
}
|
|
109
109
|
appId?: string | number
|
|
110
110
|
path?: string
|
|
111
111
|
}
|
|
112
112
|
export interface JdJumpWxappReportConfig {
|
|
113
113
|
wxApiVersion: string
|
|
114
114
|
wxApiUrl: string
|
|
115
115
|
wqReportUrl: string
|
|
116
116
|
}
|