@conecli/cone-render 0.10.1-shop3.45 → 0.10.1-shop3.47

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.
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro';
2
1
  entrance: 'shop-page-tab',
3
2
  moduleId: 'shop-modular-floor',
4
3
 
5
4
  jdJumpToProduct(skuIds, logEventInfo, otherParams = {}) {
6
5
  skuIds = skuIds.toString().trim();
7
6
  const getSkuId = skuIds.indexOf(',') !== -1 ? skuIds.split(',')[0] : skuIds;
8
7
  const openAppParam = {
9
8
  category: 'jump',
10
9
  des: 'productDetail',
11
10
  skuId: getSkuId,
12
11
  logEventInfo,
13
12
  ...otherParams,
14
13
  };
15
14
  const adInfos = getAdInfoBySkuId(getSkuId);
16
15
  if (adInfos) {
17
16
  openAppParam.pdExtFlag = {
18
17
  adInfos,
19
18
  };
20
19
  }
21
20
  this.jdNavigateToNative(openAppParam);
22
21
  }
23
22
 
24
23
  jdJumpSkuInfoToProduct(skuInfo: any = {}, logEventInfo) {
25
24
  const getSkuId = skuInfo?.skuId;
26
25
  this.jdJumpToProduct(getSkuId, logEventInfo);
27
26
  }
28
27
 
29
28
  jdJumpToShopCategory(shopInfo = {}) {
30
29
  console.log(
31
30
  '🚀 ~ file: jdJumpJdApp.ts:40 ~ JdJumpJdApp ~ jdJumpToShopCategory ~ shopInfo:',
32
31
  shopInfo,
33
32
  );
34
33
  console.log('[降级H5] jdJumpToShopCategory jdJumpJdApp');
35
34
  this.jdNavigateToNative(
36
35
  Object.assign(
37
36
  {},
38
37
  {
39
38
  category: 'jump',
40
39
  des: 'jshopMain',
41
40
  jumpBottomTab: 'category',
42
41
  },
43
42
  shopInfo,
44
43
  {
45
44
  shopId: String(shopInfo.shopId ?? ''),
46
45
  venderId: String(shopInfo.venderId ?? ''),
47
46
  },
48
47
  ),
49
48
  );
50
49
  }
51
50
 
52
51
  jdJumpToOrderInfoView(wareId, wareNum = 1, logEventInfo) {
53
52
  this.jdNavigateToNative({
54
53
  category: 'jump',
55
54
  des: 'orderInfoView',
56
55
  wareId: `${wareId}`,
57
56
  wareNum: global.info.sysInfo.isIOS ? `${wareNum}` : wareNum,
58
57
  skuSource: 25,
59
58
  sourceType: 6,
60
59
  extFlag: '{}',
61
60
  logEventInfo,
62
61
  });
63
62
  }
64
63
 
65
64
  jdJumpToTryDetail(tryId) {
66
65
  this.jdNavigateToNative({
67
66
  category: 'jump',
68
67
  des: 'jdreactcommon',
69
68
  appname: 'JDReactNewProduct',
70
69
  modulename: 'JDReactNewProduct',
71
70
  param: {
72
71
  activityId: tryId,
73
72
  isNative: true,
74
73
  nativePage: 'jdtry_detail',
75
74
  transparentenable: true,
76
75
  },
77
76
  });
78
77
  }
79
78
 
80
79
  jdJumpToShopHome(shopInfo: JumpEventReportInterFace.ShopIdsInfo = {}) {
81
80
  console.log('[降级H5] jdJumpToShopHome jdJumpJdApp');
82
81
  const currentShopInfo = {
83
82
  shopId: global.info.queryInfo.shopId,
84
83
  venderId: global.info.queryInfo.venderId,
85
84
  };
86
85
  const restParams =
87
86
  (shopInfo?.shopId && shopInfo.shopId !== currentShopInfo.shopId) ||
88
87
  (shopInfo?.venderId && shopInfo.venderId !== currentShopInfo.venderId)
89
88
  ? {}
90
89
  : currentShopInfo;
91
90
  const getInfo = Object.assign({}, restParams, shopInfo);
92
91
  const getShopParams = this.getShopIdsInfo(getInfo);
93
92
  this.jdJumpToShopBase(getShopParams);
94
93
  }
95
94
 
96
95
  jdJumpToShopHomeInner(shopInfo: JumpEventReportInterFace.ShopIdsInfo = {}) {
97
96
  const getParam = Object.assign(
98
97
  {},
99
98
  {
100
99
  jumpTab: HOME_TOP_TAB_TYPE_APP.HOME,
101
100
  operation: 'jumpTabInner',
102
101
  },
103
102
  shopInfo,
104
103
  );
105
104
  this.jdJumpToShopBase(getParam);
106
105
  }
107
106
 
108
107
  jdJumpToUnifieddetail(sourceInfo) {
109
108
  this.jdNavigateToNative(
110
109
  Object.assign(
111
110
  {},
112
111
  {
113
112
  category: 'jump',
114
113
  des: 'unifieddetail',
115
114
  },
116
115
  sourceInfo,
117
116
  ),
118
117
  );
119
118
  }
120
119
 
121
120
  jdJumpToVideoImmersion(sourceInfo) {
122
121
  this.jdNavigateToNative(
123
122
  Object.assign(
124
123
  {},
125
124
  {
126
125
  category: 'jump',
127
126
  des: 'VideoImmersion',
128
127
  },
129
128
  sourceInfo,
130
129
  ),
131
130
  );
132
131
  }
133
132
 
134
133
  jdJumpToShopMember(shopInfo) {
135
134
  this.jdNavigateToNative(
136
135
  Object.assign(
137
136
  {},
138
137
  {
139
138
  category: 'jump',
140
139
  des: 'jshopMember',
141
140
  followAward: '-1',
142
141
  },
143
142
  shopInfo,
144
143
  ),
145
144
  );
146
145
  }
147
146
 
148
147
  jdJumpToMemberTab(shopInfo?) {
149
148
  this.jdNavigateToNative(
150
149
  Object.assign(
151
150
  {},
152
151
  {
153
152
  category: 'jump',
154
153
  des: 'jshopMain',
155
154
  shopId: global.info.queryInfo.shopId,
156
155
  venderId: global.info.queryInfo.venderId,
157
156
  operation: 'jumpBottomTabMember',
158
157
  sourceInfo: APP_SOURCE_INFO,
159
158
  },
160
159
  shopInfo,
161
160
  ),
162
161
  );
163
162
  }
164
163
 
165
164
  jdJumpToDongDongChatGroup(groupId, source = 'jdmini') {
166
165
  this.jdNavigateToNative({
167
166
  category: 'jump',
168
167
  des: 'dongdong_group_chat',
169
168
  source: source,
170
169
  groupId: `${groupId}`,
171
170
  });
172
171
  }
173
172
 
174
173
  jdJumpToDongDongChat(paramInfo: any = {}) {
175
174
  const { venderId, ...otherParams } = paramInfo;
176
175
  this.jdNavigateToNative(
177
176
  Object.assign(
178
177
  {},
179
178
  {
180
179
  category: 'jump',
181
180
  des: 'jd_dongdong_chat',
182
181
  venderId: `${venderId ? venderId : global.info.queryInfo?.venderId}`,
183
182
  entry: 'm_shop',
184
183
  },
185
184
  otherParams,
186
185
  ),
187
186
  );
188
187
  }
189
188
 
190
189
  jdJumpToShopActivity(shopInfo) {
191
190
  const getParams = Object.assign(
192
191
  {},
193
192
  {
194
193
  category: 'jump',
195
194
  des: 'jshopActivity',
196
195
  shopId: global.info.queryInfo.shopId,
197
196
  venderId: global.info.queryInfo.venderId,
198
197
  },
199
198
  shopInfo,
200
199
  );
201
200
  getParams['projectId'] && (getParams['projectId'] = `${getParams['projectId']}`);
202
201
  this.jdNavigateToNative(getParams);
203
202
  }
204
203
 
205
204
  jdJumpToShopActivityPage(shopInfo) {
206
205
  this.jdNavigateToNative(
207
206
  Object.assign(
208
207
  {},
209
208
  {
210
209
  category: 'jump',
211
210
  des: 'jshopActivityPage',
212
211
  shopId: global.info.queryInfo.shopId,
213
212
  title: global.info.queryInfo?.shopName,
214
213
  },
215
214
  shopInfo,
216
215
  ),
217
216
  );
218
217
  }
219
218
 
220
219
  jdJumpToShopDetail(shopInfo) {
221
220
  this.jdNavigateToNative(
222
221
  Object.assign(
223
222
  {},
224
223
  {
225
224
  category: 'jump',
226
225
  des: 'jshopDetail',
227
226
  shopId: global.info.queryInfo.shopId,
228
227
  venderId: global.info.queryInfo.venderId,
229
228
  sourceInfo: APP_SOURCE_INFO,
230
229
  },
231
230
  shopInfo,
232
231
  ),
233
232
  );
234
233
  }
235
234
 
236
235
  jdJumpToShopMemberCard(shopInfo) {
237
236
  const { url, logEventInfo } = shopInfo;
238
237
  if (this.isOpenJdAppUrl(url)) {
239
238
  const getOpenAppParams = this.jdOpenAppParams(url);
240
239
  console.log('jd web 获取自定义openApp链接解析后的参数结果', getOpenAppParams);
241
240
  if (getOpenAppParams) {
242
241
  this.jdNavigateToNative(Object.assign({}, getOpenAppParams, { logEventInfo }));
243
242
  }
244
243
  } else {
245
244
  super.jdJumpToWeb(url, {
246
245
  ...logEventInfo,
247
246
  });
248
247
  }
249
248
  }
250
249
 
