@conecli/cone-render 0.9.1-shop2.4 → 0.9.1-shop2.40
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/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/pageType.ts +1 -1
- package/dist/common/sgmCustomCode.ts +1 -0
- 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.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/ExposureSmart/index.h5.module.scss +12 -2
- 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/InOrOutViewObserver/index.tsx +1 -1
- package/dist/components/base/InViewRender/index.tsx +1 -1
- package/dist/components/base/ItemViewExposureSmart/index.module.scss +2 -2
- package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
- package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
- package/dist/components/base/LazyLoadImage/index.h5.module.scss +23 -20
- package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
- package/dist/components/base/MobileCommonHeader/index.module.scss +8 -0
- package/dist/components/base/MobileCommonHeader/index.tsx +1 -1
- package/dist/components/base/NetworkDataError/index.module.scss +3 -0
- package/dist/components/base/NetworkDataError/index.tsx +1 -1
- package/dist/components/base/Price/Base/index.tsx +1 -1
- package/dist/components/base/Price/Double/index.module.scss +8 -0
- package/dist/components/base/Price/Double/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 +11 -0
- package/dist/components/decorate/DecorateFloorModule/index.tsx +1 -1
- package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
- package/dist/components/decorate/PlaceHolder/index.tsx +1 -1
- package/dist/components/floorItem.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 -1
- 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 +30 -1
- 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 +274 -212
- package/dist/sass/base.scss +195 -137
- package/dist/service/fetchGateway.ts +1 -1
- 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/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/jumpExtMapUtil.js +1 -0
- package/dist/utils/sColor.js +1 -0
- package/dist/utils/sgmCodeUtils.ts +1 -0
- package/dist/utils/taroRenderUtil.ts +1 -1
- package/dist/utils/utils.ts +1 -1
- package/package.json +26 -3
- package/dist/customHooks/useDocumentVisibilitychange.ts +0 -1
- package/dist/utils/memberFormatUtils.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { JumpEventTJWebReport } from './web.tjm'
|
|
2
|
routerInfo: {
|
|
1
3
|
params: {},
|
|
2
4
|
},
|
|
3
5
|
nativeEvent: null,
|
|
4
6
|
jumpConfig: {
|
|
5
7
|
venderId: null,
|
|
6
8
|
shopId: null,
|
|
7
9
|
sourceValue: '',
|
|
8
10
|
sourceType: 'App-H5',
|
|
9
11
|
activityType: 'shopx',
|
|
10
12
|
moduleId: 'none',
|
|
11
13
|
entrance: 'none',
|
|
12
14
|
},
|
|
13
15
|
logPageParamStr: '',
|
|
14
16
|
public logPageId: string
|
|
15
17
|
public jumpConfig: JumpEventReportInterFace.JumpH5ReportConfig
|
|
16
18
|
constructor(opt = {}) {
|
|
17
19
|
console.log('jdlite加载==========')
|
|
18
20
|
super(opt)
|
|
19
21
|
this.getConfig(opt)
|
|
20
22
|
}
|
|
21
23
|
tjOpenAppParams(openAppUrl): Object | boolean {
|
|
22
24
|
let getParams: boolean | Object = false
|
|
23
25
|
if (this.isOpenTjAppUrl(openAppUrl)) {
|
|
24
26
|
try {
|
|
25
27
|
getParams = openAppUrl.replace(
|
|
26
28
|
/openApp\.jdlite:\/\/virtual\?params=/i,
|
|
27
29
|
'',
|
|
28
30
|
)
|
|
29
31
|
getParams = JSON.parse(String(getParams))
|
|
30
32
|
} catch (e) {
|
|
31
33
|
console.log(e)
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
36
|
return getParams
|
|
35
37
|
}
|
|
36
38
|
isOpenTjAppUrl(openAppUrl) {
|
|
37
39
|
return /openApp\.jdlite:\/\/virtual\?params=/i.test(openAppUrl)
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
async jdJumpConfigUrl(detail, logEventInfo = {}) {
|
|
41
43
|
const { configDataType, configDataValue } = detail
|
|
42
44
|
console.log("测试tj app",detail)
|
|
43
45
|
switch (configDataType) {
|
|
44
46
|
case LinkConfigType.CONFIG_TYPE_SKU_LIST:
|
|
45
47
|
this.jdJumpToProduct( configDataValue.skuIds, logEventInfo)
|
|
46
48
|
break
|
|
47
49
|
case LinkConfigType.CONFIG_TYPE_CUSTOM_LINK: {
|
|
48
50
|
const _url = configDataValue.linkUrl
|
|
49
51
|
this.jdJumpToWeb(_url, logEventInfo)
|
|
50
52
|
break
|
|
51
53
|
}
|
|
52
54
|
default:
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
jdJumpToProduct(skuIds, logEventInfo) {
|
|
57
59
|
skuIds = skuIds.toString().trim()
|
|
58
60
|
const getSkuId = skuIds.indexOf(',') !== -1 ? skuIds.split(',')[0] : skuIds
|
|
59
61
|
this.jdNavigateToNative({
|
|
60
62
|
category: "jump",
|
|
61
63
|
des: "productDetail",
|
|
62
64
|
skuId: getSkuId,
|
|
63
65
|
logEventInfo,
|
|
64
66
|
})
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
jdJumpSkuInfoToProduct(skuInfo: any = {}, logEventInfo) {
|
|
68
70
|
const getSkuId = skuInfo?.skuId;
|
|
69
71
|
this.jdJumpToProduct(getSkuId, logEventInfo)
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
jdJumpToCouponSearchProductList(couponId, logEventInfo = {}) {
|
|
73
75
|
this.jdNavigateToNative(
|
|
74
76
|
Object.assign(
|
|
75
77
|
{},
|
|
76
78
|
{
|
|
77
79
|
category: "jump",
|
|
78
80
|
des: "productList",
|
|
79
81
|
from: "couponBatch",
|
|
80
82
|
couponId: `${couponId}`,
|
|
81
83
|
tip: "1",
|
|
82
84
|
inlet: 0,
|
|
83
85
|
quangoufrom: 2
|
|
84
86
|
},
|
|
85
87
|
logEventInfo,
|
|
86
88
|
),
|
|
87
89
|
)
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
jdJumpToWeb(
|
|
91
93
|
url,
|
|
92
94
|
logEventInfo,
|
|
93
95
|
successBack?: Function | undefined,
|
|
94
96
|
failBack?: Function | undefined,
|
|
95
97
|
) {
|
|
96
98
|
if (this.isOpenTjAppUrl(url)) {
|
|
97
99
|
const getOpenAppParams = this.tjOpenAppParams(url)
|
|
98
100
|
console.log(
|
|
99
101
|
'tj web 获取自定义openApp链接解析后的参数结果',
|
|
100
102
|
getOpenAppParams,
|
|
101
103
|
)
|
|
102
104
|
if (getOpenAppParams) {
|
|
103
105
|
this.jdNavigateToNative(
|
|
104
106
|
Object.assign({}, getOpenAppParams, {
|
|
105
107
|
logEventInfo,
|
|
106
108
|
}),
|
|
107
109
|
)
|
|
108
110
|
}
|
|
109
111
|
} else {
|
|
110
112
|
if(url.indexOf('tjshop') == -1) {
|
|
111
113
|
url = url + this.getTjShopParam()
|
|
112
114
|
}
|
|
113
115
|
const changeUrl = /^\/\//.test(url) ? `https:${url}` : url
|
|
114
116
|
this.jdNavigateToNative(
|
|
115
117
|
{
|
|
116
118
|
category: 'jump',
|
|
117
119
|
des: 'm',
|
|
118
120
|
url: changeUrl,
|
|
119
121
|
logEventInfo,
|
|
120
122
|
},
|
|
121
123
|
OpenAppHost,
|
|
122
124
|
successBack,
|
|
123
125
|
failBack,
|
|
124
126
|
)
|
|
125
127
|
}
|
|
126
128
|
}
|
|
127
129
|
jdJumpToShopSearch(shopInfo) {
|
|
128
130
|
const getInfo = Object.assign(
|
|
129
131
|
{},
|
|
130
132
|
{
|
|
131
133
|
shopId: global.info.queryInfo.shopId,
|
|
132
134
|
venderId: global.info.queryInfo.venderId,
|
|
133
135
|
},
|
|
134
136
|
shopInfo,
|
|
135
137
|
)
|
|
136
138
|
const { shopId, categoryId, keyword, pageId, description, shopName } =
|
|
137
139
|
getInfo
|
|
138
140
|
const cateId = categoryId ? `&cateId=${typeof categoryId === 'string' ? categoryId?.trim() : categoryId}` : ''
|
|
139
141
|
const addKeyWord = keyword ? `&keyword=${keyword}` : ''
|
|
140
142
|
const addPageId = pageId ? `&pageId=${pageId}` : ''
|
|
141
143
|
const searchDes = description ? `&description=${description}` : ''
|
|
142
144
|
const shopNameDes = shopName ? `&shopName=${shopName}` : ''
|
|
143
145
|
const searchType = categoryId ? 5 : keyword ? 4 : 3
|
|
144
146
|
super.jdNavigateToNative(
|
|
145
147
|
`${this.jumpWebUrl.shopSearch}?shopId=${shopId}&searchType=${searchType}${cateId}${addKeyWord}${addPageId}${searchDes}${shopNameDes}`,
|
|
146
148
|
getInfo,
|
|
147
149
|
)
|
|
148
150
|
}
|
|
149
151
|
|
|
150
152
|
jdNavigateToNative(
|
|
151
153
|
params,
|
|
152
154
|
url = OpenAppHost,
|
|
153
155
|
successBack?: Function | null,
|
|
154
156
|
failBack?: Function | null,
|
|
155
157
|
) {
|
|
156
158
|
console.log('tj web', params)
|
|
157
159
|
const { logEventInfo , ...otherParams } = params
|
|
158
160
|
console.log('tj web 获取open协议参数 jdNavigateToNative params: ',otherParams)
|
|
159
161
|
console.log('logEventInfo params: ', logEventInfo)
|
|
160
162
|
console.log('otherParams', otherParams)
|
|
161
163
|
const paramsStr = JSON.stringify(otherParams)
|
|
162
164
|
console.log('跳转web tj open协议', `${url}?params=${paramsStr}`)
|
|
163
165
|
global.info.pageInfo.dataType === BUSINESS_TYPE.ONLINE &&
|
|
164
166
|
this.clickEventLog(logEventInfo || params)
|
|
165
167
|
.then(() => {
|
|
166
168
|
if (typeof successBack == 'function') {
|
|
167
169
|
successBack(params)
|
|
168
170
|
} else {
|
|
169
171
|
try {
|
|
170
172
|
const paramsStr = encodeURIComponent(JSON.stringify(otherParams))
|
|
171
173
|
console.log(
|
|
172
174
|
'success: 跳转web tj open协议',
|
|
173
175
|
`${url}?params=${paramsStr}`,
|
|
174
176
|
)
|
|
175
177
|
window.location.href = `${url}?params=${paramsStr}`
|
|
176
178
|
} catch (e) {
|
|
177
179
|
console.log('跳转异常', e)
|
|
178
180
|
}
|
|
179
181
|
}
|
|
180
182
|
})
|
|
181
183
|
.catch((e) => {
|
|
182
184
|
console.log('catch', e)
|
|
183
185
|
typeof failBack == 'function' && failBack(params)
|
|
184
186
|
})
|
|
185
187
|
}
|
|
186
188
|
|
|
187
189
|
clickEventLog(
|
|
188
190
|
opts: JumpEventReportInterFace.OptEventLogParams = {},
|
|
189
191
|
reportKey = 'click',
|
|
190
192
|
) {
|
|
191
193
|
const { eventId, jsonParam, eventLevel = 3, ...otherParams } = opts
|
|
192
194
|
if (eventId && jsonParam) {
|
|
193
195
|
const { etModelInfo, logBaseInfo } = jsonParam
|
|
194
196
|
const webLogParams = {
|
|
195
197
|
eid: eventId,
|
|
196
198
|
elevel: eventLevel,
|
|
197
199
|
eparam:JSON.stringify(logBaseInfo || jsonParam),
|
|
198
200
|
jsonParam: JSON.stringify(logBaseInfo || jsonParam),
|
|
199
201
|
etModel: JSON.stringify(etModelInfo || {}),
|
|
200
202
|
pageId: this.logPageId,
|
|
201
203
|
pageParam: this.logPageParamStr,
|
|
202
204
|
...otherParams,
|
|
203
205
|
}
|
|
204
206
|
return /click|exposure/.test(reportKey)
|
|
205
207
|
? reportClick(webLogParams)
|
|
206
208
|
: reportToCart(opts,webLogParams)
|
|
207
209
|
} else {
|
|
208
210
|
console.log('暂无埋点参数eventId和eventParam')
|
|
209
211
|
return Promise.resolve(false)
|
|
210
212
|
}
|
|
211
213
|
}
|
|
212
214
|
getConfig(opt = {}) {
|
|
213
215
|
return Object.assign(this, {}, defaultConfig, opt)
|
|
214
216
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import global from '../common'
|
|
2
|
BUSINESS_TYPE,
|
|
1
3
|
objectToUrlEncode,
|
|
2
4
|
parseQueryUrlString,
|
|
3
5
|
isTjScence,
|
|
4
6
|
isTjM,
|
|
5
7
|
isTjJxM,
|
|
6
8
|
isH5AdnJxMini,
|
|
7
9
|
tjChannel,
|
|
8
10
|
public logPageId: string
|
|
9
11
|
public jumpConfig: JumpEventReportInterFace.JumpH5ReportConfig
|
|
10
12
|
constructor(opt) {
|
|
11
13
|
super(opt)
|
|
12
14
|
this.getConfig(opt)
|
|
13
15
|
console.log('加载特价/京喜m的跳转js文件....')
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
getTjShopParam () {
|
|
17
19
|
const { tjshop } = global.info.queryInfo
|
|
18
20
|
const tjshopParam = tjshop ? `&tjshop=${tjshop}` : ''
|
|
19
21
|
const tjChannelStr = tjChannel ? `&tjChannel=${tjChannel}` : ''
|
|
20
22
|
return `${tjshopParam}${tjChannelStr}`
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
jdJumpToProduct(skuIds, logEventInfo) {
|
|
24
26
|
skuIds = skuIds.toString().trim()
|
|
25
27
|
const getSkuId = skuIds.indexOf(',') !== -1 ? skuIds.split(',')[0] : skuIds
|
|
26
28
|
const { jingxiSdx, ...otherLogInfo } = logEventInfo
|
|
27
29
|
let url = `${this.jumpWebUrl.detail}${getSkuId}.html`
|
|
28
30
|
if (isTjScence) {
|
|
29
31
|
if (isTjM) {
|
|
30
32
|
url = `${this.jumpWebUrl.tjDetail}?wareId=${getSkuId}`
|
|
31
33
|
} else if (isTjJxM) {
|
|
32
34
|
const { _fd } = global.info.queryInfo
|
|
33
35
|
const fd = _fd ? `&_fd=${_fd}` : ''
|
|
34
36
|
url = `${this.jumpWebUrl.jxDetail}?sku=${getSkuId}${fd}`
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
39
|
if(jingxiSdx){
|
|
38
40
|
this.jdNavigateToNative(
|
|
39
41
|
`${url}?sdx=${jingxiSdx}`,
|
|
40
42
|
otherLogInfo,
|
|
41
43
|
)
|
|
42
44
|
}else {
|
|
43
45
|
this.jdNavigateToNative(
|
|
44
46
|
url,
|
|
45
47
|
logEventInfo,
|
|
46
48
|
)
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
jdJumpSkuInfoToProduct(skuInfo: any = {}, logEventInfo) {
|
|
51
53
|
const getSkuId = skuInfo?.skuId;
|
|
52
54
|
this.jdJumpToProduct(getSkuId, logEventInfo)
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
jdJumpToShopHome(shopInfo: JumpEventReportInterFace.ShopIdsInfo = {}) {
|
|
56
58
|
const getInfo = Object.assign(
|
|
57
59
|
{},
|
|
58
60
|
{
|
|
59
61
|
shopId: global.info.queryInfo.shopId,
|
|
60
62
|
venderId: global.info.queryInfo.venderId,
|
|
61
63
|
},
|
|
62
64
|
shopInfo,
|
|
63
65
|
)
|
|
64
66
|
this.jdNavigateToNative(
|
|
65
67
|
`${this.jumpWebUrl.mshop}?${objectToUrlEncode(
|
|
66
68
|
this.getShopIdOrVenderIdParams(getInfo),
|
|
67
69
|
)}${this.getTjShopParam()}`,
|
|
68
70
|
{
|
|
69
71
|
...getInfo,
|
|
70
72
|
},
|
|
71
73
|
)
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
jdJumpToWeb(
|
|
75
77
|
url,
|
|
76
78
|
logEventInfo,
|
|
77
79
|
successBack?: Function | undefined,
|
|
78
80
|
failBack?: Function | undefined,
|
|
79
81
|
) {
|
|
80
82
|
console.log('web.tjm.ts - jdJumpToWeb')
|
|
81
83
|
if(url.indexOf('tjshop') == -1) {
|
|
82
84
|
url = url + this.getTjShopParam()
|
|
83
85
|
}
|
|
84
86
|
this.jdNavigateToNative(
|
|
85
87
|
url,
|
|
86
88
|
{
|
|
87
89
|
...logEventInfo,
|
|
88
90
|
},
|
|
89
91
|
successBack,
|
|
90
92
|
failBack,
|
|
91
93
|
)
|
|
92
94
|
}
|
|
93
95
|
|
|
94
96
|
jdJumpConfigUrl(detail, logEventInfo = {}) {
|
|
95
97
|
const { configDataType, configDataValue } = detail
|
|
96
98
|
console.log(
|
|
97
99
|
'jdJumpConfigUrl web.tj.base configDataType:',
|
|
98
100
|
configDataType,
|
|
99
101
|
configDataValue,
|
|
100
102
|
)
|
|
101
103
|
switch (configDataType) {
|
|
102
104
|
case LinkConfigType.CONFIG_TYPE_SKU_LIST:
|
|
103
105
|
if(logEventInfo?.jsonParam?.logBaseInfo?.mInfo){
|
|
104
106
|
logEventInfo.jsonParam.logBaseInfo.mInfo.skuid = configDataValue.skuIds
|
|
105
107
|
}
|
|
106
108
|
this.jdJumpToProduct(configDataValue.skuIds, logEventInfo)
|
|
107
109
|
break
|
|
108
110
|
case LinkConfigType.CONFIG_TYPE_COUPON_LIST:
|
|
109
111
|
this.jdJumpToWeb(
|
|
110
112
|
`${this.jumpWebUrl.shopCoupon}?couponType=1&shopId=${global.info.queryInfo.shopId}&venderId=${global.info.queryInfo.venderId}`,
|
|
111
113
|
{},
|
|
112
114
|
)
|
|
113
115
|
break
|
|
114
116
|
case LinkConfigType.CONFIG_TYPE_CATEGORY:
|
|
115
117
|
if (this.isOpenJdAppUrl(configDataValue.clickUrl)) {
|
|
116
118
|
const getShopSearchParams = this.jdOpenAppParams(
|
|
117
119
|
configDataValue.clickUrl,
|
|
118
120
|
)
|
|
119
121
|
getShopSearchParams &&
|
|
120
122
|
this.jdJumpToShopSearch(
|
|
121
123
|
Object.assign({}, getShopSearchParams, {
|
|
122
124
|
logEventInfo,
|
|
123
125
|
}),
|
|
124
126
|
)
|
|
125
127
|
} else {
|
|
126
128
|
this.jdJumpToShopSearch(
|
|
127
129
|
configDataValue['cid']
|
|
128
130
|
? Object.assign(
|
|
129
131
|
{},
|
|
130
132
|
{
|
|
131
133
|
shopId: global.info.queryInfo.shopId,
|
|
132
134
|
categoryId: configDataValue.cid,
|
|
133
135
|
...configDataValue,
|
|
134
136
|
logEventInfo,
|
|
135
137
|
},
|
|
136
138
|
)
|
|
137
139
|
: {
|
|
138
140
|
shopId: global.info.queryInfo.shopId,
|
|
139
141
|
logEventInfo,
|
|
140
142
|
},
|
|
141
143
|
)
|
|
142
144
|
}
|
|
143
145
|
break
|
|
144
146
|
case LinkConfigType.CONFIG_TYPE_CATEGORY_PAGE:
|
|
145
147
|
this.jdJumpToShopCategory({
|
|
146
148
|
...configDataValue,
|
|
147
149
|
logEventInfo,
|
|
148
150
|
})
|
|
149
151
|
break
|
|
150
152
|
case LinkConfigType.CONFIG_TYPE_MEMBER:
|
|
151
153
|
if (this.isOpenJdAppUrl(configDataValue.clickUrl)) {
|
|
152
154
|
const getShopMemberParams = this.jdOpenAppParams(
|
|
153
155
|
configDataValue.clickUrl,
|
|
154
156
|
)
|
|
155
157
|
getShopMemberParams &&
|
|
156
158
|
this.jdJumpToShopMember(
|
|
157
159
|
Object.assign({}, getShopMemberParams, {
|
|
158
160
|
logEventInfo,
|
|
159
161
|
}),
|
|
160
162
|
)
|
|
161
163
|
} else {
|
|
162
164
|
this.jdJumpToShopMember({
|
|
163
165
|
shopId: global.info.queryInfo.shopId,
|
|
164
166
|
venderId: configDataValue.shopDetail,
|
|
165
167
|
logEventInfo,
|
|
166
168
|
})
|
|
167
169
|
}
|
|
168
170
|
break
|
|
169
171
|
case LinkConfigType.CONFIG_TYPE_SHOP_ACTIVITY:
|
|
170
172
|
if (this.isOpenJdAppUrl(configDataValue.clickUrl)) {
|
|
171
173
|
const getShopActivityParams = this.jdOpenAppParams(
|
|
172
174
|
configDataValue.clickUrl,
|
|
173
175
|
)
|
|
174
176
|
if (
|
|
175
177
|
getShopActivityParams &&
|
|
176
178
|
getShopActivityParams['des'] == 'jshopActivity'
|
|
177
179
|
) {
|
|
178
180
|
this.jdJumpToShopActivity({
|
|
179
181
|
projectId: configDataValue['projectId'],
|
|
180
182
|
configDataValue,
|
|
181
183
|
logEventInfo,
|
|
182
184
|
})
|
|
183
185
|
}
|
|
184
186
|
} else if (configDataValue['projectId']) {
|
|
185
187
|
this.jdJumpToShopActivity({
|
|
186
188
|
projectId: configDataValue['projectId'],
|
|
187
189
|
configDataValue,
|
|
188
190
|
logEventInfo,
|
|
189
191
|
})
|
|
190
192
|
}
|
|
191
193
|
break
|
|
192
194
|
case LinkConfigType.CONFIG_TYPE_CUSTOM_LINK:
|
|
193
195
|
case LinkConfigType.CONFIG_TYPE_FINANCE_COUPON:
|
|
194
196
|
let _url = configDataValue.linkUrl
|
|
195
197
|
const isProductM = /item\.m\.jd\.com/.test(_url)
|
|
196
198
|
const isProductPC = /item\.jd\.com/.test(_url)
|
|
197
199
|
if (isTjScence) {
|
|
198
200
|
const { appCode } = global.info.queryInfo
|
|
199
201
|
|
|
200
202
|
if (/(pro|prodev)\.jd\.com(\/mall\/)/.test(_url)) {
|
|
201
203
|
if (isH5AdnJxMini) {
|
|
202
204
|
_url = _url.replace(
|
|
203
205
|
/([prodev]|[pro])(\.jd\.com)(\/mall)/,
|
|
204
206
|
"$1.m$2/mini"
|
|
205
207
|
) + `appCode=${appCode}&wxAppName=jx`
|
|
206
208
|
} else {
|
|
207
209
|
_url = _url.replace(
|
|
208
210
|
/([prodev]|[pro])(\.jd\.com)(\/mall)/,
|
|
209
211
|
"$1.m$2/jdlite"
|
|
210
212
|
)
|
|
211
213
|
}
|
|
212
214
|
} else if (/(pro|prodev)\.(m\.jd|jd)\.com(\/mall\/)/.test(_url)) {
|
|
213
215
|
if (isH5AdnJxMini) {
|
|
214
216
|
_url = _url.replace(
|
|
215
217
|
/([prodev]|[pro])(\.m\.jd\.com)(\/mall)/,
|
|
216
218
|
"$1$2/mini"
|
|
217
219
|
) + `appCode=${appCode}&wxAppName=jx`
|
|
218
220
|
} else {
|
|
219
221
|
_url = _url.replace(
|
|
220
222
|
/([prodev]|[pro])(\.m\.jd\.com)(\/mall)/,
|
|
221
223
|
"$1$2/jdlite"
|
|
222
224
|
)
|
|
223
225
|
}
|
|
224
226
|
}
|
|
225
227
|
}
|
|
226
228
|
if (
|
|
227
229
|
_url.indexOf('to=') === -1 &&
|
|
228
230
|
_url.indexOf(`${domain.mshop.replace(/https?:/, '')}/?shopId=`) !== -1
|
|
229
231
|
) {
|
|
230
232
|
const _shopId = _url.match(/\d+/g)[0]
|
|
231
233
|
this.jdJumpToShopHome({
|
|
232
234
|
shopId: `${_shopId}`,
|
|
233
235
|
logEventInfo,
|
|
234
236
|
})
|
|
235
237
|
} else if (this.isOpenJdAppUrl(_url)) {
|
|
236
238
|
const getOpenAppParams: any = this.jdOpenAppParams(_url)
|
|
237
239
|
if (getOpenAppParams) {
|
|
238
240
|
if (getOpenAppParams.jumpTab == 'allProduct') {
|
|
239
241
|
this.jdJumpToTabAllProduct(
|
|
240
242
|
global.info.queryInfo.shopId,
|
|
241
243
|
global.info.queryInfo.venderId,
|
|
242
244
|
)
|
|
243
245
|
} else if (
|
|
244
246
|
getOpenAppParams.des == 'productList' &&
|
|
245
247
|
getOpenAppParams.from == 'couponBatch'
|
|
246
248
|
) {
|
|
247
249
|
this.jdJumpToCouponSearchProductList(getOpenAppParams?.couponId)
|
|
248
250
|
} else if (getOpenAppParams.des == 'vapp') {
|
|
249
251
|
this.jdJumpToWeb(
|
|
250
252
|
`https://conecli.com/apps/mpshare/index.html?category=${
|
|
251
253
|
getOpenAppParams.category
|
|
252
254
|
}&des=${getOpenAppParams.des}&vapptype=${
|
|
253
255
|
getOpenAppParams.vapptype
|
|
254
256
|
}&appId=${getOpenAppParams.appId}&path=${
|
|
255
257
|
getOpenAppParams.path
|
|
256
258
|
}¶m=${encodeURI(JSON.stringify(getOpenAppParams.param))}`,
|
|
257
259
|
logEventInfo,
|
|
258
260
|
)
|
|
259
261
|
} else {
|
|
260
262
|
this.jdNavigateToNative(
|
|
261
263
|
'',
|
|
262
264
|
Object.assign({}, getOpenAppParams, {
|
|
263
265
|
logEventInfo,
|
|
264
266
|
}),
|
|
265
267
|
)
|
|
266
268
|
}
|
|
267
269
|
}
|
|
268
270
|
} else if (isProductM || isProductPC) {
|
|
269
271
|
const skuid = _url.match(/\d+/g)[0]
|
|
270
272
|
if (skuid) {
|
|
271
273
|
this.jdJumpToProduct(skuid, logEventInfo)
|
|
272
274
|
}
|
|
273
275
|
} else {
|
|
274
276
|
this.jdJumpToWeb(_url, logEventInfo)
|
|
275
277
|
}
|
|
276
278
|
break
|
|
277
279
|
case LinkConfigType.CONFIG_TYPE_JSHOP_DETAIL:
|
|
278
280
|
this.jdJumpToShopDetail({
|
|
279
281
|
venderId: global.info.queryInfo.venderId,
|
|
280
282
|
shopId: global.info.queryInfo.shopId,
|
|
281
283
|
logEventInfo,
|
|
282
284
|
})
|
|
283
285
|
break
|
|
284
286
|
case LinkConfigType.CONFIG_TYPE_SHOP_HOME:
|
|
285
287
|
this.jdJumpToShopHome({
|
|
286
288
|
...configDataValue,
|
|
287
289
|
logEventInfo,
|
|
288
290
|
})
|
|
289
291
|
break
|
|
290
292
|
case LinkConfigType.CONFIG_TYPE_ANCHOR_POINT:
|
|
291
293
|
break
|
|
292
294
|
case LinkConfigType.CONFIG_TYPE_SHOPPING_GUIDE:
|
|
293
295
|
if (this.isOpenJdAppUrl(configDataValue.clickUrl)) {
|
|
294
296
|
const getShoppingGuideParams = this.jdOpenAppParams(
|
|
295
297
|
configDataValue.clickUrl,
|
|
296
298
|
)
|
|
297
299
|
getShoppingGuideParams &&
|
|
298
300
|
this.jdJumpToShopActivity(
|
|
299
301
|
Object.assign({}, getShoppingGuideParams, {
|
|
300
302
|
logEventInfo,
|
|
301
303
|
}),
|
|
302
304
|
)
|
|
303
305
|
}
|
|
304
306
|
break
|
|
305
307
|
case LinkConfigType.CONFIG_TYPE_MINI_PROGRAM: {
|
|
306
308
|
const linkUrl = decodeURIComponent(configDataValue?.linkUrl || '')
|
|
307
309
|
const search = linkUrl.match(/\?.+/)
|
|
308
310
|
if (search) {
|
|
309
311
|
const miniQueryData: JumpEventReportInterFace.LinkMiniParams =
|
|
310
312
|
parseQueryUrlString(linkUrl)
|
|
311
313
|
try {
|
|
312
314
|
miniQueryData.param = JSON.parse(<string>miniQueryData?.param)
|
|
313
315
|
} catch (e) {
|
|
314
316
|
console.warn('解析小程序 param 错误:', miniQueryData.param)
|
|
315
317
|
}
|
|
316
318
|
this.jdJumpToMiniProgram(miniQueryData)
|
|
317
319
|
} else {
|
|
318
320
|
console.warn('小程序地址错误:', linkUrl)
|
|
319
321
|
}
|
|
320
322
|
break
|
|
321
323
|
}
|
|
322
324
|
default:
|
|
323
325
|
}
|
|
324
326
|
}
|
|
325
327
|
|
|
326
328
|
jdJumpToCouponSearchProductList(couponId, logEventInfo = {}) {
|
|
327
329
|
if(isTjM) return
|
|
328
330
|
let batchParam = isTjScence ? `coupon_batch=${couponId}` : `couponbatch=${couponId}`
|
|
329
331
|
this.jdJumpToWeb(
|
|
330
332
|
`${this.jumpWebUrl.jxCouponSearch}?${batchParam}`,
|
|
331
333
|
logEventInfo,
|
|
332
334
|
)
|
|
333
335
|
}
|
|
334
336
|
|
|
335
337
|
jdNavigateToNative(
|
|
336
338
|
url: string,
|
|
337
339
|
params: {
|
|
338
340
|
logEventInfo?: object
|
|
339
341
|
} = {},
|
|
340
342
|
successBack?: Function | undefined,
|
|
341
343
|
failBack?: Function | undefined,
|
|
342
344
|
) {
|
|
343
345
|
const { logEventInfo } = params
|
|
344
346
|
const getEparam = logEventInfo || params
|
|
345
347
|
if(url.indexOf('tjshop') == -1) {
|
|
346
348
|
url = url + this.getTjShopParam()
|
|
347
349
|
}
|
|
348
350
|
console.log(`url:::::::${url}`)
|
|
349
351
|
global.info.pageInfo.dataType === BUSINESS_TYPE.ONLINE &&
|
|
350
352
|
this.clickEventLog(getEparam)
|
|
351
353
|
.then(() => {
|
|
352
354
|
typeof successBack == 'function'
|
|
353
355
|
? successBack(url)
|
|
354
356
|
: (window.location.href = url)
|
|
355
357
|
})
|
|
356
358
|
.catch(() => {
|
|
357
359
|
typeof failBack == 'function' && failBack(url)
|
|
358
360
|
})
|
|
359
361
|
}
|