@conecli/cone-render 0.10.1-shop-beta.21 → 0.10.1-shop-beta.22

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