251
250
  jdJumpToTotalPromotion(shopInfo) {
252
251
  const { url, logEventInfo } = shopInfo;
253
252
  if (this.isOpenJdAppUrl(url)) {
254
253
  const getOpenAppParams = this.jdOpenAppParams(url);
255
254
  console.log('jd web 获取自定义openApp链接解析后的参数结果', getOpenAppParams);
256
255
  if (getOpenAppParams) {
257
256
  this.jdNavigateToNative(Object.assign({}, getOpenAppParams, { logEventInfo }));
258
257
  }
259
258
  } else {
260
259
  super.jdJumpToWeb(url, {
261
260
  ...logEventInfo,
262
261
  });
263
262
  }
264
263
  }
265
264
 
266
265
  jdJumpToShopSearch(pageInfo = {}) {
267
266
  const getInfo = Object.assign(
268
267
  {},
269
268
  {
270
269
  shopId: global.info.queryInfo.shopId,
271
270
  venderId: global.info.queryInfo.venderId,
272
271
  sourceInfo: APP_SOURCE_INFO,
273
272
  },
274
273
  pageInfo,
275
274
  );
276
275
  const { keyword = '', categoryId = '', ...otherPageInfo }: any = getInfo;
277
276
  const searchInfo = {};
278
277
  if (categoryId !== '') {
279
278
  searchInfo['categoryId'] = typeof categoryId === 'string' ? categoryId?.trim() : categoryId;
280
279
  searchInfo['searchType'] = '5';
281
280
  } else if (keyword !== '') {
282
281
  searchInfo['keyWord'] = keyword;
283
282
  searchInfo['searchType'] = '4';
284
283
  }
285
284
  const openAppParam = {
286
285
  category: 'jump',
287
286
  des: 'jshopProductList',
288
287
  pageId: '1',
289
288
  ...searchInfo,
290
289
  };
291
290
  const jumpExtMap = getEnterShopExtInfo();
292
291
  if (jumpExtMap) {
293
292
  openAppParam.jumpExtMap = jumpExtMap;
294
293
  }
295
294
  this.jdNavigateToNative(Object.assign({}, openAppParam, otherPageInfo));
296
295
  }
297
296
 
298
297
  jdJumpToOrderList(logEventInfo = {}) {
299
298
  this.jdNavigateToNative(
300
299
  Object.assign(
301
300
  {},
302
301
  {
303
302
  category: 'jump',
304
303
  des: 'orderlist',
305
304
  from: 'dphycc',
306
305
  },
307
306
  logEventInfo,
308
307
  ),
309
308
  );
310
309
  }
311
310
 
312
311
  jdJumpToCouponSearchProductList(couponId, logEventInfo = {}) {
313
312
  this.jdNavigateToNative(
314
313
  Object.assign(
315
314
  {},
316
315
  {
317
316
  category: 'jump',
318
317
  des: 'productList',
319
318
  from: 'couponBatch',
320
319
  couponId: `${couponId}`,
321
320
  logEventInfo,
322
321
  },
323
322
  ),
324
323
  );
325
324
  }
326
325
 
327
326
  jdJumpToTabAllProduct(shopId, venderId, logEventInfo = {}) {
328
327
  console.log('jdJumpJdApp - jdJumpToTabAllProduct');
329
328
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId;
330
329
  if (typeof venderId === 'undefined') venderId = global.info.queryInfo.venderId;
331
330
  this.jdNavigateToNative(
332
331
  Object.assign(
333
332
  {},
334
333
  {
335
334
  category: 'jump',
336
335
  des: 'jshopMain',
337
336
  jumpTab: 'allProduct',
338
337
  },
339
338
  shopId !== 'undefined'
340
339
  ? {
341
340
  shopId,
342
341
  }
343
342
  : {},
344
343
  venderId !== 'undefined'
345
344
  ? {
346
345
  venderId,
347
346
  }
348
347
  : {},
349
348
  {
350
349
  logEventInfo,
351
350
  },
352
351
  ),
353
352
  );
354
353
  }
355
354
 
356
355
  jdJumpToTabAllProductInner(shopId, venderId, logEventInfo = {}) {
357
356
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId;
358
357
  if (typeof venderId === 'undefined') venderId = global.info.queryInfo.venderId;
359
358
  this.jdNavigateToNative(
360
359
  Object.assign(
361
360
  {},
362
361
  {
363
362
  category: 'jump',
364
363
  des: 'jshopMain',
365
364
  jumpTab: 'allProduct',
366
365
  operation: 'jumpTabInner',
367
366
  },
368
367
  shopId !== 'undefined'
369
368
  ? {
370
369
  shopId,
371
370
  }
372
371
  : {},
373
372
  venderId !== 'undefined'
374
373
  ? {
375
374
  venderId,
376
375
  }
377
376
  : {},
378
377
  {
379
378
  logEventInfo,
380
379
  },
381
380
  ),
382
381
  );
383
382
  }
384
383
 
385
384
  jdJumpToShopBase(shopInfo) {
386
385
  console.log('[降级H5] jdJumpToShopBase jdJumpJdApp');
387
386
  const currentShopInfo = {
388
387
  shopId: global.info.queryInfo.shopId,
389
388
  venderId: global.info.queryInfo.venderId,
390
389
  };
391
390
  const restParams =
392
391
  (shopInfo?.shopId && shopInfo.shopId !== currentShopInfo.shopId) ||
393
392
  (shopInfo?.venderId && shopInfo.venderId !== currentShopInfo.venderId)
394
393
  ? {}
395
394
  : currentShopInfo;
396
395
  const getParam = Object.assign(
397
396
  {},
398
397
  {
399
398
  category: 'jump',
400
399
  des: 'jshopMain',
401
400
  jumpTab: HOME_TOP_TAB_TYPE_APP.HOME,
402
401
  ...restParams,
403
402
  sourceInfo: APP_SOURCE_INFO,
404
403
  },
405
404
  shopInfo,
406
405
  );
407
406
  this.jdNavigateToNative(getParam);
408
407
  }
409
408
 
410
409
  jdJumpToTabNew(shopInfo = {}) {
411
410
  const getParam = Object.assign(
412
411
  {},
413
412
  {
414
413
  jumpTab: HOME_TOP_TAB_TYPE_APP.NEW,
415
414
  },
416
415
  shopInfo,
417
416
  );
418
417
  this.jdJumpToShopBase(getParam);
419
418
  }
420
419
 
421
420
  jdJumpToTabNewInner(shopInfo = {}) {
422
421
  const getParam = Object.assign(
423
422
  {},
424
423
  {
425
424
  jumpTab: HOME_TOP_TAB_TYPE_APP.NEW,
426
425
  operation: 'jumpTabInner',
427
426
  },
428
427
  shopInfo,
429
428
  );
430
429
  this.jdJumpToShopBase(getParam);
431
430
  }
432
431
  jdJumpToTabRank(shopInfo = {}) {
433
432
  const getParam = Object.assign(
434
433
  {},
435
434
  {
436
435
  jumpTab: HOME_TOP_TAB_TYPE_APP.RANK,
437
436
  },
438
437
  shopInfo,
439
438
  );
440
439
  this.jdJumpToShopBase(getParam);
441
440
  }
442
441
  jdJumpToTabRankInner(shopInfo = {}) {
443
442
  const getParam = Object.assign(
444
443
  {},
445
444
  {
446
445
  jumpTab: HOME_TOP_TAB_TYPE_APP.RANK,
447
446
  operation: 'jumpTabInner',
448
447
  },
449
448
  shopInfo,
450
449
  );
451
450
  this.jdJumpToShopBase(getParam);
452
451
  }
453
452
  jdJumpToTabBuyerShow(shopInfo = {}) {
454
453
  const getParam = Object.assign(
455
454
  {},
456
455
  {
457
456
  jumpTab: HOME_TOP_TAB_TYPE_APP.BUYERSHOW,
458
457
  },
459
458
  shopInfo,
460
459
  );
461
460
  this.jdJumpToShopBase(getParam);
462
461
  }
463
462
  jdJumpToTabBuyerShowInner(shopInfo = {}) {
464
463
  const getParam = Object.assign(
465
464
  {},
466
465
  {
467
466
  jumpTab: HOME_TOP_TAB_TYPE_APP.BUYERSHOW,
468
467
  operation: 'jumpTabInner',
469
468
  },
470
469
  shopInfo,
471
470
  );
472
471
  this.jdJumpToShopBase(getParam);
473
472
  }
474
473
  jdJumpToTabActivity(shopInfo = {}) {
475
474
  const getParam = Object.assign(
476
475
  {},
477
476
  {
478
477
  jumpTab: HOME_TOP_TAB_TYPE_APP.ACTIVITY,
479
478
  },
480
479
  shopInfo,
481
480
  );
482
481
  this.jdJumpToShopBase(getParam);
483
482
  }
484
483
  jdJumpToTabActivityInner(shopInfo = {}) {
485
484
  const getParam = Object.assign(
486
485
  {},
487
486
  {
488
487
  jumpTab: HOME_TOP_TAB_TYPE_APP.ACTIVITY,
489
488
  operation: 'jumpTabInner',
490
489
  },
491
490
  shopInfo,
492
491
  );
493
492
  this.jdJumpToShopBase(getParam);
494
493
  }
495
494
  jdJumpToTabSecKill(shopInfo = {}) {
496
495
  const getParam = Object.assign(
497
496
  {},
498
497
  {
499
498
  jumpTab: HOME_TOP_TAB_TYPE_APP.SECKILL,
500
499
  },
501
500
  shopInfo,
502
501
  );
503
502
  this.jdJumpToShopBase(getParam);
504
503
  }
505
504
  jdJumpToTabSecKillInner(shopInfo = {}) {
506
505
  const getParam = Object.assign(
507
506
  {},
508
507
  {
509
508
  jumpTab: HOME_TOP_TAB_TYPE_APP.SECKILL,
510
509
  operation: 'jumpTabInner',
511
510
  },
512
511
  shopInfo,
513
512
  );
514
513
  this.jdJumpToShopBase(getParam);
515
514
  }
