@conecli/cone-render 0.8.20-beta.0 → 0.8.20-beta.2
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 +7 -1
- package/dist/api/index.ts +1 -1
- package/dist/assets/icon_blue_info.svg +1 -0
- 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/jdplayerSdk.ts +1 -0
- 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/common/wxappApi.ts +1 -1
- package/dist/components/ErrorBoundary.tsx +1 -1
- package/dist/components/base/CommonFloorHead/index.module.scss +126 -111
- package/dist/components/base/CommonFloorHead/index.tsx +1 -1
- package/dist/components/base/CountDown/index.module.scss +49 -44
- 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/CustomVideo/common.ts +1 -0
- package/dist/components/base/CustomVideo/index.tsx +1 -1
- package/dist/components/base/Dialog/index.module.scss +16 -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/const.ts +1 -0
- package/dist/components/base/ExposureSmart/index.h5.module.scss +30 -6
- package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
- package/dist/components/base/ExposureSmart/index.module.scss +20 -9
- package/dist/components/base/ExposureSmart/index.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/InViewRender/index.tsx +1 -1
- package/dist/components/base/InViewRender/index.weapp.tsx +1 -1
- package/dist/components/base/ItemViewExposureSmart/index.module.scss +8 -0
- package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -0
- package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
- package/dist/components/base/LazyLayoutLoad/index.weapp.tsx +1 -1
- package/dist/components/base/LazyLoadImage/const.ts +1 -1
- package/dist/components/base/LazyLoadImage/index.h5.module.scss +24 -20
- package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
- package/dist/components/base/MobileCommonHeader/index.module.scss +17 -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 +125 -69
- package/dist/components/base/NetworkDataError/index.tsx +1 -1
- package/dist/components/base/Price/Base/index.module.scss +12 -0
- package/dist/components/base/Price/Base/index.tsx +1 -1
- package/dist/components/base/Price/Double/index.module.scss +32 -0
- package/dist/components/base/Price/Double/index.tsx +1 -1
- package/dist/components/base/Price/index.tsx +1 -1
- package/dist/components/base/ShopLeGaoTag/index.h5.module.scss +35 -0
- package/dist/components/base/ShopLeGaoTag/index.h5.tsx +1 -0
- package/dist/components/base/ShopLeGaoTag/index.module.scss +33 -0
- package/dist/components/base/ShopLeGaoTag/index.tsx +1 -0
- package/dist/components/base/Skeleton/index.tsx +1 -1
- package/dist/components/debug/DebugLayout/index.module.scss +67 -0
- package/dist/components/debug/DebugLayout/index.tsx +1 -0
- package/dist/components/debug/DebugLayout/utils.ts +1 -0
- package/dist/components/decorate/DecorateFloorModule/index.module.scss +32 -2
- 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.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 -0
- 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.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 -0
- 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/language/en_US.json +231 -0
- package/dist/language/zh_CN.json +231 -0
- package/dist/language/zh_HK.json +231 -0
- package/dist/libs/taroAppReport.js +2 -2
- package/dist/modules/ContainerFloorList/index.h5.module.scss +66 -27
- package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
- package/dist/modules/ContainerFloorList/index.tsx +1 -1
- package/dist/open/api/device.ts +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/request.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 +294 -212
- package/dist/sass/base.scss +195 -137
- package/dist/service/bMallConst.ts +1 -1
- package/dist/service/fetchGateway.ts +1 -1
- package/dist/service/fetchGateway.weapp.ts +1 -0
- package/dist/service/http/colorSign.ts +1 -1
- package/dist/service/http/const.ts +1 -1
- package/dist/service/http/h5Http.ts +1 -0
- package/dist/service/http/index.h5.ts +1 -0
- package/dist/service/requestServer.h5.ts +1 -0
- package/dist/service/requestServer.ts +1 -1
- package/dist/service/requestServer.weapp.ts +1 -0
- 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/intersectionObserver.ts +1 -1
- package/dist/utils/jm-common.js +1 -1
- package/dist/utils/jumpExtMapUtil.h5.ts +1 -0
- package/dist/utils/jumpExtMapUtil.ts +1 -0
- package/dist/utils/sColor.js +1 -0
- package/dist/utils/sgmCodeUtils.ts +1 -0
- package/dist/utils/taroRenderUtil.ts +1 -0
- package/dist/utils/utils.ts +1 -1
- package/dist/wxapp/api/helper.js +1 -0
- package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
- package/dist/wxapp/common/user_info.js +1 -1
- package/dist/wxapp/components/launch-app/index.js +1 -0
- package/dist/wxapp/components/launch-app/index.json +5 -0
- package/dist/wxapp/components/launch-app/index.wxml +0 -0
- package/dist/wxapp/components/launch-app/index.wxss +0 -0
- package/dist/wxapp/components/subscribe-guider/helper.js +1 -0
- package/dist/wxapp/components/subscribe-guider/index.js +1 -0
- package/dist/wxapp/components/subscribe-guider/index.json +5 -0
- package/dist/wxapp/components/subscribe-guider/index.wxml +0 -0
- package/dist/wxapp/components/subscribe-guider/index.wxss +0 -0
- package/package.json +145 -115
- package/dist/components/base/Skeleton/old.tsx +0 -1
- package/dist/customHooks/useDocumentVisibilitychange.ts +0 -1
- package/dist/utils/memberFormatUtils.js +0 -1
- /package/dist/service/{bMallConst.wxapp.ts → bMallConst.weapp.ts} +0 -0
- /package/dist/service/http/{colorSign.wxapp.ts → colorSign.weapp.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import { isH5 } from '../utils'
|
|
2
1
|
? 'Terminator_New_Mobile_Shop'
|
|
3
2
|
: 'W_jdgwxcx_shop'
|
|
4
3
|
CONFIG_TYPE_NO_LINK = 0,
|
|
5
4
|
CONFIG_TYPE_SKU_LIST = 1,
|
|
6
5
|
CONFIG_TYPE_COUPON_LIST = 2,
|
|
7
6
|
CONFIG_TYPE_CATEGORY = 3,
|
|
8
7
|
CONFIG_TYPE_JSHOP_MOBILE = 4,
|
|
9
8
|
CONFIG_TYPE_JSHOP_PC = 5,
|
|
10
9
|
CONFIG_TYPE_JSHOP_DETAIL = 6,
|
|
11
10
|
CONFIG_TYPE_CUSTOM_LINK = 7,
|
|
12
11
|
CONFIG_TYPE_MEMBER = 9,
|
|
13
12
|
CONFIG_TYPE_SHOP_ACTIVITY = 10,
|
|
14
13
|
CONFIG_TYPE_SHOP_HOME = 12,
|
|
15
14
|
CONFIG_TYPE_ANCHOR_POINT = 13,
|
|
16
15
|
CONFIG_TYPE_SHOPPING_GUIDE = 17,
|
|
17
16
|
CONFIG_TYPE_MINI_PROGRAM = 18,
|
|
18
17
|
CONFIG_TYPE_FINANCE_COUPON = 22,
|
|
19
18
|
CONFIG_TYPE_CATEGORY_PAGE = 25,
|
|
19
|
+
import { isH5, isWxMinAndWxapp } from '../utils';
|
|
20
20
|
CONFIG_TYPE_NO_LINK = 0,
|
|
21
21
|
CONFIG_TYPE_SKU_LIST = 1,
|
|
22
22
|
CONFIG_TYPE_COUPON_LIST = 2,
|
|
23
23
|
CONFIG_TYPE_CATEGORY = 3,
|
|
24
24
|
CONFIG_TYPE_JSHOP_MOBILE = 4,
|
|
25
25
|
CONFIG_TYPE_JSHOP_PC = 5,
|
|
26
26
|
CONFIG_TYPE_JSHOP_DETAIL = 6,
|
|
27
27
|
CONFIG_TYPE_CUSTOM_LINK = 7,
|
|
28
28
|
CONFIG_TYPE_MEMBER = 9,
|
|
29
29
|
CONFIG_TYPE_SHOP_ACTIVITY = 10,
|
|
30
30
|
CONFIG_TYPE_SHOP_HOME = 12,
|
|
31
31
|
CONFIG_TYPE_ANCHOR_POINT = 13,
|
|
32
32
|
CONFIG_TYPE_SHOPPING_GUIDE = 17,
|
|
33
33
|
CONFIG_TYPE_MINI_PROGRAM = 18,
|
|
34
34
|
CONFIG_TYPE_FINANCE_COUPON = 22,
|
|
35
35
|
CONFIG_TYPE_CATEGORY_PAGE = 25,
|
|
36
36
|
CONFIG_TYPE_SHOP_SEARCH = 31,
|
|
37
37
|
? `${ReportPrefixPageId}_newArrivalsCalendarSkuList_Click`
|
|
38
38
|
: 'TerminatorNew_NewprodFeeds_Click';
|
|
39
39
|
? `${ReportPrefixPageId}_newArrivalsCalendar_Expo`
|
|
40
40
|
: 'TerminatorNew_NewprodFeeds_Expo';
|
|
41
41
|
? `${ReportPrefixPageId}_newArrivalsMagicSku_Click`
|
|
42
42
|
: 'ShopProductNew_Magiccube';
|
|
43
43
|
? `${ReportPrefixPageId}_newArrivalsMagic_Expo`
|
|
44
44
|
: 'ShopProductNew_MagiccubeExpo';
|
|
45
45
|
? `${ReportPrefixPageId}_newArrivalsMainProductSku_Click`
|
|
46
46
|
: 'TerminatorNew_MainNewprod_Click';
|
|
47
47
|
? `${ReportPrefixPageId}_newArrivalsMainProduct_Expo`
|
|
48
48
|
: 'TerminatorNew_MainNewprod_Expo';
|
|
49
49
|
? `${ReportPrefixPageId}_newArrivalsBanner_Click`
|
|
50
50
|
: 'TerminatorNew_NewprodBanner_Click';
|
|
51
51
|
? `${ReportPrefixPageId}_newArrivalsBanner_Expo`
|
|
52
52
|
: 'TerminatorNew_NewprodBanner_Expo';
|
|
53
53
|
? `${ReportPrefixPageId}_newArrivalsVideo_Click`
|
|
54
54
|
: 'TerminatorNew_NewprodVideo_Click';
|
|
55
55
|
? `${ReportPrefixPageId}_newArrivalsVideo_Expo`
|
|
56
56
|
: 'TerminatorNew_NewprodVideo_Expo';
|
|
57
57
|
? `${ReportPrefixPageId}_newArrivalsMoreVideo_Click`
|
|
58
58
|
: 'TerminatorNew_NewprodVideoSeeMore_Click';
|
|
59
59
|
'TerminatorNew_preferredGoods_MoreBtn_Click';
|
|
60
60
|
'shop_preferredGoods_addCart';
|
|
61
61
|
? `${ReportPrefixPageId}_newArrivalsSerialBanner_Click`
|
|
62
62
|
: 'TerminatorNew_SeriesNewProd_Click';
|
|
63
63
|
? `${ReportPrefixPageId}_newArrivalsSerialBanner_Expo`
|
|
64
64
|
: 'TerminatorNew_SeriesNewProd_Expo';
|
|
65
65
|
? `${ReportPrefixPageId}_newArrivalsSerialProductSku_Click`
|
|
66
66
|
: 'TerminatorNew_SeriesNewProd_Click';
|
|
67
67
|
? `${ReportPrefixPageId}_newArrivalsSerialProduct_Expo`
|
|
68
68
|
: 'TerminatorNew_SeriesNewProd_Expo';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import global from '../common'
|
|
2
1
|
if(mInfo == 'custom') return etModelInfo
|
|
3
2
|
if(mInfo == 'custom') return etModelInfo
|
|
3
|
+
import global from '../common';
|
|
4
4
|
a_id: string;
|
|
5
5
|
a_p: string;
|
|
6
6
|
p_id: string;
|
|
7
7
|
la_id: string;
|
|
8
8
|
la_p: string;
|
|
9
9
|
area: EtModulelstmAreaItem[];
|
|
10
10
|
JD_APP: 'app',
|
|
11
11
|
Mobile: 'h5',
|
|
12
12
|
PC: 'pc',
|
|
13
13
|
JD_MINI: 'j_x',
|
|
14
14
|
WX_MINI: 'x',
|
|
15
15
|
terminalType: TerminalType.Mobile,
|
|
16
16
|
sectionTabType: SECTION_HOME_TAB_TYPE.HOME_WELL_CHOSEN,
|
|
17
17
|
sectionTabData: {},
|
|
18
18
|
baseInfo: {},
|
|
19
19
|
posInfo: {},
|
|
20
20
|
recInfo: {},
|
|
21
21
|
etModuleExposureInfo: {
|
|
22
22
|
lstms: [
|
|
23
23
|
{
|
|
24
24
|
p_id: 'TerminatorNew_All',
|
|
25
25
|
area: [],
|
|
26
26
|
la_id: '',
|
|
27
27
|
la_p: '',
|
|
28
28
|
},
|
|
29
29
|
],
|
|
30
30
|
},
|
|
31
31
|
etModuleClickInfo: {
|
|
32
32
|
lstm: {
|
|
33
33
|
p_id: 'TerminatorNew_All',
|
|
34
34
|
area: [],
|
|
35
35
|
la_id: '',
|
|
36
36
|
la_p: '',
|
|
37
37
|
},
|
|
38
38
|
},
|
|
39
39
|
mInfo: {},
|
|
40
40
|
pageData: {},
|
|
41
41
|
shopId: '',
|
|
42
42
|
private shopId: string;
|
|
43
43
|
private terminalType: string;
|
|
44
44
|
private sectionTabType: number;
|
|
45
45
|
private baseInfo: object;
|
|
46
46
|
private posInfo: object;
|
|
47
47
|
private recInfo: object;
|
|
48
48
|
private mInfo: object;
|
|
49
49
|
private pageData: object;
|
|
50
50
|
private sectionTabData: object;
|
|
51
51
|
private etModuleExposureInfo: {
|
|
52
52
|
lstms: EtModulelstmItem[];
|
|
53
53
|
};
|
|
54
54
|
private etModuleClickInfo: {
|
|
55
55
|
lstm: EtModulelstmItem;
|
|
56
56
|
};
|
|
57
57
|
constructor(opt = {}) {
|
|
58
58
|
this.getConfig(opt);
|
|
59
59
|
}
|
|
60
60
|
getConfig(opt, isUpdate = false) {
|
|
61
61
|
return isUpdate ? Object.assign(this, {}, opt) : Object.assign(this, {}, DefaultConfig, opt);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
resetConfigParamsInit() {
|
|
65
65
|
const getDefaultOpt = Object.assign({}, DefaultConfig);
|
|
66
66
|
Object.keys(getDefaultOpt).forEach((key) => {
|
|
67
67
|
this[key] && (this[key] = getDefaultOpt[key]);
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
initReportBaseData(
|
|
72
72
|
initData,
|
|
73
73
|
terminalType = TerminalType.Mobile,
|
|
74
74
|
sectionTabType = SECTION_HOME_TAB_TYPE.HOME_WELL_CHOSEN,
|
|
75
75
|
) {
|
|
76
76
|
initData && this.resetConfigParamsInit();
|
|
77
77
|
this.updateTerminalAndSectionType(terminalType, sectionTabType);
|
|
78
78
|
initData && this.updateAllInfo(initData);
|
|
79
79
|
}
|
|
80
80
|
updateTerminalAndSectionType(
|
|
81
81
|
terminalType = TerminalType.Mobile,
|
|
82
82
|
sectionTabType = SECTION_HOME_TAB_TYPE.HOME_WELL_CHOSEN,
|
|
83
83
|
) {
|
|
84
84
|
this.terminalType = terminalType;
|
|
85
85
|
this.sectionTabType = sectionTabType;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
updateSectionTabDataInfo(pageData) {
|
|
89
89
|
const { shopId, projectId = '', templateId = '', templateVer = '' } = pageData;
|
|
90
90
|
const getEtModuleInfo = this.updateEtModuleInfo(pageData);
|
|
91
91
|
this.sectionTabData[this.sectionTabType] = {
|
|
92
92
|
baseInfo: {
|
|
93
93
|
shopId: `${shopId}`,
|
|
94
94
|
projectId: `${projectId}`,
|
|
95
95
|
templateId: `${templateId}`,
|
|
96
96
|
templateVer: `${templateVer}`,
|
|
97
97
|
},
|
|
98
98
|
...getEtModuleInfo,
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
updateEtModuleInfo(pageData) {
|
|
103
103
|
const { shopId, projectId = '' } = pageData;
|
|
104
104
|
const etModuleExposureInfo = {
|
|
105
105
|
lstms: [
|
|
106
106
|
{
|
|
107
107
|
p_id: 'TerminatorNew_All',
|
|
108
108
|
area: [
|
|
109
109
|
{
|
|
110
110
|
a_id: `${shopId}`,
|
|
111
111
|
a_p: '0',
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
a_id: `${projectId}`,
|
|
115
115
|
a_p: '0',
|
|
116
116
|
},
|
|
117
117
|
],
|
|
118
118
|
la_id: '',
|
|
119
119
|
la_p: '',
|
|
120
120
|
},
|
|
121
121
|
],
|
|
122
122
|
};
|
|
123
123
|
const etModuleClickInfo = {
|
|
124
124
|
lstm: {
|
|
125
125
|
p_id: 'TerminatorNew_All',
|
|
126
126
|
area: [
|
|
127
127
|
{
|
|
128
128
|
a_id: `${shopId}`,
|
|
129
129
|
a_p: '0',
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
a_id: `${projectId}`,
|
|
133
133
|
a_p: '0',
|
|
134
134
|
},
|
|
135
135
|
],
|
|
136
136
|
la_id: '',
|
|
137
137
|
la_p: '',
|
|
138
138
|
},
|
|
139
139
|
};
|
|
140
140
|
return {
|
|
141
141
|
etModuleExposureInfo,
|
|
142
142
|
etModuleClickInfo,
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
145
|
updateAllInfo(pageData) {
|
|
146
146
|
const {
|
|
147
147
|
shopId,
|
|
148
148
|
projectId = '',
|
|
149
149
|
pageId = '',
|
|
150
150
|
templateId = '',
|
|
151
151
|
templateVer = '',
|
|
152
152
|
mdExtInfo = {},
|
|
153
153
|
} = pageData;
|
|
154
154
|
const {
|
|
155
155
|
recBroker = '',
|
|
156
156
|
tabSpm = '',
|
|
157
157
|
moduleId = '-100',
|
|
158
158
|
entrance = '-100',
|
|
159
159
|
} = global.info.queryInfo;
|
|
160
160
|
const getReportEntrance = isJdApp
|
|
161
161
|
? (global.info?.openAppData?.sourceInfo?.entrance ?? entrance)
|
|
162
162
|
: entrance;
|
|
163
163
|
const getReportModuleId = isJdApp
|
|
164
164
|
? (global.info?.openAppData?.sourceInfo?.moduleId ?? moduleId)
|
|
165
165
|
: moduleId;
|
|
166
166
|
const baseInfo = {
|
|
167
167
|
shopId: `${shopId}`,
|
|
168
168
|
dataType: '2',
|
|
169
169
|
projectId: `${projectId}`,
|
|
170
170
|
pageId,
|
|
171
171
|
templateId: `${templateId}`,
|
|
172
172
|
templateVer: `${templateVer}`,
|
|
173
173
|
};
|
|
174
174
|
const posInfo = {
|
|
175
175
|
p_id: SectionReportTabNameType[this.sectionTabType],
|
|
176
176
|
pageSource: `${getReportModuleId}#${getReportEntrance}`,
|
|
177
177
|
tabSpm,
|
|
178
178
|
floorIndex: '0',
|
|
179
179
|
term: this.terminalType,
|
|
180
180
|
};
|
|
181
181
|
const recInfo = {
|
|
182
182
|
rec_broker: recBroker,
|
|
183
183
|
broker_info: '',
|
|
184
184
|
source: '',
|
|
185
185
|
algoId: '',
|
|
186
186
|
pageCrowdId: mdExtInfo?.userGroupStr || '',
|
|
187
187
|
};
|
|
188
188
|
const getEtModuleInfo = this.updateEtModuleInfo(pageData);
|
|
189
189
|
this.pageData = pageData;
|
|
190
190
|
this.shopId = shopId;
|
|
191
191
|
return this.getConfig(
|
|
192
192
|
{
|
|
193
193
|
baseInfo,
|
|
194
194
|
posInfo,
|
|
195
195
|
recInfo,
|
|
196
196
|
...getEtModuleInfo,
|
|
197
197
|
},
|
|
198
198
|
true,
|
|
199
199
|
);
|
|
200
200
|
}
|
|
201
201
|
updateBaseInfo(floorData, dataDefines = []) {
|
|
202
202
|
const { middleTemplateId = '', moduleId = '', moduleInstanceId = '', uid = '' } = floorData;
|
|
203
203
|
const nodeText = dataDefines[0]?.nodeText || {
|
|
204
204
|
materialType: '',
|
|
205
205
|
materialId: '',
|
|
206
206
|
};
|
|
207
207
|
const { materialType = '', materialId = '' } = nodeText;
|
|
208
208
|
const baseInfo = {
|
|
209
209
|
dataType: `${nodeText['autoPull'] == 1 ? 1 : 2}`,
|
|
210
210
|
moduleId,
|
|
211
211
|
moduleInstanceId,
|
|
212
212
|
middleTemplateId,
|
|
213
213
|
uid,
|
|
214
214
|
materialType,
|
|
215
215
|
materialId,
|
|
216
216
|
};
|
|
217
217
|
const changeBaseInfo = this.sectionTabData[this.sectionTabType]?.baseInfo || {};
|
|
218
218
|
return Object.assign({}, this.baseInfo, changeBaseInfo, baseInfo);
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
updatePosInfo(floorData, _dataDefines = []) {
|
|
222
222
|
const { floorIdx = '' } = floorData;
|
|
223
223
|
const changePosInfo = this.sectionTabData[this.sectionTabType]?.posInfo || {};
|
|
224
224
|
return Object.assign({}, this.posInfo, changePosInfo, {
|
|
225
225
|
p_id: SectionReportTabNameType[this.sectionTabType],
|
|
226
226
|
floorIndex: `${floorIdx}`,
|
|
227
227
|
term:
|
|
228
228
|
isH5 && (global.info.isJingGouMiniViewState || global.info.isJingxiMiniViewState)
|
|
229
229
|
? `${TerminalType.WX_MINI}-m`
|
|
230
230
|
: this.terminalType,
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
233
|
updateRecInfo(floorData, _dataDefines) {
|
|
234
234
|
const { algoId = '', userGroupStr = '' } = floorData;
|
|
235
235
|
const changeRecInfo = this.sectionTabData[this.sectionTabType]?.recInfo || {};
|
|
236
236
|
return Object.assign({}, this.recInfo, changeRecInfo, {
|
|
237
237
|
algoId,
|
|
238
238
|
moduleCrowdId: userGroupStr,
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
updateMInfo(mInfo: any = [], floorData) {
|
|
243
243
|
const { floorExtInfo, moduleId } = floorData;
|
|
244
244
|
const hasFloorInfo = floorExtInfo && moduleId;
|
|
245
245
|
if (Array.isArray(mInfo)) {
|
|
246
246
|
return mInfo.map((item: any) => {
|
|
247
247
|
if (item?.jumpUrl) {
|
|
248
248
|
item.jumpUrl = /openApp\.jdMobile/i.test(item.jumpUrl)
|
|
249
249
|
? 'openApp'
|
|
250
250
|
: encodeURIComponent(item.jumpUrl);
|
|
251
251
|
}
|
|
252
252
|
hasFloorInfo && (item.busid = `${floorExtInfo?.moduleFlag}@${moduleId}`);
|
|
253
253
|
return item;
|
|
254
254
|
});
|
|
255
255
|
} else {
|
|
256
256
|
if (mInfo?.jumpUrl) {
|
|
257
257
|
mInfo.jumpUrl = /openApp\.jdMobile/i.test(mInfo.jumpUrl)
|
|
258
258
|
? 'openApp'
|
|
259
259
|
: encodeURIComponent(mInfo.jumpUrl);
|
|
260
260
|
}
|
|
261
261
|
hasFloorInfo && (mInfo.busid = `${floorExtInfo?.moduleFlag}@${moduleId}`);
|
|
262
262
|
!mInfo.hasOwnProperty('pos') && (mInfo.pos = 0);
|
|
263
263
|
return Object.assign({}, this.mInfo, mInfo);
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
updateEtModelExposureInfo(floorData, _dataDefines, etModleArr, mInfoArr) {
|
|
268
268
|
return {
|
|
269
269
|
lstms: [],
|
|
270
270
|
};
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
updateEtModelClickInfo(floorData, _dataDefines, etModleInfo = {}, mInfo) {
|
|
274
274
|
return {
|
|
275
275
|
lstm: [],
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
278
|
getReportExposureFloorInfo(floorData, dataDefines, mInfoArr, etModelArr) {
|
|
279
279
|
if (Array.isArray(mInfoArr)) {
|
|
280
280
|
const getExposureLogArr = mInfoArr.map((item) => {
|
|
281
281
|
return Object.assign(
|
|
282
282
|
{},
|
|
283
283
|
{
|
|
284
284
|
baseInfo: this.updateBaseInfo(floorData, dataDefines),
|
|
285
285
|
posInfo: this.updatePosInfo(floorData, dataDefines),
|
|
286
286
|
recInfo: this.updateRecInfo(floorData, dataDefines),
|
|
287
287
|
mInfo: this.updateMInfo(item, floorData),
|
|
288
288
|
},
|
|
289
289
|
);
|
|
290
290
|
});
|
|
291
291
|
return {
|
|
292
292
|
logBaseInfo: getExposureLogArr,
|
|
293
293
|
etModelInfo: this.updateEtModelExposureInfo(floorData, dataDefines, etModelArr, mInfoArr),
|
|
294
294
|
};
|
|
295
295
|
} else {
|
|
296
296
|
return {
|
|
297
297
|
logBaseInfo: Object.assign(
|
|
298
298
|
{},
|
|
299
299
|
{
|
|
300
300
|
baseInfo: this.updateBaseInfo(floorData, dataDefines),
|
|
301
301
|
posInfo: this.updatePosInfo(floorData, dataDefines),
|
|
302
302
|
recInfo: this.updateRecInfo(floorData, dataDefines),
|
|
303
303
|
mInfo: this.updateMInfo(mInfoArr, floorData),
|
|
304
304
|
},
|
|
305
305
|
),
|
|
306
306
|
etModelInfo: this.updateEtModelExposureInfo(floorData, dataDefines, etModelArr, mInfoArr),
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
getReportClickFloorInfo(floorData, dataDefines, mInfo, etModelInfo) {
|
|
311
311
|
return {
|
|
312
312
|
logBaseInfo: Object.assign(
|
|
313
313
|
{},
|
|
314
314
|
{
|
|
315
315
|
baseInfo: this.updateBaseInfo(floorData, dataDefines),
|
|
316
316
|
posInfo: this.updatePosInfo(floorData, dataDefines),
|
|
317
317
|
recInfo: this.updateRecInfo(floorData, dataDefines),
|
|
318
318
|
mInfo: this.updateMInfo(mInfo, floorData),
|
|
319
319
|
},
|
|
320
320
|
),
|
|
321
321
|
etModelInfo: this.updateEtModelClickInfo(floorData, dataDefines, etModelInfo, mInfo),
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
324
|
getClickEventInfo(
|
|
325
325
|
floorData,
|
|
326
326
|
mInfo = {},
|
|
327
327
|
etModelInfo = {},
|
|
328
328
|
groupState = true,
|
|
329
329
|
isIsvModule = false,
|
|
330
330
|
) {
|
|
331
331
|
const dataDefines = getFloorDataToDataDefines(floorData);
|
|
332
332
|
const getLogInfo = this.getReportClickFloorInfo(floorData, dataDefines, mInfo, etModelInfo);
|
|
333
333
|
return groupState
|
|
334
334
|
? {
|
|
335
335
|
eventId: `TerminatorNew_${!isIsvModule ? floorData?.floorExtInfo?.moduleFlag || floorData?.moduleFlag : 'IsvModule'}_Click`,
|
|
336
336
|
jsonParam: getLogInfo,
|
|
337
337
|
}
|
|
338
338
|
: getLogInfo;
|
|
339
339
|
}
|
|
340
340
|
getExposureInfo(floorData, mInfo = {}, etModelInfo = {}, groupState = true, isIsvModule = false) {
|
|
341
341
|
const dataDefines = getFloorDataToDataDefines(floorData);
|
|
342
342
|
const getLogInfo = this.getReportExposureFloorInfo(floorData, dataDefines, mInfo, etModelInfo);
|
|
343
343
|
return groupState
|
|
344
344
|
? {
|
|
345
345
|
eventId: `TerminatorNew_${!isIsvModule ? floorData?.floorExtInfo?.moduleFlag || floorData?.moduleFlag : 'IsvModule'}_Expo`,
|
|
346
346
|
jsonParam: getLogInfo,
|
|
347
347
|
}
|
|
348
348
|
: getLogInfo;
|
|
349
349
|
}
|
|
350
350
|
getIsvClickEventInfo(floorData, mInfo = {}, etModelInfo = {}) {
|
|
351
351
|
return mInfo === 'custom'
|
|
352
352
|
? etModelInfo
|
|
353
353
|
: this.getClickEventInfo(floorData, mInfo, etModelInfo, true, true);
|
|
354
354
|
}
|
|
355
355
|
getIsvExposureInfo(floorData, mInfo = {}, etModelInfo = {}) {
|
|
356
356
|
return mInfo === 'custom'
|
|
357
357
|
? etModelInfo
|
|
358
358
|
: this.getExposureInfo(floorData, mInfo, etModelInfo, true, true);
|
|
359
359
|
}
|
|
360
360
|
|
|
361
361
|
getCustomClickEventInfo(mInfo = {}, floorData = {}, etModelInfo = {}) {
|
|
362
362
|
return this.getClickEventInfo(floorData, mInfo, etModelInfo, false, false);
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
getCustomExposureInfo(mInfo = {}, floorData = {}, etModelInfo = {}) {
|
|
366
366
|
return this.getExposureInfo(floorData, mInfo, etModelInfo, false, false);
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
getFloorPointIndexClassName(floorData, index = 0, otherTip = '') {
|
|
370
370
|
return isChartH5
|
|
371
371
|
? floorData && floorData?.uid
|
|
372
372
|
? `J_chart_floor_${floorData.uid}_point_${otherTip ? otherTip + '_' : ''}${index}`
|
|
373
373
|
: ''
|
|
374
374
|
: '';
|
|
375
375
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { isApp, getUrlQuery } from '../utils/jm-common'
|
|
1
|
+
import { isApp, getUrlQuery } from '../utils/jm-common'
|
|
2
2
|
console.log('h5', isReflexToH5, getUrlQuery(window.location.href, 'reflex'))
|
|
3
3
|
return new Promise((resolve, reject) => {
|
|
4
4
|
if (isReflexToH5) {
|
|
5
5
|
import('./web.base')
|
|
6
6
|
.then(({ JumpEventWebReport }) => {
|
|
7
7
|
if (JumpEventWebReport) {
|
|
8
8
|
console.log('加载普通浏览器h5相关跳转事件js')
|
|
9
9
|
JumpEventReport = new JumpEventWebReport({})
|
|
10
10
|
resolve(JumpEventReport)
|
|
11
11
|
}
|
|
12
12
|
})
|
|
13
13
|
.catch((err) => {
|
|
14
14
|
reject(err)
|
|
15
15
|
})
|
|
16
16
|
} else {
|
|
17
17
|
if (isApp('wx') && isApp('mp') && isH5AdnJxMini) {
|
|
18
18
|
import('./web.jxwxapp')
|
|
19
19
|
.then(({ JdJumpWebToJxWxapp }) => {
|
|
20
20
|
if (JdJumpWebToJxWxapp) {
|
|
21
21
|
JumpEventReport = new JdJumpWebToJxWxapp({})
|
|
22
22
|
resolve(JumpEventReport)
|
|
23
23
|
}
|
|
24
24
|
})
|
|
25
25
|
.catch((err) => {
|
|
26
26
|
reject(err)
|
|
27
27
|
})
|
|
28
28
|
} else if (isApp('wx') && isApp('mp')) {
|
|
29
29
|
import('./web.wxapp')
|
|
30
30
|
.then(({ JdJumpWebToWxapp }) => {
|
|
31
31
|
if (JdJumpWebToWxapp) {
|
|
32
32
|
JumpEventReport = new JdJumpWebToWxapp({})
|
|
33
33
|
resolve(JumpEventReport)
|
|
34
34
|
}
|
|
35
35
|
})
|
|
36
36
|
.catch((err) => {
|
|
37
37
|
reject(err)
|
|
38
38
|
})
|
|
39
39
|
} else if (isApp('jd') && !isApp('jdharmony')) {
|
|
40
40
|
import('./web.jd')
|
|
41
41
|
.then(({ JdJumpWebToJdApp }) => {
|
|
42
42
|
if (JdJumpWebToJdApp) {
|
|
43
43
|
JumpEventReport = new JdJumpWebToJdApp({})
|
|
44
44
|
resolve(JumpEventReport)
|
|
45
45
|
}
|
|
46
46
|
})
|
|
47
47
|
.catch((err) => {
|
|
48
48
|
reject(err)
|
|
49
49
|
})
|
|
50
50
|
} else if (isApp('jdb')) {
|
|
51
51
|
import('./web.jdb')
|
|
52
52
|
.then(({ JdbJumpWebToJdbApp }) => {
|
|
53
53
|
if (JdbJumpWebToJdbApp) {
|
|
54
54
|
JumpEventReport = new JdbJumpWebToJdbApp({})
|
|
55
55
|
resolve(JumpEventReport)
|
|
56
56
|
}
|
|
57
57
|
})
|
|
58
58
|
.catch((err) => {
|
|
59
59
|
reject(err)
|
|
60
60
|
})
|
|
61
61
|
} else if (isApp('jdjch')) {
|
|
62
62
|
import('./web.jdjch')
|
|
63
63
|
.then(({ JdbJumpWebToJdbApp }) => {
|
|
64
64
|
if (JdbJumpWebToJdbApp) {
|
|
65
65
|
JumpEventReport = new JdbJumpWebToJdbApp({})
|
|
66
66
|
resolve(JumpEventReport)
|
|
67
67
|
}
|
|
68
68
|
})
|
|
69
69
|
.catch((err) => {
|
|
70
70
|
reject(err)
|
|
71
71
|
})
|
|
72
72
|
} else if (isApp('tjapp')) {
|
|
73
73
|
import('./web.tjapp')
|
|
74
74
|
.then(({ tjJumpWebTotjApp }) => {
|
|
75
75
|
if (tjJumpWebTotjApp) {
|
|
76
76
|
console.log('加载特价app内h5相关跳转事件js')
|
|
77
77
|
JumpEventReport = new tjJumpWebTotjApp({})
|
|
78
78
|
resolve(JumpEventReport)
|
|
79
79
|
}
|
|
80
80
|
})
|
|
81
81
|
.catch((err) => {
|
|
82
82
|
reject(err)
|
|
83
83
|
})
|
|
84
84
|
} else if (isPc) {
|
|
85
85
|
import('./web.pc')
|
|
86
86
|
.then(({ JumpEventWebReport }) => {
|
|
87
87
|
if (JumpEventWebReport) {
|
|
88
88
|
JumpEventReport = new JumpEventWebReport({})
|
|
89
89
|
resolve(JumpEventReport)
|
|
90
90
|
}
|
|
91
91
|
})
|
|
92
92
|
.catch((err) => {
|
|
93
93
|
reject(err)
|
|
94
94
|
})
|
|
95
95
|
} else if (isTjJxM || isTjM) {
|
|
96
96
|
import('./web.tjm')
|
|
97
97
|
.then(({ JumpEventTJWebReport }) => {
|
|
98
98
|
if (JumpEventTJWebReport) {
|
|
99
99
|
JumpEventReport = new JumpEventTJWebReport({})
|
|
100
100
|
resolve(JumpEventReport)
|
|
101
101
|
}
|
|
102
102
|
})
|
|
103
103
|
.catch((err) => {
|
|
104
104
|
reject(err)
|
|
105
105
|
})
|
|
106
106
|
} else {
|
|
107
107
|
import('./web.base')
|
|
108
108
|
.then(({ JumpEventWebReport }) => {
|
|
109
109
|
if (JumpEventWebReport) {
|
|
110
110
|
JumpEventReport = new JumpEventWebReport({})
|
|
111
111
|
resolve(JumpEventReport)
|
|
112
112
|
}
|
|
113
113
|
})
|
|
114
114
|
.catch((err) => {
|
|
115
115
|
reject(err)
|
|
116
116
|
})
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
})
|