516
515
 
517
516
  jdJumpToBottomTabBase(type, shopInfo = {}) {
518
517
  this.jdNavigateToNative(
519
518
  Object.assign(
520
519
  {},
521
520
  {
522
521
  category: 'jump',
523
522
  des: 'jshopMain',
524
523
  shopId: global.info.queryInfo.shopId,
525
524
  venderId: global.info.queryInfo.venderId,
526
525
  jumpBottomTab: type,
527
526
  sourceInfo: APP_SOURCE_INFO,
528
527
  },
529
528
  shopInfo,
530
529
  ),
531
530
  );
532
531
  }
533
532
 
534
533
  jdJumpToBottomTabProduct(shopInfo = {}) {
535
534
  this.jdJumpToBottomTabBase(BOTTOM_TAB_TYPE_APP.PRODUCT, shopInfo);
536
535
  }
537
536
 
538
537
  jdJumpToBottomTabCategory(shopInfo = {}) {
539
538
  this.jdJumpToBottomTabBase(BOTTOM_TAB_TYPE_APP.CATEGORY, shopInfo);
540
539
  }
541
540
 
542
541
  jdJumpToBottomTabFind(shopInfo = {}) {
543
542
  this.jdJumpToBottomTabBase(BOTTOM_TAB_TYPE_APP.FIND, shopInfo);
544
543
  }
545
544
 
546
545
  jdJumpToBottomTabBrandMember(shopInfo = {}) {
547
546
  this.jdJumpToBottomTabBase(BOTTOM_TAB_TYPE_APP.BRANDMEMBER, shopInfo);
548
547
  }
549
548
 
550
549
  jdJumpToBottomTabBrandMemberInner(shopInfo = {}) {
551
550
  this.jdJumpToMemberTab(shopInfo);
552
551
  }
553
552
 
554
553
  jdJumpToWeb(
555
554
  url,
556
555
  logEventInfo,
557
556
  successBack?: functionType | undefined,
558
557
  failBack?: functionType | undefined,
559
558
  ) {
560
559
  const changeUrl = /^\/\//.test(url) ? `https:${url}` : url;
561
560
  this.jdNavigateToNative(
562
561
  {
563
562
  category: 'jump',
564
563
  des: 'm',
565
564
  url: encodeURIComponent(changeUrl),
566
565
  logEventInfo,
567
566
  },
568
567
  OpenAppHost,
569
568
  successBack,
570
569
  failBack,
571
570
  );
572
571
  }
573
572
 
574
573
  jdJumpToLive(clickUrlOrObj, logEventInfo) {
575
574
  if (typeof clickUrlOrObj === 'object') {
576
575
  this.jdNavigateToNative({
577
576
  category: 'jump',
578
577
  des: 'LivePlayerRoom',
579
578
  liveOrigin: '1',
580
579
  needLogin: '0',
581
580
  isNeedVideo: true,
582
581
  logEventInfo,
583
582
  ...clickUrlOrObj,
584
583
  });
585
584
  } else {
586
585
  const getShopLiveParams = this.jdOpenAppParams(clickUrlOrObj);
587
586
  console.log('getShopLiveParams=====', getShopLiveParams);
588
587
  if (typeof getShopLiveParams === 'object') {
589
588
  this.jdNavigateToNative({
590
589
  ...getShopLiveParams,
591
590
  logEventInfo,
592
591
  });
593
592
  }
594
593
  }
595
594
  }
596
595
 
597
596
  jdJumpToUgcContent(urlObj, logEventInfo = {}) {
598
597
  if (typeof urlObj === 'object') {
599
598
  this.jdNavigateToNative({
600
599
  category: 'jump',
601
600
  des: 'shareOrderUgcContent',
602
601
  channel: 'shopshangxin',
603
602
  cmtType: '10',
604
603
  isNeedVideo: true,
605
604
  ...urlObj,
606
605
  logEventInfo,
607
606
  });
608
607
  } else {
609
608
  const getShopUgcParams = this.jdOpenAppParams(urlObj);
610
609
  if (getShopUgcParams) {
611
610
  getShopUgcParams['logEventInfo'] = logEventInfo;
612
611
  console.log('getShopUgcParams=====', getShopUgcParams);
613
612
  getShopUgcParams && this.jdNavigateToNative(getShopUgcParams as string);
614
613
  }
615
614
  }
616
615
  }
617
616
 
618
617
  jdJumpToSeckillNewBrand(brandId) {
619
618
  this.jdNavigateToNative({
620
619
  category: 'jump',
621
620
  des: 'seckillnewbrand',
622
621
  brandId: `${brandId}`,
623
622
  });
624
623
  }
625
624
 
626
625
  jdJumpToJshopDynamicDetail(info) {
627
626
  this.jdNavigateToNative({
628
627
  category: 'jump',
629
628
  des: 'jshopDynamicDetail',
630
629
  shopId: global.info.queryInfo.shopId,
631
630
  venderId: global.info.queryInfo.venderId,
632
631
  ...info,
633
632
  });
634
633
  }
635
634
 
636
635
  jdJumpToRankList(rankingId, rankType, logEventInfo) {
637
636
  this.jdNavigateToNative(
638
637
  Object.assign(
639
638
  {},
640
639
  {
641
640
  category: 'jump',
642
641
  des: 'jdreactcommon',
643
642
  modulename: 'JDReactRankingList',
644
643
  appname: 'JDReactRankingList',
645
644
  transparentenable: true,
646
645
  ishidden: true,
647
646
  param: {
648
647
  contentId: '' + rankingId,
649
648
  fromSkuId: '',
650
649
  detailPageType: '5',
651
650
  rankType: rankType || 10 + '',
652
651
  },
653
652
  logEventInfo,
654
653
  },
655
654
  ),
656
655
  );
657
656
  }
658
657
 
659
658
  jdJumpToFlashSaleTab(logEventInfo) {
660
659
  this.jdNavigateToNative(
661
660
  Object.assign(
662
661
  {},
663
662
  {
664
663
  category: 'jump',
665
664
  des: 'jshopMain',
666
665
  jumpTab: 'flashPurchase',
667
666
  shopId: global.info.queryInfo.shopId,
668
667
  venderId: global.info.queryInfo.venderId,
669
668
  sourceType: 'JDReactShopActivityTAB',
670
669
  sourceValue: '2',
671
670
  operation: 'jumpTabInner',
672
671
  logEventInfo,
673
672
  },
674
673
  ),
675
674
  );
676
675
  }
677
676
 
678
677
 
679
678
  jdJumpToShopMemberInfo(logEventInfo) {
680
679
  this.jdNavigateToNative(
681
680
  Object.assign(
682
681
  {},
683
682
  {
684
683
  category: 'jump',
685
684
  des: 'jdreactcommon',
686
685
  modulename: 'JDReactShopMember',
687
686
  appname: 'JDReactShopMember',
688
687
  ishidden: true,
689
688
  param: {
690
689
  page: 'memberInfo',
691
690
  shopId: global.info.queryInfo.shopId,
692
691
  venderId: global.info.queryInfo.venderId,
693
692
  },
694
693
  logEventInfo,
695
694
  },
696
695
  ),
697
696
  );
698
697
  }
699
698
 
700
699
  jdJumpToShopMemberBenefit(logEventInfo) {
701
700
  const venderId = global.info.queryInfo.venderId;
702
701
  const shopId = global.info.queryInfo.shopId;
703
702
  this.jdJumpToWeb(
704
703
  `${this.jumpWebUrl.memberBenefit}?venderId=${venderId}&shopId=${shopId}`,
705
704
  logEventInfo,
706
705
  );
707
706
  }
708
707
 
709
708
  jdJumpToShopMemberPointExchange(venderType, levelZeroMenuUrl, logEventInfo) {
710
709
  this.jdNavigateToNative(
711
710
  Object.assign(
712
711
  {},
713
712
  {
714
713
  category: 'jump',
715
714
  des: 'jdreactcommon',
716
715
  modulename: 'JDReactShopMember',
717
716
  appname: 'JDReactShopMember',
718
717
  ishidden: true,
719
718
  param: {
720
719
  page: 'pointsExchangePage',
721
720
  shopId: global.info.queryInfo.shopId,
722
721
  venderId: global.info.queryInfo.venderId,
723
722
  levelZeroMenuUrl,
724
723
  },
725
724
  logEventInfo,
726
725
  },
727
726
  ),
728
727
  );
729
728
  }
730
729
 
731
730
  jdJumpToShopMemberBonusPurchase(customerLevel, logEventInfo) {
732
731
  this.jdNavigateToNative(
733
732
  Object.assign(
734
733
  {},
735
734
  {
736
735
  category: 'jump',
737
736
  des: 'jdreactcommon',
738
737
  modulename: 'JDReactShopMember',
739
738
  appname: 'JDReactShopMember',
740
739
  ishidden: true,
741
740
  param: {
742
741
  page: 'bonusPurchase',
743
742
  shopId: global.info.queryInfo.shopId,
744
743
  venderId: global.info.queryInfo.venderId,
745
744
  customerLevel,
746
745
  },
747
746
  logEventInfo,
748
747
  },
749
748
  ),
750
749
  );
751
750
  }
752
751
 
753
752
  jdJumpToMyRedEnvelope(logEventInfo) {
754
753
  this.jdNavigateToNative(
755
754
  Object.assign(
756
755
  {},
757
756
  {
758
757
  category: 'jump',
759
758
  des: 'jdreactcommon',
760
759
  modulename: 'JDReactMyRedEnvelope',
761
760
  appname: 'JDReactMyRedEnvelope',
762
761
  ishidden: true,
763
762
  fromName: 2,
764
763
  needLogin: true,
765
764
  logEventInfo,
766
765
  },
767
766
  ),
768
767
  );
769
768
  }
770
769
 
771
770
  jdJumpToMyCoupon(logEventInfo) {
772
771
  this.jdNavigateToNative(
773
772
  Object.assign(
774
773
  {},
775
774
  {
776
775
  category: 'jump',
777
776
  des: 'mycoupon',
778
777
  logEventInfo,
779
778
  },
780
779
  ),
781
780
  );
782
781
  }
783
782
 
784
783
 
785
784
  jdJumpToMiniProgram({ vapptype, appId, path, param }) {
786
785
  const pageName = param['pageType'] || 'home';
787
786
  const nowMiniPath = `pages/${pageName}/index`;
788
787
  if (appId === global.info.pageInfo.appId) {
789
788
  Taro.navigateTo({
790
789
  url: `/${nowMiniPath}?${objectToUrlEncode(param)}`,
791
790
  }).catch((err) => {
792
791
  console.warn('跳转小程序页面错误:', err);
793
792
  });
794
793
  } else {
795
794
  const params = {
796
795
  category: 'jump',
797
796
  des: 'jdmp',
798
797
  appId,
799
798
  vapptype,
800
799
  param,
801
800
  path: '',
802
801
  };
803
802
  if (path) {
804
803
  params.path = `${path}.html`;
805
804
  }
806
805
  this.jdNavigateToNative(params);
807
806
  }
808
807
  }
809
808
 
810
809
  jdJumpToAppMiniProgram(
811
810
  path: string,
812
811
  param = {},
813
812
  successBack?: functionType,
814
813
  failBack?: functionType,
815
814
  ) {
816
815
  this.jdNavigateToNative(param, path, successBack, failBack);
817
816
  }
818
817
 
819
818
  jdNavigateToNative(
820
819
  params: object,
821
820
  url = OpenAppHost,
822
821
  successBack?: functionType | undefined,
823
822
  failBack?: functionType | undefined,
824
823
  ) {
825
824
  console.log('[降级H5] jdNavigateToNative jdJumJdApp:', params);
826
825
  const getResParams: JumpEventReportInterFace.JdMiniJumpParams = Object.assign(
827
826
  {},
828
827
  {
829
828
  sourceValue: 'sourceValue_jshopMini',
830
829
  sourceType: 'sourceType_jshopMini',
831
830
  param: {},
832
831
  },
833
832
  params,
834
833
  );
835
834
  const { logEventInfo, ...otherParams } = getResParams;
836
835
  console.log('jdNavigateToNative params: ', getResParams);
837
836
  console.log('logEventInfo params: ', logEventInfo);
838
837
  this.clickEventLog(logEventInfo || getResParams, getResParams.des);
839
838
  jd.navigateToNative({
840
839
  dataParam: {
841
840
  url: url,
842
841
  params: otherParams,
843
842
  },
844
843
  success(res) {
845
844
  typeof successBack === 'function' && successBack(res);
846
845
  console.log('navigateToNative.success', res);
847
846
  },
848
847
  fail(res) {
849
848
  typeof failBack === 'function' && failBack(res);
850
849
  console.log('navigateToNative.fail', res);
851
850
  },
852
851
  });
853
852
  }
854
853
 
855
854
  clickEventLog(opts: JumpEventReportInterFace.OptEventLogParams = {}, clickKey = 'click') {
856
855
  const { eventId, jsonParam, eventLevel = 3, skuId, ...otherParams } = opts;
857
856
  if (eventId && jsonParam) {
858
857
  const { etModelInfo, logBaseInfo } = jsonParam;
859
858
  let getJsonParam = {};
860
859
  if (etModelInfo && logBaseInfo) {
861
860
  getJsonParam = logBaseInfo;
862
861
  } else {
863
862
  if (Array.isArray(jsonParam)) {
864
863
  getJsonParam = jsonParam;
865
864
  } else {
866
865
  getJsonParam = Object.assign(
867
866
  {},
868
867
  {
869
868
  shopid: global.info.queryInfo?.shopId,
870
869
  },
871
870
  jsonParam,
872
871
  );
873
872
  }
874
873
  }
875
874
  if (
876
875
  clickKey === 'exposure' &&
877
876
  /^TerminatorNew/.test(eventId) &&
878
877
  !Array.isArray(getJsonParam)
879
878
  ) {
880
879
  getJsonParam = [getJsonParam];
881
880
  }
882
881
  const miniLogParams = {
883
882
  eid: eventId,
884
883
  elevel: eventLevel,
885
884
  eparam: JSON.stringify(getJsonParam),
886
885
  pageId: this.logPageId,
887
886
  pname: this.logPname,
888
887
  pparam: JSON.stringify(this.routerInfo.params),
889
888
  target: this.routerInfo.path,
890
889
  event: this.nativeEvent,
891
890
  ...otherParams,
892
891
  };
893
892
  if (clickKey === 'addToCart' && skuId) {
894
893
  miniLogParams['shoppingList'] = {
895
894
  [skuId]: 1,
896
895
  };
897
896
  }
898
897
  console.log('点击埋点参数对象', miniLogParams, clickKey);
899
898
  global.miniAppLogInstance && global.miniAppLogInstance[clickKey](miniLogParams);
900
899
  } else {
901
900
  console.log('暂无埋点参数eventId和eventParam');
902
901
  }
903
902
  }
904
903
 
905
904
  exposureEventLog(opts: JumpEventReportInterFace.OptEventLogParams = {}) {
906
905
  return this.clickEventLog(opts, 'exposure');
907
906
  }
908
907
 
909
908
  jdJumpToSearch(shopId, suggestWord) {
910
909
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId;
911
910
  this.jdNavigateToNative({
912
911
  category: 'jump',
913
912
  des: 'jshopGuessWord',
914
913
  shopId: String(shopId),
915
914
  transparentEnable: true,
916
915
  suggestWord,
917
916
  sourceInfo: APP_SOURCE_INFO,
918
917
  });
919
918
  }
920
919
 
921
920
  jdJumpToMyMessageBox() {
922
921
  this.jdNavigateToNative({
923
922
  category: 'jump',
924
923
  des: 'myMessageBox',
925
924
  });
926
925
  }
927
926
 
928
927
  jdJumpToAppHome() {
929
928
  this.jdNavigateToNative({
930
929
  category: 'jump',
931
930
  des: 'HomePage',
932
931
  });
933
932
  }
934
933
 
935
934
  jdJumpToShopHomeDetail({ shopId, venderId }) {
936
935
  this.jdNavigateToNative({
937
936
  category: 'jump',
938
937
  des: 'jshopDetail',
939
938
  shopId: String(shopId),
940
939
  venderId: String(venderId),
941
940
  });
942
941
  }
943
942
 
944
943
  jdJumpToShopLottery(shopTotalInfo) {
945
944
  this.jdNavigateToNative(
946
945
  Object.assign(
947
946
  {},
948
947
  {
949
948
  category: 'jump',
950
949
  des: 'jshopSign',
951
950
  activityRuleType: '0',
952
951
  shopId: global.info.queryInfo.shopId,
953
952
  venderId: global.info.queryInfo.venderId,
954
953
  },
955
954
  shopTotalInfo,
956
955
  ),
957
956
  );
958
957
  }
959
958
 
960
959
  jdJumpToSageAuthorHome(shopTotalInfo) {
961
960
  this.jdNavigateToNative(
962
961
  Object.assign(
963
962
  {},
964
963
  {
965
964
  category: 'jump',
966
965
  des: 'faxian_author',
967
966
  channel: 'shopHomePage',
968
967
  selectTab: '0',
969
968
  },
970
969
  shopTotalInfo,
971
970
  ),
972
971
  );
973
972
  }
973
+ import Taro from '@tarojs/taro';
974
974
  entrance: 'shop-page-tab',
975
975
  moduleId: 'shop-modular-floor',
976
976
 
977
977
  jdJumpToProduct(skuIds, logEventInfo, otherParams = {}) {
978
978
  skuIds = skuIds.toString().trim();
979
979
  const getSkuId = skuIds.indexOf(',') !== -1 ? skuIds.split(',')[0] : skuIds;
980
980
  const openAppParam = {
981
981
  category: 'jump',
982
982
  des: 'productDetail',
983
983
  skuId: getSkuId,
984
984
  logEventInfo,
985
985
  ...otherParams,
986
986
  };
987
987
  const adInfos = getAdInfoBySkuId(getSkuId);
988
988
  if (adInfos) {
989
989
  openAppParam.pdExtFlag = {
990
990
  adInfos,
991
991
  };
992
992
  }
993
993
  this.jdNavigateToNative(openAppParam);
994
994
  }
995
995
 
996
996
  jdJumpSkuInfoToProduct(skuInfo: any = {}, logEventInfo) {
997
997
  const getSkuId = skuInfo?.skuId;
998
998
  this.jdJumpToProduct(getSkuId, logEventInfo);
999
999
  }
1000
1000
 
1001
1001
  jdJumpToShopCategory(shopInfo = {}) {
1002
1002
  console.log(
1003
1003
  '🚀 ~ file: jdJumpJdApp.ts:40 ~ JdJumpJdApp ~ jdJumpToShopCategory ~ shopInfo:',
1004
1004
  shopInfo,
1005
1005
  );
1006
1006
  console.log('[降级H5] jdJumpToShopCategory jdJumpJdApp');
1007
1007
  this.jdNavigateToNative(
1008
1008
  Object.assign(
1009
1009
  {},
1010
1010
  {
1011
1011
  category: 'jump',
1012
1012
  des: 'jshopMain',
1013
1013
  jumpBottomTab: 'category',
1014
1014
  },
1015
1015
  shopInfo,
1016
1016
  {
1017
1017
  shopId: String(shopInfo.shopId ?? ''),
1018
1018
  venderId: String(shopInfo.venderId ?? ''),
1019
1019
  },
1020
1020
  ),
1021
1021
  );
1022
1022
  }
1023
1023
 
1024
1024
  jdJumpToOrderInfoView(wareId, wareNum = 1, logEventInfo) {
1025
1025
  this.jdNavigateToNative({
1026
1026
  category: 'jump',
1027
1027
  des: 'orderInfoView',
1028
1028
  wareId: `${wareId}`,
1029
1029
  wareNum: global.info.sysInfo.isIOS ? `${wareNum}` : wareNum,
1030
1030
  skuSource: 25,
1031
1031
  sourceType: 6,
1032
1032
  extFlag: '{}',
1033
1033
  logEventInfo,
1034
1034
  });
1035
1035
  }
1036
1036
 
1037
1037
  jdJumpToTryDetail(tryId) {
1038
1038
  this.jdNavigateToNative({
1039
1039
  category: 'jump',
1040
1040
  des: 'jdreactcommon',
1041
1041
  appname: 'JDReactNewProduct',
1042
1042
  modulename: 'JDReactNewProduct',
1043
1043
  param: {
1044
1044
  activityId: tryId,
1045
1045
  isNative: true,
1046
1046
  nativePage: 'jdtry_detail',
1047
1047
  transparentenable: true,
1048
1048
  },
1049
1049
  });
1050
1050
  }
1051
1051
 
1052
1052
  jdJumpToShopHome(shopInfo: JumpEventReportInterFace.ShopIdsInfo = {}) {
1053
1053
  console.log('[降级H5] jdJumpToShopHome jdJumpJdApp');
1054
1054
  const currentShopInfo = {
1055
1055
  shopId: global.info.queryInfo.shopId,
1056
1056
  venderId: global.info.queryInfo.venderId,
1057
1057
  };
1058
1058
  const restParams =
1059
1059
  (shopInfo?.shopId && shopInfo.shopId !== currentShopInfo.shopId) ||
1060
1060
  (shopInfo?.venderId && shopInfo.venderId !== currentShopInfo.venderId)
1061
1061
  ? {}
1062
1062
  : currentShopInfo;
1063
1063
  const getInfo = Object.assign({}, restParams, shopInfo);
1064
1064
  const getShopParams = this.getShopIdsInfo(getInfo);
1065
1065
  this.jdJumpToShopBase(getShopParams);
1066
1066
  }
1067
1067
 
1068
1068
  jdJumpToShopHomeInner(shopInfo: JumpEventReportInterFace.ShopIdsInfo = {}) {
1069
1069
  const getParam = Object.assign(
1070
1070
  {},
1071
1071
  {
1072
1072
  jumpTab: HOME_TOP_TAB_TYPE_APP.HOME,
1073
1073
  operation: 'jumpTabInner',
1074
1074
  },
1075
1075
  shopInfo,
1076
1076
  );
1077
1077
  this.jdJumpToShopBase(getParam);
1078
1078
  }
1079
1079
 
1080
1080
  jdJumpToUnifieddetail(sourceInfo) {
1081
1081
  this.jdNavigateToNative(
1082
1082
  Object.assign(
1083
1083
  {},
1084
1084
  {
1085
1085
  category: 'jump',
1086
1086
  des: 'unifieddetail',
1087
1087
  },
1088
1088
  sourceInfo,
1089
1089
  ),
1090
1090
  );
1091
1091
  }
1092
1092
 
1093
1093
  jdJumpToVideoImmersion(sourceInfo) {
1094
1094
  this.jdNavigateToNative(
1095
1095
  Object.assign(
1096
1096
  {},
1097
1097
  {
1098
1098
  category: 'jump',
1099
1099
  des: 'VideoImmersion',
1100
1100
  },
1101
1101
  sourceInfo,
1102
1102
  ),
1103
1103
  );
1104
1104
  }
1105
1105
 
1106
1106
  jdJumpToShopMember(shopInfo) {
1107
1107
  this.jdNavigateToNative(
1108
1108
  Object.assign(
1109
1109
  {},
1110
1110
  {
1111
1111
  category: 'jump',
1112
1112
  des: 'jshopMember',
1113
1113
  followAward: '-1',
1114
1114
  },
1115
1115
  shopInfo,
1116
1116
  ),
1117
1117
  );
1118
1118
  }
1119
1119
 
1120
1120
  jdJumpToMemberTab(shopInfo?) {
1121
1121
  this.jdNavigateToNative(
1122
1122
  Object.assign(
1123
1123
  {},
1124
1124
  {
1125
1125
  category: 'jump',
1126
1126
  des: 'jshopMain',
1127
1127
  shopId: global.info.queryInfo.shopId,
1128
1128
  venderId: global.info.queryInfo.venderId,
1129
1129
  operation: 'jumpBottomTabMember',
1130
1130
  sourceInfo: APP_SOURCE_INFO,
1131
1131
  },
1132
1132
  shopInfo,
1133
1133
  ),
1134
1134
  );
1135
1135
  }
1136
1136
 
1137
1137
  jdJumpToDongDongChatGroup(groupId, source = 'jdmini') {
1138
1138
  this.jdNavigateToNative({
1139
1139
  category: 'jump',
1140
1140
  des: 'dongdong_group_chat',
1141
1141
  source: source,
1142
1142
  groupId: `${groupId}`,
1143
1143
  });
1144
1144
  }
1145
1145
 
1146
1146
  jdJumpToDongDongChat(paramInfo: any = {}) {
1147
1147
  const { venderId, ...otherParams } = paramInfo;
1148
1148
  this.jdNavigateToNative(
1149
1149
  Object.assign(
1150
1150
  {},
1151
1151
  {
1152
1152
  category: 'jump',
1153
1153
  des: 'jd_dongdong_chat',
1154
1154
  venderId: `${venderId ? venderId : global.info.queryInfo?.venderId}`,
1155
1155
  entry: 'm_shop',
1156
1156
  },
1157
1157
  otherParams,
1158
1158
  ),
1159
1159
  );
1160
1160
  }
1161
1161
 
1162
1162
  jdJumpToShopActivity(shopInfo) {
1163
1163
  const getParams = Object.assign(
1164
1164
  {},
1165
1165
  {
1166
1166
  category: 'jump',
1167
1167
  des: 'jshopActivity',
1168
1168
  shopId: global.info.queryInfo.shopId,
1169
1169
  venderId: global.info.queryInfo.venderId,
1170
1170
  },
1171
1171
  shopInfo,
1172
1172
  );
1173
1173
  getParams['projectId'] && (getParams['projectId'] = `${getParams['projectId']}`);
1174
1174
  this.jdNavigateToNative(getParams);
1175
1175
  }
1176
1176
 
1177
1177
  jdJumpToShopActivityPage(shopInfo) {
1178
1178
  this.jdNavigateToNative(
1179
1179
  Object.assign(
1180
1180
  {},
1181
1181
  {
1182
1182
  category: 'jump',
1183
1183
  des: 'jshopActivityPage',
1184
1184
  shopId: global.info.queryInfo.shopId,
1185
1185
  title: global.info.queryInfo?.shopName,
1186
1186
  },
1187
1187
  shopInfo,
1188
1188
  ),
1189
1189
  );
1190
1190
  }
1191
1191
 
1192
1192
  jdJumpToShopDetail(shopInfo) {
1193
1193
  this.jdNavigateToNative(
1194
1194
  Object.assign(
1195
1195
  {},
1196
1196
  {
1197
1197
  category: 'jump',
1198
1198
  des: 'jshopDetail',
1199
1199
  shopId: global.info.queryInfo.shopId,
1200
1200
  venderId: global.info.queryInfo.venderId,
1201
1201
  sourceInfo: APP_SOURCE_INFO,
1202
1202
  },
1203
1203
  shopInfo,
1204
1204
  ),
1205
1205
  );
1206
1206
  }
1207
1207
 
1208
1208
  jdJumpToShopMemberCard(shopInfo) {
1209
1209
  const { url, logEventInfo } = shopInfo;
1210
1210
  if (this.isOpenJdAppUrl(url)) {
1211
1211
  const getOpenAppParams = this.jdOpenAppParams(url);
1212
1212
  console.log('jd web 获取自定义openApp链接解析后的参数结果', getOpenAppParams);
1213
1213
  if (getOpenAppParams) {
1214
1214
  this.jdNavigateToNative(Object.assign({}, getOpenAppParams, { logEventInfo }));
1215
1215
  }
1216
1216
  } else {
1217
1217
  super.jdJumpToWeb(url, {
1218
1218
  ...logEventInfo,
1219
1219
  });
1220
1220
  }
1221
1221
  }
1222
1222
 
1223
1223
  jdJumpToTotalPromotion(shopInfo) {
1224
1224
  const { url, logEventInfo } = shopInfo;
1225
1225
  if (this.isOpenJdAppUrl(url)) {
1226
1226
  const getOpenAppParams = this.jdOpenAppParams(url);
1227
1227
  console.log('jd web 获取自定义openApp链接解析后的参数结果', getOpenAppParams);
1228
1228
  if (getOpenAppParams) {
1229
1229
  this.jdNavigateToNative(Object.assign({}, getOpenAppParams, { logEventInfo }));
1230
1230
  }
1231
1231
  } else {
1232
1232
  super.jdJumpToWeb(url, {
1233
1233
  ...logEventInfo,
1234
1234
  });
1235
1235
  }
1236
1236
  }
1237
1237
 
1238
1238
  jdJumpToShopSearch(pageInfo = {}) {
1239
1239
  const getInfo = Object.assign(
1240
1240
  {},
1241
1241
  {
1242
1242
  shopId: global.info.queryInfo.shopId,
1243
1243
  venderId: global.info.queryInfo.venderId,
1244
1244
  sourceInfo: APP_SOURCE_INFO,
1245
1245
  },
1246
1246
  pageInfo,
1247
1247
  );
1248
1248
  const { keyword = '', categoryId = '', ...otherPageInfo }: any = getInfo;
1249
1249
  const searchInfo = {};
1250
1250
  if (categoryId !== '') {
1251
1251
  searchInfo['categoryId'] = typeof categoryId === 'string' ? categoryId?.trim() : categoryId;
1252
1252
  searchInfo['searchType'] = '5';
1253
1253
  } else if (keyword !== '') {
1254
1254
  searchInfo['keyWord'] = keyword;
1255
1255
  searchInfo['searchType'] = '4';
1256
1256
  }
1257
1257
  const openAppParam = {
1258
1258
  category: 'jump',
1259
1259
  des: 'jshopProductList',
1260
1260
  pageId: '1',
1261
1261
  ...searchInfo,
1262
1262
  };
1263
1263
  const jumpExtMap = getEnterShopExtInfo();
1264
1264
  if (jumpExtMap) {
1265
1265
  openAppParam.jumpExtMap = jumpExtMap;
1266
1266
  }
1267
1267
  this.jdNavigateToNative(Object.assign({}, openAppParam, otherPageInfo));
1268
1268
  }
1269
1269
 
1270
1270
  jdJumpToOrderList(logEventInfo = {}) {
1271
1271
  this.jdNavigateToNative(
1272
1272
  Object.assign(
1273
1273
  {},
1274
1274
  {
1275
1275
  category: 'jump',
1276
1276
  des: 'orderlist',
1277
1277
  from: 'dphycc',
1278
1278
  },
1279
1279
  logEventInfo,
1280
1280
  ),
1281
1281
  );
1282
1282
  }
1283
1283
 
1284
1284
  jdJumpToCouponSearchProductList(couponId, logEventInfo = {}) {
1285
1285
  this.jdNavigateToNative(
1286
1286
  Object.assign(
1287
1287
  {},
1288
1288
  {
1289
1289
  category: 'jump',
1290
1290
  des: 'productList',
1291
1291
  from: 'couponBatch',
1292
1292
  couponId: `${couponId}`,
1293
1293
  logEventInfo,
1294
1294
  },
1295
1295
  ),
1296
1296
  );
1297
1297
  }
1298
1298
 
1299
1299
  jdJumpToTabAllProduct(shopId, venderId, logEventInfo = {}) {
1300
1300
  console.log('jdJumpJdApp - jdJumpToTabAllProduct');
1301
1301
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId;
1302
1302
  if (typeof venderId === 'undefined') venderId = global.info.queryInfo.venderId;
1303
1303
  this.jdNavigateToNative(
1304
1304
  Object.assign(
1305
1305
  {},
1306
1306
  {
1307
1307
  category: 'jump',
1308
1308
  des: 'jshopMain',
1309
1309
  jumpTab: 'allProduct',
1310
1310
  },
1311
1311
  shopId !== 'undefined'
1312
1312
  ? {
1313
1313
  shopId,
1314
1314
  }
1315
1315
  : {},
1316
1316
  venderId !== 'undefined'
1317
1317
  ? {
1318
1318
  venderId,
1319
1319
  }
1320
1320
  : {},
1321
1321
  {
1322
1322
  logEventInfo,
1323
1323
  },
1324
1324
  ),
1325
1325
  );
1326
1326
  }
1327
1327
 
1328
1328
  jdJumpToTabAllProductInner(shopId, venderId, logEventInfo = {}) {
1329
1329
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId;
1330
1330
  if (typeof venderId === 'undefined') venderId = global.info.queryInfo.venderId;
1331
1331
  this.jdNavigateToNative(
1332
1332
  Object.assign(
1333
1333
  {},
1334
1334
  {
1335
1335
  category: 'jump',
1336
1336
  des: 'jshopMain',
1337
1337
  jumpTab: 'allProduct',
1338
1338
  operation: 'jumpTabInner',
1339
1339
  },
1340
1340
  shopId !== 'undefined'
1341
1341
  ? {
1342
1342
  shopId,
1343
1343
  }
1344
1344
  : {},
1345
1345
  venderId !== 'undefined'
1346
1346
  ? {
1347
1347
  venderId,
1348
1348
  }
1349
1349
  : {},
1350
1350
  {
1351
1351
  logEventInfo,
1352
1352
  },
1353
1353
  ),
1354
1354
  );
1355
1355
  }
1356
1356
 
1357
1357
  jdJumpToShopBase(shopInfo) {
1358
1358
  console.log('[降级H5] jdJumpToShopBase jdJumpJdApp');
1359
1359
  const currentShopInfo = {
1360
1360
  shopId: global.info.queryInfo.shopId,
1361
1361
  venderId: global.info.queryInfo.venderId,
1362
1362
  };
1363
1363
  const restParams =
1364
1364
  (shopInfo?.shopId && shopInfo.shopId !== currentShopInfo.shopId) ||
1365
1365
  (shopInfo?.venderId && shopInfo.venderId !== currentShopInfo.venderId)
1366
1366
  ? {}
1367
1367
  : currentShopInfo;
1368
1368
  const getParam = Object.assign(
1369
1369
  {},
1370
1370
  {
1371
1371
  category: 'jump',
1372
1372
  des: 'jshopMain',
1373
1373
  jumpTab: HOME_TOP_TAB_TYPE_APP.HOME,
1374
1374
  ...restParams,
1375
1375
  sourceInfo: APP_SOURCE_INFO,
1376
1376
  },
1377
1377
  shopInfo,
1378
1378
  );
1379
1379
  this.jdNavigateToNative(getParam);
1380
1380
  }
1381
1381
 
1382
1382
  jdJumpToTabNew(shopInfo = {}) {
1383
1383
  const getParam = Object.assign(
1384
1384
  {},
1385
1385
  {
1386
1386
  jumpTab: HOME_TOP_TAB_TYPE_APP.NEW,
1387
1387
  },
1388
1388
  shopInfo,
1389
1389
  );
1390
1390
  this.jdJumpToShopBase(getParam);
1391
1391
  }
1392
1392
 
1393
1393
  jdJumpToTabNewInner(shopInfo = {}) {
1394
1394
  const getParam = Object.assign(
1395
1395
  {},
1396
1396
  {
1397
1397
  jumpTab: HOME_TOP_TAB_TYPE_APP.NEW,
1398
1398
  operation: 'jumpTabInner',
1399
1399
  },
1400
1400
  shopInfo,
1401
1401
  );
1402
1402
  this.jdJumpToShopBase(getParam);
1403
1403
  }
1404
1404
  jdJumpToTabRank(shopInfo = {}) {
1405
1405
  const getParam = Object.assign(
1406
1406
  {},
1407
1407
  {
1408
1408
  jumpTab: HOME_TOP_TAB_TYPE_APP.RANK,
1409
1409
  },
1410
1410
  shopInfo,
1411
1411
  );
1412
1412
  this.jdJumpToShopBase(getParam);
1413
1413
  }
1414
1414
  jdJumpToTabRankInner(shopInfo = {}) {
1415
1415
  const getParam = Object.assign(
1416
1416
  {},
1417
1417
  {
1418
1418
  jumpTab: HOME_TOP_TAB_TYPE_APP.RANK,
1419
1419
  operation: 'jumpTabInner',
1420
1420
  },
1421
1421
  shopInfo,
1422
1422
  );
1423
1423
  this.jdJumpToShopBase(getParam);
1424
1424
  }
1425
1425
  jdJumpToTabBuyerShow(shopInfo = {}) {
1426
1426
  const getParam = Object.assign(
1427
1427
  {},
1428
1428
  {
1429
1429
  jumpTab: HOME_TOP_TAB_TYPE_APP.BUYERSHOW,
1430
1430
  },
1431
1431
  shopInfo,
1432
1432
  );
1433
1433
  this.jdJumpToShopBase(getParam);
1434
1434
  }
1435
1435
  jdJumpToTabBuyerShowInner(shopInfo = {}) {
1436
1436
  const getParam = Object.assign(
1437
1437
  {},
1438
1438
  {
1439
1439
  jumpTab: HOME_TOP_TAB_TYPE_APP.BUYERSHOW,
1440
1440
  operation: 'jumpTabInner',
1441
1441
  },
1442
1442
  shopInfo,
1443
1443
  );
1444
1444
  this.jdJumpToShopBase(getParam);
1445
1445
  }
1446
1446
  jdJumpToTabActivity(shopInfo = {}) {
1447
1447
  const getParam = Object.assign(
1448
1448
  {},
1449
1449
  {
1450
1450
  jumpTab: HOME_TOP_TAB_TYPE_APP.ACTIVITY,
1451
1451
  },
1452
1452
  shopInfo,
1453
1453
  );
1454
1454
  this.jdJumpToShopBase(getParam);
1455
1455
  }
1456
1456
  jdJumpToTabActivityInner(shopInfo = {}) {
1457
1457
  const getParam = Object.assign(
1458
1458
  {},
1459
1459
  {
1460
1460
  jumpTab: HOME_TOP_TAB_TYPE_APP.ACTIVITY,
1461
1461
  operation: 'jumpTabInner',
1462
1462
  },
1463
1463
  shopInfo,
1464
1464
  );
1465
1465
  this.jdJumpToShopBase(getParam);
1466
1466
  }
1467
1467
  jdJumpToTabSecKill(shopInfo = {}) {
1468
1468
  const getParam = Object.assign(
1469
1469
  {},
1470
1470
  {
1471
1471
  jumpTab: HOME_TOP_TAB_TYPE_APP.SECKILL,
1472
1472
  },
1473
1473
  shopInfo,
1474
1474
  );
1475
1475
  this.jdJumpToShopBase(getParam);
1476
1476
  }
1477
1477
  jdJumpToTabSecKillInner(shopInfo = {}) {
1478
1478
  const getParam = Object.assign(
1479
1479
  {},
1480
1480
  {
1481
1481
  jumpTab: HOME_TOP_TAB_TYPE_APP.SECKILL,
1482
1482
  operation: 'jumpTabInner',
1483
1483
  },
1484
1484
  shopInfo,
1485
1485
  );
1486
1486
  this.jdJumpToShopBase(getParam);
1487
1487
  }
1488
1488
 
1489
1489
  jdJumpToBottomTabBase(type, shopInfo = {}) {
1490
1490
  this.jdNavigateToNative(
1491
1491
  Object.assign(
1492
1492
  {},
1493
1493
  {
1494
1494
  category: 'jump',
1495
1495
  des: 'jshopMain',
1496
1496
  shopId: global.info.queryInfo.shopId,
1497
1497
  venderId: global.info.queryInfo.venderId,
1498
1498
  jumpBottomTab: type,
1499
1499
  sourceInfo: APP_SOURCE_INFO,
1500
1500
  },
1501
1501
  shopInfo,
1502
1502
  ),
1503
1503
  );
1504
1504
  }
1505
1505
 
1506
1506
  jdJumpToBottomTabProduct(shopInfo = {}) {
1507
1507
  this.jdJumpToBottomTabBase(BOTTOM_TAB_TYPE_APP.PRODUCT, shopInfo);
1508
1508
  }
1509
1509
 
1510
1510
  jdJumpToBottomTabCategory(shopInfo = {}) {
1511
1511
  this.jdJumpToBottomTabBase(BOTTOM_TAB_TYPE_APP.CATEGORY, shopInfo);
1512
1512
  }
1513
1513
 
1514
1514
  jdJumpToBottomTabFind(shopInfo = {}) {
1515
1515
  this.jdJumpToBottomTabBase(BOTTOM_TAB_TYPE_APP.FIND, shopInfo);
1516
1516
  }
1517
1517
 
1518
1518
  jdJumpToBottomTabBrandMember(shopInfo = {}) {
1519
1519
  this.jdJumpToBottomTabBase(BOTTOM_TAB_TYPE_APP.BRANDMEMBER, shopInfo);
1520
1520
  }
1521
1521
 
1522
1522
  jdJumpToBottomTabBrandMemberInner(shopInfo = {}) {
1523
1523
  this.jdJumpToMemberTab(shopInfo);
1524
1524
  }
1525
1525
 
1526
1526
  jdJumpToWeb(
1527
1527
  url,
1528
1528
  logEventInfo,
1529
1529
  successBack?: functionType | undefined,
1530
1530
  failBack?: functionType | undefined,
1531
1531
  ) {
1532
1532
  const changeUrl = /^\/\//.test(url) ? `https:${url}` : url;
1533
1533
  this.jdNavigateToNative(
1534
1534
  {
1535
1535
  category: 'jump',
1536
1536
  des: 'm',
1537
1537
  url: isJdAndHarmonyDevice? changeUrl: encodeURIComponent(changeUrl),
1538
1538
  logEventInfo,
1539
1539
  },
1540
1540
  OpenAppHost,
1541
1541
  successBack,
1542
1542
  failBack,
1543
1543
  );
1544
1544
  }
1545
1545
 
1546
1546
  jdJumpToLive(clickUrlOrObj, logEventInfo) {
1547
1547
  if (typeof clickUrlOrObj === 'object') {
1548
1548
  this.jdNavigateToNative({
1549
1549
  category: 'jump',
1550
1550
  des: 'LivePlayerRoom',
1551
1551
  liveOrigin: '1',
1552
1552
  needLogin: '0',
1553
1553
  isNeedVideo: true,
1554
1554
  logEventInfo,
1555
1555
  ...clickUrlOrObj,
1556
1556
  });
1557
1557
  } else {
1558
1558
  const getShopLiveParams = this.jdOpenAppParams(clickUrlOrObj);
1559
1559
  console.log('getShopLiveParams=====', getShopLiveParams);
1560
1560
  if (typeof getShopLiveParams === 'object') {
1561
1561
  this.jdNavigateToNative({
1562
1562
  ...getShopLiveParams,
1563
1563
  logEventInfo,
1564
1564
  });
1565
1565
  }
1566
1566
  }
1567
1567
  }
1568
1568
 
1569
1569
  jdJumpToUgcContent(urlObj, logEventInfo = {}) {
1570
1570
  if (typeof urlObj === 'object') {
1571
1571
  this.jdNavigateToNative({
1572
1572
  category: 'jump',
1573
1573
  des: 'shareOrderUgcContent',
1574
1574
  channel: 'shopshangxin',
1575
1575
  cmtType: '10',
1576
1576
  isNeedVideo: true,
1577
1577
  ...urlObj,
1578
1578
  logEventInfo,
1579
1579
  });
1580
1580
  } else {
1581
1581
  const getShopUgcParams = this.jdOpenAppParams(urlObj);
1582
1582
  if (getShopUgcParams) {
1583
1583
  getShopUgcParams['logEventInfo'] = logEventInfo;
1584
1584
  console.log('getShopUgcParams=====', getShopUgcParams);
1585
1585
  getShopUgcParams && this.jdNavigateToNative(getShopUgcParams as string);
1586
1586
  }
1587
1587
  }
1588
1588
  }
1589
1589
 
1590
1590
  jdJumpToSeckillNewBrand(brandId) {
1591
1591
  this.jdNavigateToNative({
1592
1592
  category: 'jump',
1593
1593
  des: 'seckillnewbrand',
1594
1594
  brandId: `${brandId}`,
1595
1595
  });
1596
1596
  }
1597
1597
 
1598
1598
  jdJumpToJshopDynamicDetail(info) {
1599
1599
  this.jdNavigateToNative({
1600
1600
  category: 'jump',
1601
1601
  des: 'jshopDynamicDetail',
1602
1602
  shopId: global.info.queryInfo.shopId,
1603
1603
  venderId: global.info.queryInfo.venderId,
1604
1604
  ...info,
1605
1605
  });
1606
1606
  }
1607
1607
 
1608
1608
  jdJumpToRankList(rankingId, rankType, logEventInfo) {
1609
1609
  this.jdNavigateToNative(
1610
1610
  Object.assign(
1611
1611
  {},
1612
1612
  {
1613
1613
  category: 'jump',
1614
1614
  des: 'jdreactcommon',
1615
1615
  modulename: 'JDReactRankingList',
1616
1616
  appname: 'JDReactRankingList',
1617
1617
  transparentenable: true,
1618
1618
  ishidden: true,
1619
1619
  param: {
1620
1620
  contentId: '' + rankingId,
1621
1621
  fromSkuId: '',
1622
1622
  detailPageType: '5',
1623
1623
  rankType: rankType || 10 + '',
1624
1624
  },
1625
1625
  logEventInfo,
1626
1626
  },
1627
1627
  ),
1628
1628
  );
1629
1629
  }
1630
1630
 
1631
1631
  jdJumpToFlashSaleTab(logEventInfo) {
1632
1632
  this.jdNavigateToNative(
1633
1633
  Object.assign(
1634
1634
  {},
1635
1635
  {
1636
1636
  category: 'jump',
1637
1637
  des: 'jshopMain',
1638
1638
  jumpTab: 'flashPurchase',
1639
1639
  shopId: global.info.queryInfo.shopId,
1640
1640
  venderId: global.info.queryInfo.venderId,
1641
1641
  sourceType: 'JDReactShopActivityTAB',
1642
1642
  sourceValue: '2',
1643
1643
  operation: 'jumpTabInner',
1644
1644
  logEventInfo,
1645
1645
  },
1646
1646
  ),
1647
1647
  );
1648
1648
  }
1649
1649
 
1650
1650
 
1651
1651
  jdJumpToShopMemberInfo(logEventInfo) {
1652
1652
  this.jdNavigateToNative(
1653
1653
  Object.assign(
1654
1654
  {},
1655
1655
  {
1656
1656
  category: 'jump',
1657
1657
  des: 'jdreactcommon',
1658
1658
  modulename: 'JDReactShopMember',
1659
1659
  appname: 'JDReactShopMember',
1660
1660
  ishidden: true,
1661
1661
  param: {
1662
1662
  page: 'memberInfo',
1663
1663
  shopId: global.info.queryInfo.shopId,
1664
1664
  venderId: global.info.queryInfo.venderId,
1665
1665
  },
1666
1666
  logEventInfo,
1667
1667
  },
1668
1668
  ),
1669
1669
  );
1670
1670
  }
1671
1671
 
1672
1672
  jdJumpToShopMemberBenefit(logEventInfo) {
1673
1673
  const venderId = global.info.queryInfo.venderId;
1674
1674
  const shopId = global.info.queryInfo.shopId;
1675
1675
  this.jdJumpToWeb(
1676
1676
  `${this.jumpWebUrl.memberBenefit}?venderId=${venderId}&shopId=${shopId}`,
1677
1677
  logEventInfo,
1678
1678
  );
1679
1679
  }
1680
1680
 
1681
1681
  jdJumpToShopMemberPointExchange(venderType, levelZeroMenuUrl, logEventInfo) {
1682
1682
  this.jdNavigateToNative(
1683
1683
  Object.assign(
1684
1684
  {},
1685
1685
  {
1686
1686
  category: 'jump',
1687
1687
  des: 'jdreactcommon',
1688
1688
  modulename: 'JDReactShopMember',
1689
1689
  appname: 'JDReactShopMember',
1690
1690
  ishidden: true,
1691
1691
  param: {
1692
1692
  page: 'pointsExchangePage',
1693
1693
  shopId: global.info.queryInfo.shopId,
1694
1694
  venderId: global.info.queryInfo.venderId,
1695
1695
  levelZeroMenuUrl,
1696
1696
  },
1697
1697
  logEventInfo,
1698
1698
  },
1699
1699
  ),
1700
1700
  );
1701
1701
  }
1702
1702
 
1703
1703
  jdJumpToShopMemberBonusPurchase(customerLevel, logEventInfo) {
1704
1704
  this.jdNavigateToNative(
1705
1705
  Object.assign(
1706
1706
  {},
1707
1707
  {
1708
1708
  category: 'jump',
1709
1709
  des: 'jdreactcommon',
1710
1710
  modulename: 'JDReactShopMember',
1711
1711
  appname: 'JDReactShopMember',
1712
1712
  ishidden: true,
1713
1713
  param: {
1714
1714
  page: 'bonusPurchase',
1715
1715
  shopId: global.info.queryInfo.shopId,
1716
1716
  venderId: global.info.queryInfo.venderId,
1717
1717
  customerLevel,
1718
1718
  },
1719
1719
  logEventInfo,
1720
1720
  },
1721
1721
  ),
1722
1722
  );
1723
1723
  }
1724
1724
 
1725
1725
  jdJumpToMyRedEnvelope(logEventInfo) {
1726
1726
  this.jdNavigateToNative(
1727
1727
  Object.assign(
1728
1728
  {},
1729
1729
  {
1730
1730
  category: 'jump',
1731
1731
  des: 'jdreactcommon',
1732
1732
  modulename: 'JDReactMyRedEnvelope',
1733
1733
  appname: 'JDReactMyRedEnvelope',
1734
1734
  ishidden: true,
1735
1735
  fromName: 2,
1736
1736
  needLogin: true,
1737
1737
  logEventInfo,
1738
1738
  },
1739
1739
  ),
1740
1740
  );
1741
1741
  }
1742
1742
 
1743
1743
  jdJumpToMyCoupon(logEventInfo) {
1744
1744
  this.jdNavigateToNative(
1745
1745
  Object.assign(
1746
1746
  {},
1747
1747
  {
1748
1748
  category: 'jump',
1749
1749
  des: 'mycoupon',
1750
1750
  logEventInfo,
1751
1751
  },
1752
1752
  ),
1753
1753
  );
1754
1754
  }
1755
1755
 
1756
1756
 
1757
1757
  jdJumpToMiniProgram({ vapptype, appId, path, param }) {
1758
1758
  const pageName = param['pageType'] || 'home';
1759
1759
  const nowMiniPath = `pages/${pageName}/index`;
1760
1760
  if (appId === global.info.pageInfo.appId) {
1761
1761
  Taro.navigateTo({
1762
1762
  url: `/${nowMiniPath}?${objectToUrlEncode(param)}`,
1763
1763
  }).catch((err) => {
1764
1764
  console.warn('跳转小程序页面错误:', err);
1765
1765
  });
1766
1766
  } else {
1767
1767
  const params = {
1768
1768
  category: 'jump',
1769
1769
  des: 'jdmp',
1770
1770
  appId,
1771
1771
  vapptype,
1772
1772
  param,
1773
1773
  path: '',
1774
1774
  };
1775
1775
  if (path) {
1776
1776
  params.path = `${path}.html`;
1777
1777
  }
1778
1778
  this.jdNavigateToNative(params);
1779
1779
  }
1780
1780
  }
1781
1781
 
1782
1782
  jdJumpToAppMiniProgram(
1783
1783
  path: string,
1784
1784
  param = {},
1785
1785
  successBack?: functionType,
1786
1786
  failBack?: functionType,
1787
1787
  ) {
1788
1788
  this.jdNavigateToNative(param, path, successBack, failBack);
1789
1789
  }
1790
1790
 
1791
1791
  jdNavigateToNative(
1792
1792
  params: object,
1793
1793
  url = OpenAppHost,
1794
1794
  successBack?: functionType | undefined,
1795
1795
  failBack?: functionType | undefined,
1796
1796
  ) {
1797
1797
  console.log('[降级H5] jdNavigateToNative jdJumJdApp:', params);
1798
1798
  const getResParams: JumpEventReportInterFace.JdMiniJumpParams = Object.assign(
1799
1799
  {},
1800
1800
  {
1801
1801
  sourceValue: 'sourceValue_jshopMini',
1802
1802
  sourceType: 'sourceType_jshopMini',
1803
1803
  param: {},
1804
1804
  },
1805
1805
  params,
1806
1806
  );
1807
1807
  const { logEventInfo, ...otherParams } = getResParams;
1808
1808
  console.log('jdNavigateToNative params: ', getResParams);
1809
1809
  console.log('logEventInfo params: ', logEventInfo);
1810
1810
  this.clickEventLog(logEventInfo || getResParams, getResParams.des);
1811
1811
  jd.navigateToNative({
1812
1812
  dataParam: {
1813
1813
  url: url,
1814
1814
  params: otherParams,
1815
1815
  },
1816
1816
  success(res) {
1817
1817
  typeof successBack === 'function' && successBack(res);
1818
1818
  console.log('navigateToNative.success', res);
1819
1819
  },
1820
1820
  fail(res) {
1821
1821
  typeof failBack === 'function' && failBack(res);
1822
1822
  console.log('navigateToNative.fail', res);
1823
1823
  },
1824
1824
  });
1825
1825
  }
1826
1826
 
1827
1827
  clickEventLog(opts: JumpEventReportInterFace.OptEventLogParams = {}, clickKey = 'click') {
1828
1828
  const { eventId, jsonParam, eventLevel = 3, skuId, ...otherParams } = opts;
1829
1829
  if (eventId && jsonParam) {
1830
1830
  const { etModelInfo, logBaseInfo } = jsonParam;
1831
1831
  let getJsonParam = {};
1832
1832
  if (etModelInfo && logBaseInfo) {
1833
1833
  getJsonParam = logBaseInfo;
1834
1834
  } else {
1835
1835
  if (Array.isArray(jsonParam)) {
1836
1836
  getJsonParam = jsonParam;
1837
1837
  } else {
1838
1838
  getJsonParam = Object.assign(
1839
1839
  {},
1840
1840
  {
1841
1841
  shopid: global.info.queryInfo?.shopId,
1842
1842
  },
1843
1843
  jsonParam,
1844
1844
  );
1845
1845
  }
1846
1846
  }
1847
1847
  if (
1848
1848
  clickKey === 'exposure' &&
1849
1849
  /^TerminatorNew/.test(eventId) &&
1850
1850
  !Array.isArray(getJsonParam)
1851
1851
  ) {
1852
1852
  getJsonParam = [getJsonParam];
1853
1853
  }
1854
1854
  const miniLogParams = {
1855
1855
  eid: eventId,
1856
1856
  elevel: eventLevel,
1857
1857
  eparam: JSON.stringify(getJsonParam),
1858
1858
  pageId: this.logPageId,
1859
1859
  pname: this.logPname,
1860
1860
  pparam: JSON.stringify(this.routerInfo.params),
1861
1861
  target: this.routerInfo.path,
1862
1862
  event: this.nativeEvent,
1863
1863
  ...otherParams,
1864
1864
  };
1865
1865
  if (clickKey === 'addToCart' && skuId) {
1866
1866
  miniLogParams['shoppingList'] = {
1867
1867
  [skuId]: 1,
1868
1868
  };
1869
1869
  }
1870
1870
  console.log('点击埋点参数对象', miniLogParams, clickKey);
1871
1871
  global.miniAppLogInstance && global.miniAppLogInstance[clickKey](miniLogParams);
1872
1872
  } else {
1873
1873
  console.log('暂无埋点参数eventId和eventParam');
1874
1874
  }
1875
1875
  }
1876
1876
 
1877
1877
  exposureEventLog(opts: JumpEventReportInterFace.OptEventLogParams = {}) {
1878
1878
  return this.clickEventLog(opts, 'exposure');
1879
1879
  }
1880
1880
 
1881
1881
  jdJumpToSearch(shopId, suggestWord) {
1882
1882
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId;
1883
1883
  this.jdNavigateToNative({
1884
1884
  category: 'jump',
1885
1885
  des: 'jshopGuessWord',
1886
1886
  shopId: String(shopId),
1887
1887
  transparentEnable: true,
1888
1888
  suggestWord,
1889
1889
  sourceInfo: APP_SOURCE_INFO,
1890
1890
  });
1891
1891
  }
1892
1892
 
1893
1893
  jdJumpToMyMessageBox() {
1894
1894
  this.jdNavigateToNative({
1895
1895
  category: 'jump',
1896
1896
  des: 'myMessageBox',
1897
1897
  });
1898
1898
  }
1899
1899
 
1900
1900
  jdJumpToAppHome() {
1901
1901
  this.jdNavigateToNative({
1902
1902
  category: 'jump',
1903
1903
  des: 'HomePage',
1904
1904
  });
1905
1905
  }
1906
1906
 
1907
1907
  jdJumpToShopHomeDetail({ shopId, venderId }) {
1908
1908
  this.jdNavigateToNative({
1909
1909
  category: 'jump',
1910
1910
  des: 'jshopDetail',
1911
1911
  shopId: String(shopId),
1912
1912
  venderId: String(venderId),
1913
1913
  });
1914
1914
  }
1915
1915
 
1916
1916
  jdJumpToShopLottery(shopTotalInfo) {
1917
1917
  this.jdNavigateToNative(
1918
1918
  Object.assign(
1919
1919
  {},
1920
1920
  {
1921
1921
  category: 'jump',
1922
1922
  des: 'jshopSign',
1923
1923
  activityRuleType: '0',
1924
1924
  shopId: global.info.queryInfo.shopId,
1925
1925
  venderId: global.info.queryInfo.venderId,
1926
1926
  },
1927
1927
  shopTotalInfo,
1928
1928
  ),
1929
1929
  );
1930
1930
  }
1931
1931
 
1932
1932
  jdJumpToSageAuthorHome(shopTotalInfo) {
1933
1933
  this.jdNavigateToNative(
1934
1934
  Object.assign(
1935
1935
  {},
1936
1936
  {
1937
1937
  category: 'jump',
1938
1938
  des: 'faxian_author',
1939
1939
  channel: 'shopHomePage',
1940
1940
  selectTab: '0',
1941
1941
  },
1942
1942
  shopTotalInfo,
1943
1943
  ),
1944
1944
  );
1945
1945
  }