@conecli/cone-render 0.10.1-shop3.52 → 0.10.1-shop3.53

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: isJdAndHarmonyDevice? changeUrl: 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
  jdJumpToCartPage(logEventInfo) {
1002
1002
  this.jdNavigateToNative(
1003
1003
  Object.assign(
1004
1004
  {},
1005
1005
  {
1006
1006
  category: 'jump',
1007
1007
  des: 'cart',
1008
1008
  sourceType: 'h5',
1009
1009
  logEventInfo,
1010
1010
  },
1011
1011
  ),
1012
1012
  );
1013
1013
  }
1014
1014
 
1015
1015
  jdJumpToShopCategory(shopInfo = {}) {
1016
1016
  console.log(
1017
1017
  '🚀 ~ file: jdJumpJdApp.ts:40 ~ JdJumpJdApp ~ jdJumpToShopCategory ~ shopInfo:',
1018
1018
  shopInfo,
1019
1019
  );
1020
1020
  console.log('[降级H5] jdJumpToShopCategory jdJumpJdApp');
1021
1021
  this.jdNavigateToNative(
1022
1022
  Object.assign(
1023
1023
  {},
1024
1024
  {
1025
1025
  category: 'jump',
1026
1026
  des: 'jshopMain',
1027
1027
  jumpBottomTab: 'category',
1028
1028
  },
1029
1029
  shopInfo,
1030
1030
  {
1031
1031
  shopId: String(shopInfo.shopId ?? ''),
1032
1032
  venderId: String(shopInfo.venderId ?? ''),
1033
1033
  },
1034
1034
  ),
1035
1035
  );
1036
1036
  }
1037
1037
 
1038
1038
  jdJumpToOrderInfoView(wareId, wareNum = 1, logEventInfo) {
1039
1039
  this.jdNavigateToNative({
1040
1040
  category: 'jump',
1041
1041
  des: 'orderInfoView',
1042
1042
  wareId: `${wareId}`,
1043
1043
  wareNum: global.info.sysInfo.isIOS ? `${wareNum}` : wareNum,
1044
1044
  skuSource: 25,
1045
1045
  sourceType: 6,
1046
1046
  extFlag: '{}',
1047
1047
  logEventInfo,
1048
1048
  });
1049
1049
  }
1050
1050
 
1051
1051
  jdJumpToTryDetail(tryId) {
1052
1052
  this.jdNavigateToNative({
1053
1053
  category: 'jump',
1054
1054
  des: 'jdreactcommon',
1055
1055
  appname: 'JDReactNewProduct',
1056
1056
  modulename: 'JDReactNewProduct',
1057
1057
  param: {
1058
1058
  activityId: tryId,
1059
1059
  isNative: true,
1060
1060
  nativePage: 'jdtry_detail',
1061
1061
  transparentenable: true,
1062
1062
  },
1063
1063
  });
1064
1064
  }
1065
1065
 
1066
1066
  jdJumpToShopHome(shopInfo: JumpEventReportInterFace.ShopIdsInfo = {}) {
1067
1067
  console.log('[降级H5] jdJumpToShopHome jdJumpJdApp');
1068
1068
  const currentShopInfo = {
1069
1069
  shopId: global.info.queryInfo.shopId,
1070
1070
  venderId: global.info.queryInfo.venderId,
1071
1071
  };
1072
1072
  const restParams =
1073
1073
  (shopInfo?.shopId && shopInfo.shopId !== currentShopInfo.shopId) ||
1074
1074
  (shopInfo?.venderId && shopInfo.venderId !== currentShopInfo.venderId)
1075
1075
  ? {}
1076
1076
  : currentShopInfo;
1077
1077
  const getInfo = Object.assign({}, restParams, shopInfo);
1078
1078
  const getShopParams = this.getShopIdsInfo(getInfo);
1079
1079
  this.jdJumpToShopBase(getShopParams);
1080
1080
  }
1081
1081
 
1082
1082
  jdJumpToShopHomeInner(shopInfo: JumpEventReportInterFace.ShopIdsInfo = {}) {
1083
1083
  const getParam = Object.assign(
1084
1084
  {},
1085
1085
  {
1086
1086
  jumpTab: HOME_TOP_TAB_TYPE_APP.HOME,
1087
1087
  operation: 'jumpTabInner',
1088
1088
  },
1089
1089
  shopInfo,
1090
1090
  );
1091
1091
  this.jdJumpToShopBase(getParam);
1092
1092
  }
1093
1093
 
1094
1094
  jdJumpToUnifieddetail(sourceInfo) {
1095
1095
  this.jdNavigateToNative(
1096
1096
  Object.assign(
1097
1097
  {},
1098
1098
  {
1099
1099
  category: 'jump',
1100
1100
  des: 'unifieddetail',
1101
1101
  },
1102
1102
  sourceInfo,
1103
1103
  ),
1104
1104
  );
1105
1105
  }
1106
1106
 
1107
1107
  jdJumpToVideoImmersion(sourceInfo) {
1108
1108
  this.jdNavigateToNative(
1109
1109
  Object.assign(
1110
1110
  {},
1111
1111
  {
1112
1112
  category: 'jump',
1113
1113
  des: 'VideoImmersion',
1114
1114
  },
1115
1115
  sourceInfo,
1116
1116
  ),
1117
1117
  );
1118
1118
  }
1119
1119
 
1120
1120
  jdJumpToShopMember(shopInfo) {
1121
1121
  this.jdNavigateToNative(
1122
1122
  Object.assign(
1123
1123
  {},
1124
1124
  {
1125
1125
  category: 'jump',
1126
1126
  des: 'jshopMember',
1127
1127
  followAward: '-1',
1128
1128
  },
1129
1129
  shopInfo,
1130
1130
  ),
1131
1131
  );
1132
1132
  }
1133
1133
 
1134
1134
  jdJumpToMemberTab(shopInfo?) {
1135
1135
  this.jdNavigateToNative(
1136
1136
  Object.assign(
1137
1137
  {},
1138
1138
  {
1139
1139
  category: 'jump',
1140
1140
  des: 'jshopMain',
1141
1141
  shopId: global.info.queryInfo.shopId,
1142
1142
  venderId: global.info.queryInfo.venderId,
1143
1143
  operation: 'jumpBottomTabMember',
1144
1144
  sourceInfo: APP_SOURCE_INFO,
1145
1145
  },
1146
1146
  shopInfo,
1147
1147
  ),
1148
1148
  );
1149
1149
  }
1150
1150
 
1151
1151
  jdJumpToDongDongChatGroup(groupId, source = 'jdmini') {
1152
1152
  this.jdNavigateToNative({
1153
1153
  category: 'jump',
1154
1154
  des: 'dongdong_group_chat',
1155
1155
  source: source,
1156
1156
  groupId: `${groupId}`,
1157
1157
  });
1158
1158
  }
1159
1159
 
1160
1160
  jdJumpToDongDongChat(paramInfo: any = {}) {
1161
1161
  const { venderId, ...otherParams } = paramInfo;
1162
1162
  this.jdNavigateToNative(
1163
1163
  Object.assign(
1164
1164
  {},
1165
1165
  {
1166
1166
  category: 'jump',
1167
1167
  des: 'jd_dongdong_chat',
1168
1168
  venderId: `${venderId ? venderId : global.info.queryInfo?.venderId}`,
1169
1169
  entry: 'm_shop',
1170
1170
  },
1171
1171
  otherParams,
1172
1172
  ),
1173
1173
  );
1174
1174
  }
1175
1175
 
1176
1176
  jdJumpToShopActivity(shopInfo) {
1177
1177
  const getParams = Object.assign(
1178
1178
  {},
1179
1179
  {
1180
1180
  category: 'jump',
1181
1181
  des: 'jshopActivity',
1182
1182
  shopId: global.info.queryInfo.shopId,
1183
1183
  venderId: global.info.queryInfo.venderId,
1184
1184
  },
1185
1185
  shopInfo,
1186
1186
  );
1187
1187
  getParams['projectId'] && (getParams['projectId'] = `${getParams['projectId']}`);
1188
1188
  this.jdNavigateToNative(getParams);
1189
1189
  }
1190
1190
 
1191
1191
  jdJumpToShopActivityPage(shopInfo) {
1192
1192
  this.jdNavigateToNative(
1193
1193
  Object.assign(
1194
1194
  {},
1195
1195
  {
1196
1196
  category: 'jump',
1197
1197
  des: 'jshopActivityPage',
1198
1198
  shopId: global.info.queryInfo.shopId,
1199
1199
  title: global.info.queryInfo?.shopName,
1200
1200
  },
1201
1201
  shopInfo,
1202
1202
  ),
1203
1203
  );
1204
1204
  }
1205
1205
 
1206
1206
  jdJumpToShopDetail(shopInfo) {
1207
1207
  this.jdNavigateToNative(
1208
1208
  Object.assign(
1209
1209
  {},
1210
1210
  {
1211
1211
  category: 'jump',
1212
1212
  des: 'jshopDetail',
1213
1213
  shopId: global.info.queryInfo.shopId,
1214
1214
  venderId: global.info.queryInfo.venderId,
1215
1215
  sourceInfo: APP_SOURCE_INFO,
1216
1216
  },
1217
1217
  shopInfo,
1218
1218
  ),
1219
1219
  );
1220
1220
  }
1221
1221
 
1222
1222
  jdJumpToShopMemberCard(shopInfo) {
1223
1223
  const { url, logEventInfo } = shopInfo;
1224
1224
  if (this.isOpenJdAppUrl(url)) {
1225
1225
  const getOpenAppParams = this.jdOpenAppParams(url);
1226
1226
  console.log('jd web 获取自定义openApp链接解析后的参数结果', getOpenAppParams);
1227
1227
  if (getOpenAppParams) {
1228
1228
  this.jdNavigateToNative(Object.assign({}, getOpenAppParams, { logEventInfo }));
1229
1229
  }
1230
1230
  } else {
1231
1231
  super.jdJumpToWeb(url, {
1232
1232
  ...logEventInfo,
1233
1233
  });
1234
1234
  }
1235
1235
  }
1236
1236
 
1237
1237
  jdJumpToTotalPromotion(shopInfo) {
1238
1238
  const { url, logEventInfo } = shopInfo;
1239
1239
  if (this.isOpenJdAppUrl(url)) {
1240
1240
  const getOpenAppParams = this.jdOpenAppParams(url);
1241
1241
  console.log('jd web 获取自定义openApp链接解析后的参数结果', getOpenAppParams);
1242
1242
  if (getOpenAppParams) {
1243
1243
  this.jdNavigateToNative(Object.assign({}, getOpenAppParams, { logEventInfo }));
1244
1244
  }
1245
1245
  } else {
1246
1246
  super.jdJumpToWeb(url, {
1247
1247
  ...logEventInfo,
1248
1248
  });
1249
1249
  }
1250
1250
  }
1251
1251
 
1252
1252
  jdJumpToShopSearch(pageInfo = {}) {
1253
1253
  const getInfo = Object.assign(
1254
1254
  {},
1255
1255
  {
1256
1256
  shopId: global.info.queryInfo.shopId,
1257
1257
  venderId: global.info.queryInfo.venderId,
1258
1258
  sourceInfo: APP_SOURCE_INFO,
1259
1259
  },
1260
1260
  pageInfo,
1261
1261
  );
1262
1262
  const { keyword = '', categoryId = '', ...otherPageInfo }: any = getInfo;
1263
1263
  const searchInfo = {};
1264
1264
  if (categoryId !== '') {
1265
1265
  searchInfo['categoryId'] = typeof categoryId === 'string' ? categoryId?.trim() : categoryId;
1266
1266
  searchInfo['searchType'] = '5';
1267
1267
  } else if (keyword !== '') {
1268
1268
  searchInfo['keyWord'] = keyword;
1269
1269
  searchInfo['searchType'] = '4';
1270
1270
  }
1271
1271
  const openAppParam = {
1272
1272
  category: 'jump',
1273
1273
  des: 'jshopProductList',
1274
1274
  pageId: '1',
1275
1275
  ...searchInfo,
1276
1276
  };
1277
1277
  const jumpExtMap = getEnterShopExtInfo();
1278
1278
  if (jumpExtMap) {
1279
1279
  openAppParam.jumpExtMap = jumpExtMap;
1280
1280
  }
1281
1281
  this.jdNavigateToNative(Object.assign({}, openAppParam, otherPageInfo));
1282
1282
  }
1283
1283
 
1284
1284
  jdJumpToOrderList(logEventInfo = {}) {
1285
1285
  this.jdNavigateToNative(
1286
1286
  Object.assign(
1287
1287
  {},
1288
1288
  {
1289
1289
  category: 'jump',
1290
1290
  des: 'orderlist',
1291
1291
  from: 'dphycc',
1292
1292
  },
1293
1293
  logEventInfo,
1294
1294
  ),
1295
1295
  );
1296
1296
  }
1297
1297
 
1298
1298
  jdJumpToCouponSearchProductList(couponId, logEventInfo = {}) {
1299
1299
  this.jdNavigateToNative(
1300
1300
  Object.assign(
1301
1301
  {},
1302
1302
  {
1303
1303
  category: 'jump',
1304
1304
  des: 'productList',
1305
1305
  from: 'couponBatch',
1306
1306
  couponId: `${couponId}`,
1307
1307
  logEventInfo,
1308
1308
  },
1309
1309
  ),
1310
1310
  );
1311
1311
  }
1312
1312
 
1313
1313
  jdJumpToTabAllProduct(shopId, venderId, logEventInfo = {}) {
1314
1314
  console.log('jdJumpJdApp - jdJumpToTabAllProduct');
1315
1315
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId;
1316
1316
  if (typeof venderId === 'undefined') venderId = global.info.queryInfo.venderId;
1317
1317
  this.jdNavigateToNative(
1318
1318
  Object.assign(
1319
1319
  {},
1320
1320
  {
1321
1321
  category: 'jump',
1322
1322
  des: 'jshopMain',
1323
1323
  jumpTab: 'allProduct',
1324
1324
  },
1325
1325
  shopId !== 'undefined'
1326
1326
  ? {
1327
1327
  shopId,
1328
1328
  }
1329
1329
  : {},
1330
1330
  venderId !== 'undefined'
1331
1331
  ? {
1332
1332
  venderId,
1333
1333
  }
1334
1334
  : {},
1335
1335
  {
1336
1336
  logEventInfo,
1337
1337
  },
1338
1338
  ),
1339
1339
  );
1340
1340
  }
1341
1341
 
1342
1342
  jdJumpToTabAllProductInner(shopId, venderId, logEventInfo = {}) {
1343
1343
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId;
1344
1344
  if (typeof venderId === 'undefined') venderId = global.info.queryInfo.venderId;
1345
1345
  this.jdNavigateToNative(
1346
1346
  Object.assign(
1347
1347
  {},
1348
1348
  {
1349
1349
  category: 'jump',
1350
1350
  des: 'jshopMain',
1351
1351
  jumpTab: 'allProduct',
1352
1352
  operation: 'jumpTabInner',
1353
1353
  },
1354
1354
  shopId !== 'undefined'
1355
1355
  ? {
1356
1356
  shopId,
1357
1357
  }
1358
1358
  : {},
1359
1359
  venderId !== 'undefined'
1360
1360
  ? {
1361
1361
  venderId,
1362
1362
  }
1363
1363
  : {},
1364
1364
  {
1365
1365
  logEventInfo,
1366
1366
  },
1367
1367
  ),
1368
1368
  );
1369
1369
  }
1370
1370
 
1371
1371
  jdJumpToShopBase(shopInfo) {
1372
1372
  console.log('[降级H5] jdJumpToShopBase jdJumpJdApp');
1373
1373
  const currentShopInfo = {
1374
1374
  shopId: global.info.queryInfo.shopId,
1375
1375
  venderId: global.info.queryInfo.venderId,
1376
1376
  };
1377
1377
  const restParams =
1378
1378
  (shopInfo?.shopId && shopInfo.shopId !== currentShopInfo.shopId) ||
1379
1379
  (shopInfo?.venderId && shopInfo.venderId !== currentShopInfo.venderId)
1380
1380
  ? {}
1381
1381
  : currentShopInfo;
1382
1382
  const getParam = Object.assign(
1383
1383
  {},
1384
1384
  {
1385
1385
  category: 'jump',
1386
1386
  des: 'jshopMain',
1387
1387
  jumpTab: HOME_TOP_TAB_TYPE_APP.HOME,
1388
1388
  ...restParams,
1389
1389
  sourceInfo: APP_SOURCE_INFO,
1390
1390
  },
1391
1391
  shopInfo,
1392
1392
  );
1393
1393
  this.jdNavigateToNative(getParam);
1394
1394
  }
1395
1395
 
1396
1396
  jdJumpToTabNew(shopInfo = {}) {
1397
1397
  const getParam = Object.assign(
1398
1398
  {},
1399
1399
  {
1400
1400
  jumpTab: HOME_TOP_TAB_TYPE_APP.NEW,
1401
1401
  },
1402
1402
  shopInfo,
1403
1403
  );
1404
1404
  this.jdJumpToShopBase(getParam);
1405
1405
  }
1406
1406
 
1407
1407
  jdJumpToTabNewInner(shopInfo = {}) {
1408
1408
  const getParam = Object.assign(
1409
1409
  {},
1410
1410
  {
1411
1411
  jumpTab: HOME_TOP_TAB_TYPE_APP.NEW,
1412
1412
  operation: 'jumpTabInner',
1413
1413
  },
1414
1414
  shopInfo,
1415
1415
  );
1416
1416
  this.jdJumpToShopBase(getParam);
1417
1417
  }
1418
1418
  jdJumpToTabRank(shopInfo = {}) {
1419
1419
  const getParam = Object.assign(
1420
1420
  {},
1421
1421
  {
1422
1422
  jumpTab: HOME_TOP_TAB_TYPE_APP.RANK,
1423
1423
  },
1424
1424
  shopInfo,
1425
1425
  );
1426
1426
  this.jdJumpToShopBase(getParam);
1427
1427
  }
1428
1428
  jdJumpToTabRankInner(shopInfo = {}) {
1429
1429
  const getParam = Object.assign(
1430
1430
  {},
1431
1431
  {
1432
1432
  jumpTab: HOME_TOP_TAB_TYPE_APP.RANK,
1433
1433
  operation: 'jumpTabInner',
1434
1434
  },
1435
1435
  shopInfo,
1436
1436
  );
1437
1437
  this.jdJumpToShopBase(getParam);
1438
1438
  }
1439
1439
  jdJumpToTabBuyerShow(shopInfo = {}) {
1440
1440
  const getParam = Object.assign(
1441
1441
  {},
1442
1442
  {
1443
1443
  jumpTab: HOME_TOP_TAB_TYPE_APP.BUYERSHOW,
1444
1444
  },
1445
1445
  shopInfo,
1446
1446
  );
1447
1447
  this.jdJumpToShopBase(getParam);
1448
1448
  }
1449
1449
  jdJumpToTabBuyerShowInner(shopInfo = {}) {
1450
1450
  const getParam = Object.assign(
1451
1451
  {},
1452
1452
  {
1453
1453
  jumpTab: HOME_TOP_TAB_TYPE_APP.BUYERSHOW,
1454
1454
  operation: 'jumpTabInner',
1455
1455
  },
1456
1456
  shopInfo,
1457
1457
  );
1458
1458
  this.jdJumpToShopBase(getParam);
1459
1459
  }
1460
1460
  jdJumpToTabActivity(shopInfo = {}) {
1461
1461
  const getParam = Object.assign(
1462
1462
  {},
1463
1463
  {
1464
1464
  jumpTab: HOME_TOP_TAB_TYPE_APP.ACTIVITY,
1465
1465
  },
1466
1466
  shopInfo,
1467
1467
  );
1468
1468
  this.jdJumpToShopBase(getParam);
1469
1469
  }
1470
1470
  jdJumpToTabActivityInner(shopInfo = {}) {
1471
1471
  const getParam = Object.assign(
1472
1472
  {},
1473
1473
  {
1474
1474
  jumpTab: HOME_TOP_TAB_TYPE_APP.ACTIVITY,
1475
1475
  operation: 'jumpTabInner',
1476
1476
  },
1477
1477
  shopInfo,
1478
1478
  );
1479
1479
  this.jdJumpToShopBase(getParam);
1480
1480
  }
1481
1481
  jdJumpToTabSecKill(shopInfo = {}) {
1482
1482
  const getParam = Object.assign(
1483
1483
  {},
1484
1484
  {
1485
1485
  jumpTab: HOME_TOP_TAB_TYPE_APP.SECKILL,
1486
1486
  },
1487
1487
  shopInfo,
1488
1488
  );
1489
1489
  this.jdJumpToShopBase(getParam);
1490
1490
  }
1491
1491
  jdJumpToTabSecKillInner(shopInfo = {}) {
1492
1492
  const getParam = Object.assign(
1493
1493
  {},
1494
1494
  {
1495
1495
  jumpTab: HOME_TOP_TAB_TYPE_APP.SECKILL,
1496
1496
  operation: 'jumpTabInner',
1497
1497
  },
1498
1498
  shopInfo,
1499
1499
  );
1500
1500
  this.jdJumpToShopBase(getParam);
1501
1501
  }
1502
1502
 
1503
1503
  jdJumpToBottomTabBase(type, shopInfo = {}) {
1504
1504
  this.jdNavigateToNative(
1505
1505
  Object.assign(
1506
1506
  {},
1507
1507
  {
1508
1508
  category: 'jump',
1509
1509
  des: 'jshopMain',
1510
1510
  shopId: global.info.queryInfo.shopId,
1511
1511
  venderId: global.info.queryInfo.venderId,
1512
1512
  jumpBottomTab: type,
1513
1513
  sourceInfo: APP_SOURCE_INFO,
1514
1514
  },
1515
1515
  shopInfo,
1516
1516
  ),
1517
1517
  );
1518
1518
  }
1519
1519
 
1520
1520
  jdJumpToBottomTabProduct(shopInfo = {}) {
1521
1521
  this.jdJumpToBottomTabBase(BOTTOM_TAB_TYPE_APP.PRODUCT, shopInfo);
1522
1522
  }
1523
1523
 
1524
1524
  jdJumpToBottomTabCategory(shopInfo = {}) {
1525
1525
  this.jdJumpToBottomTabBase(BOTTOM_TAB_TYPE_APP.CATEGORY, shopInfo);
1526
1526
  }
1527
1527
 
1528
1528
  jdJumpToBottomTabFind(shopInfo = {}) {
1529
1529
  this.jdJumpToBottomTabBase(BOTTOM_TAB_TYPE_APP.FIND, shopInfo);
1530
1530
  }
1531
1531
 
1532
1532
  jdJumpToBottomTabBrandMember(shopInfo = {}) {
1533
1533
  this.jdJumpToBottomTabBase(BOTTOM_TAB_TYPE_APP.BRANDMEMBER, shopInfo);
1534
1534
  }
1535
1535
 
1536
1536
  jdJumpToBottomTabBrandMemberInner(shopInfo = {}) {
1537
1537
  this.jdJumpToMemberTab(shopInfo);
1538
1538
  }
1539
1539
 
1540
1540
  jdJumpToWeb(
1541
1541
  url,
1542
1542
  logEventInfo,
1543
1543
  successBack?: functionType | undefined,
1544
1544
  failBack?: functionType | undefined,
1545
1545
  ) {
1546
1546
  const changeUrl = /^\/\//.test(url) ? `https:${url}` : url;
1547
1547
  this.jdNavigateToNative(
1548
1548
  {
1549
1549
  category: 'jump',
1550
1550
  des: 'm',
1551
1551
  url: isJdAndHarmonyDevice ? changeUrl : encodeURIComponent(changeUrl),
1552
1552
  logEventInfo,
1553
1553
  },
1554
1554
  OpenAppHost,
1555
1555
  successBack,
1556
1556
  failBack,
1557
1557
  );
1558
1558
  }
1559
1559
 
1560
1560
  jdJumpToLive(clickUrlOrObj, logEventInfo) {
1561
1561
  if (typeof clickUrlOrObj === 'object') {
1562
1562
  this.jdNavigateToNative({
1563
1563
  category: 'jump',
1564
1564
  des: 'LivePlayerRoom',
1565
1565
  liveOrigin: '1',
1566
1566
  needLogin: '0',
1567
1567
  isNeedVideo: true,
1568
1568
  logEventInfo,
1569
1569
  ...clickUrlOrObj,
1570
1570
  });
1571
1571
  } else {
1572
1572
  const getShopLiveParams = this.jdOpenAppParams(clickUrlOrObj);
1573
1573
  console.log('getShopLiveParams=====', getShopLiveParams);
1574
1574
  if (typeof getShopLiveParams === 'object') {
1575
1575
  this.jdNavigateToNative({
1576
1576
  ...getShopLiveParams,
1577
1577
  logEventInfo,
1578
1578
  });
1579
1579
  }
1580
1580
  }
1581
1581
  }
1582
1582
 
1583
1583
  jdJumpToUgcContent(urlObj, logEventInfo = {}) {
1584
1584
  if (typeof urlObj === 'object') {
1585
1585
  this.jdNavigateToNative({
1586
1586
  category: 'jump',
1587
1587
  des: 'shareOrderUgcContent',
1588
1588
  channel: 'shopshangxin',
1589
1589
  cmtType: '10',
1590
1590
  isNeedVideo: true,
1591
1591
  ...urlObj,
1592
1592
  logEventInfo,
1593
1593
  });
1594
1594
  } else {
1595
1595
  const getShopUgcParams = this.jdOpenAppParams(urlObj);
1596
1596
  if (getShopUgcParams) {
1597
1597
  getShopUgcParams['logEventInfo'] = logEventInfo;
1598
1598
  console.log('getShopUgcParams=====', getShopUgcParams);
1599
1599
  getShopUgcParams && this.jdNavigateToNative(getShopUgcParams as string);
1600
1600
  }
1601
1601
  }
1602
1602
  }
1603
1603
 
1604
1604
  jdJumpToSeckillNewBrand(brandId) {
1605
1605
  this.jdNavigateToNative({
1606
1606
  category: 'jump',
1607
1607
  des: 'seckillnewbrand',
1608
1608
  brandId: `${brandId}`,
1609
1609
  });
1610
1610
  }
1611
1611
 
1612
1612
  jdJumpToJshopDynamicDetail(info) {
1613
1613
  this.jdNavigateToNative({
1614
1614
  category: 'jump',
1615
1615
  des: 'jshopDynamicDetail',
1616
1616
  shopId: global.info.queryInfo.shopId,
1617
1617
  venderId: global.info.queryInfo.venderId,
1618
1618
  ...info,
1619
1619
  });
1620
1620
  }
1621
1621
 
1622
1622
  jdJumpToRankList(rankingId, rankType, logEventInfo) {
1623
1623
  this.jdNavigateToNative(
1624
1624
  Object.assign(
1625
1625
  {},
1626
1626
  {
1627
1627
  category: 'jump',
1628
1628
  des: 'jdreactcommon',
1629
1629
  modulename: 'JDReactRankingList',
1630
1630
  appname: 'JDReactRankingList',
1631
1631
  transparentenable: true,
1632
1632
  ishidden: true,
1633
1633
  param: {
1634
1634
  contentId: '' + rankingId,
1635
1635
  fromSkuId: '',
1636
1636
  detailPageType: '5',
1637
1637
  rankType: rankType || 10 + '',
1638
1638
  },
1639
1639
  logEventInfo,
1640
1640
  },
1641
1641
  ),
1642
1642
  );
1643
1643
  }
1644
1644
 
1645
1645
  jdJumpToFlashSaleTab(logEventInfo) {
1646
1646
  this.jdNavigateToNative(
1647
1647
  Object.assign(
1648
1648
  {},
1649
1649
  {
1650
1650
  category: 'jump',
1651
1651
  des: 'jshopMain',
1652
1652
  jumpTab: 'flashPurchase',
1653
1653
  shopId: global.info.queryInfo.shopId,
1654
1654
  venderId: global.info.queryInfo.venderId,
1655
1655
  sourceType: 'JDReactShopActivityTAB',
1656
1656
  sourceValue: '2',
1657
1657
  operation: 'jumpTabInner',
1658
1658
  logEventInfo,
1659
1659
  },
1660
1660
  ),
1661
1661
  );
1662
1662
  }
1663
1663
 
1664
1664
 
1665
1665
  jdJumpToShopMemberInfo(logEventInfo) {
1666
1666
  this.jdNavigateToNative(
1667
1667
  Object.assign(
1668
1668
  {},
1669
1669
  {
1670
1670
  category: 'jump',
1671
1671
  des: 'jdreactcommon',
1672
1672
  modulename: 'JDReactShopMember',
1673
1673
  appname: 'JDReactShopMember',
1674
1674
  ishidden: true,
1675
1675
  param: {
1676
1676
  page: 'memberInfo',
1677
1677
  shopId: global.info.queryInfo.shopId,
1678
1678
  venderId: global.info.queryInfo.venderId,
1679
1679
  },
1680
1680
  logEventInfo,
1681
1681
  },
1682
1682
  ),
1683
1683
  );
1684
1684
  }
1685
1685
 
1686
1686
  jdJumpToShopMemberBenefit(logEventInfo) {
1687
1687
  const venderId = global.info.queryInfo.venderId;
1688
1688
  const shopId = global.info.queryInfo.shopId;
1689
1689
  this.jdJumpToWeb(
1690
1690
  `${this.jumpWebUrl.memberBenefit}?venderId=${venderId}&shopId=${shopId}`,
1691
1691
  logEventInfo,
1692
1692
  );
1693
1693
  }
1694
1694
 
1695
1695
  jdJumpToShopMemberPointExchange(venderType, levelZeroMenuUrl, logEventInfo) {
1696
1696
  this.jdNavigateToNative(
1697
1697
  Object.assign(
1698
1698
  {},
1699
1699
  {
1700
1700
  category: 'jump',
1701
1701
  des: 'jdreactcommon',
1702
1702
  modulename: 'JDReactShopMember',
1703
1703
  appname: 'JDReactShopMember',
1704
1704
  ishidden: true,
1705
1705
  param: {
1706
1706
  page: 'pointsExchangePage',
1707
1707
  shopId: global.info.queryInfo.shopId,
1708
1708
  venderId: global.info.queryInfo.venderId,
1709
1709
  levelZeroMenuUrl,
1710
1710
  },
1711
1711
  logEventInfo,
1712
1712
  },
1713
1713
  ),
1714
1714
  );
1715
1715
  }
1716
1716
 
1717
1717
  jdJumpToShopMemberBonusPurchase(customerLevel, logEventInfo) {
1718
1718
  this.jdNavigateToNative(
1719
1719
  Object.assign(
1720
1720
  {},
1721
1721
  {
1722
1722
  category: 'jump',
1723
1723
  des: 'jdreactcommon',
1724
1724
  modulename: 'JDReactShopMember',
1725
1725
  appname: 'JDReactShopMember',
1726
1726
  ishidden: true,
1727
1727
  param: {
1728
1728
  page: 'bonusPurchase',
1729
1729
  shopId: global.info.queryInfo.shopId,
1730
1730
  venderId: global.info.queryInfo.venderId,
1731
1731
  customerLevel,
1732
1732
  },
1733
1733
  logEventInfo,
1734
1734
  },
1735
1735
  ),
1736
1736
  );
1737
1737
  }
1738
1738
 
1739
1739
  jdJumpToMyRedEnvelope(logEventInfo) {
1740
1740
  this.jdNavigateToNative(
1741
1741
  Object.assign(
1742
1742
  {},
1743
1743
  {
1744
1744
  category: 'jump',
1745
1745
  des: 'jdreactcommon',
1746
1746
  modulename: 'JDReactMyRedEnvelope',
1747
1747
  appname: 'JDReactMyRedEnvelope',
1748
1748
  ishidden: true,
1749
1749
  fromName: 2,
1750
1750
  needLogin: true,
1751
1751
  logEventInfo,
1752
1752
  },
1753
1753
  ),
1754
1754
  );
1755
1755
  }
1756
1756
 
1757
1757
  jdJumpToMyCoupon(logEventInfo) {
1758
1758
  this.jdNavigateToNative(
1759
1759
  Object.assign(
1760
1760
  {},
1761
1761
  {
1762
1762
  category: 'jump',
1763
1763
  des: 'mycoupon',
1764
1764
  logEventInfo,
1765
1765
  },
1766
1766
  ),
1767
1767
  );
1768
1768
  }
1769
1769
 
1770
1770
 
1771
1771
  jdJumpToMiniProgram({ vapptype, appId, path, param }) {
1772
1772
  const pageName = param['pageType'] || 'home';
1773
1773
  const nowMiniPath = `pages/${pageName}/index`;
1774
1774
  if (appId === global.info.pageInfo.appId) {
1775
1775
  Taro.navigateTo({
1776
1776
  url: `/${nowMiniPath}?${objectToUrlEncode(param)}`,
1777
1777
  }).catch((err) => {
1778
1778
  console.warn('跳转小程序页面错误:', err);
1779
1779
  });
1780
1780
  } else {
1781
1781
  const params = {
1782
1782
  category: 'jump',
1783
1783
  des: 'jdmp',
1784
1784
  appId,
1785
1785
  vapptype,
1786
1786
  param,
1787
1787
  path: '',
1788
1788
  };
1789
1789
  if (path) {
1790
1790
  params.path = `${path}.html`;
1791
1791
  }
1792
1792
  this.jdNavigateToNative(params);
1793
1793
  }
1794
1794
  }
1795
1795
 
1796
1796
  jdJumpToAppMiniProgram(
1797
1797
  path: string,
1798
1798
  param = {},
1799
1799
  successBack?: functionType,
1800
1800
  failBack?: functionType,
1801
1801
  ) {
1802
1802
  this.jdNavigateToNative(param, path, successBack, failBack);
1803
1803
  }
1804
1804
 
1805
1805
  jdNavigateToNative(
1806
1806
  params: object,
1807
1807
  url = OpenAppHost,
1808
1808
  successBack?: functionType | undefined,
1809
1809
  failBack?: functionType | undefined,
1810
1810
  ) {
1811
1811
  console.log('[降级H5] jdNavigateToNative jdJumJdApp:', params);
1812
1812
  const getResParams: JumpEventReportInterFace.JdMiniJumpParams = Object.assign(
1813
1813
  {},
1814
1814
  {
1815
1815
  sourceValue: 'sourceValue_jshopMini',
1816
1816
  sourceType: 'sourceType_jshopMini',
1817
1817
  param: {},
1818
1818
  },
1819
1819
  params,
1820
1820
  );
1821
1821
  const { logEventInfo, ...otherParams } = getResParams;
1822
1822
  console.log('jdNavigateToNative params: ', getResParams);
1823
1823
  console.log('logEventInfo params: ', logEventInfo);
1824
1824
  this.clickEventLog(logEventInfo || getResParams, getResParams.des);
1825
1825
  jd.navigateToNative({
1826
1826
  dataParam: {
1827
1827
  url: url,
1828
1828
  params: otherParams,
1829
1829
  },
1830
1830
  success(res) {
1831
1831
  typeof successBack === 'function' && successBack(res);
1832
1832
  console.log('navigateToNative.success', res);
1833
1833
  },
1834
1834
  fail(res) {
1835
1835
  typeof failBack === 'function' && failBack(res);
1836
1836
  console.log('navigateToNative.fail', res);
1837
1837
  },
1838
1838
  });
1839
1839
  }
1840
1840
 
1841
1841
  clickEventLog(opts: JumpEventReportInterFace.OptEventLogParams = {}, clickKey = 'click') {
1842
1842
  const { eventId, jsonParam, eventLevel = 3, skuId, ...otherParams } = opts;
1843
1843
  if (eventId && jsonParam) {
1844
1844
  const { etModelInfo, logBaseInfo } = jsonParam;
1845
1845
  let getJsonParam = {};
1846
1846
  if (etModelInfo && logBaseInfo) {
1847
1847
  getJsonParam = logBaseInfo;
1848
1848
  } else {
1849
1849
  if (Array.isArray(jsonParam)) {
1850
1850
  getJsonParam = jsonParam;
1851
1851
  } else {
1852
1852
  getJsonParam = Object.assign(
1853
1853
  {},
1854
1854
  {
1855
1855
  shopid: global.info.queryInfo?.shopId,
1856
1856
  },
1857
1857
  jsonParam,
1858
1858
  );
1859
1859
  }
1860
1860
  }
1861
1861
  if (
1862
1862
  clickKey === 'exposure' &&
1863
1863
  /^TerminatorNew/.test(eventId) &&
1864
1864
  !Array.isArray(getJsonParam)
1865
1865
  ) {
1866
1866
  getJsonParam = [getJsonParam];
1867
1867
  }
1868
1868
  const miniLogParams = {
1869
1869
  eid: eventId,
1870
1870
  elevel: eventLevel,
1871
1871
  eparam: JSON.stringify(getJsonParam),
1872
1872
  pageId: this.logPageId,
1873
1873
  pname: this.logPname,
1874
1874
  pparam: JSON.stringify(this.routerInfo.params),
1875
1875
  target: this.routerInfo.path,
1876
1876
  event: this.nativeEvent,
1877
1877
  ...otherParams,
1878
1878
  };
1879
1879
  if (clickKey === 'addToCart' && skuId) {
1880
1880
  miniLogParams['shoppingList'] = {
1881
1881
  [skuId]: 1,
1882
1882
  };
1883
1883
  }
1884
1884
  console.log('点击埋点参数对象', miniLogParams, clickKey);
1885
1885
  global.miniAppLogInstance && global.miniAppLogInstance[clickKey](miniLogParams);
1886
1886
  } else {
1887
1887
  console.log('暂无埋点参数eventId和eventParam');
1888
1888
  }
1889
1889
  }
1890
1890
 
1891
1891
  exposureEventLog(opts: JumpEventReportInterFace.OptEventLogParams = {}) {
1892
1892
  return this.clickEventLog(opts, 'exposure');
1893
1893
  }
1894
1894
 
1895
1895
  jdJumpToSearch(shopId, suggestWord) {
1896
1896
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId;
1897
1897
  this.jdNavigateToNative({
1898
1898
  category: 'jump',
1899
1899
  des: 'jshopGuessWord',
1900
1900
  shopId: String(shopId),
1901
1901
  transparentEnable: true,
1902
1902
  suggestWord,
1903
1903
  sourceInfo: APP_SOURCE_INFO,
1904
1904
  });
1905
1905
  }
1906
1906
 
1907
1907
  jdJumpToMyMessageBox() {
1908
1908
  this.jdNavigateToNative({
1909
1909
  category: 'jump',
1910
1910
  des: 'myMessageBox',
1911
1911
  });
1912
1912
  }
1913
1913
 
1914
1914
  jdJumpToAppHome() {
1915
1915
  this.jdNavigateToNative({
1916
1916
  category: 'jump',
1917
1917
  des: 'HomePage',
1918
1918
  });
1919
1919
  }
1920
1920
 
1921
1921
  jdJumpToShopHomeDetail({ shopId, venderId }) {
1922
1922
  this.jdNavigateToNative({
1923
1923
  category: 'jump',
1924
1924
  des: 'jshopDetail',
1925
1925
  shopId: String(shopId),
1926
1926
  venderId: String(venderId),
1927
1927
  });
1928
1928
  }
1929
1929
 
1930
1930
  jdJumpToShopLottery(shopTotalInfo) {
1931
1931
  this.jdNavigateToNative(
1932
1932
  Object.assign(
1933
1933
  {},
1934
1934
  {
1935
1935
  category: 'jump',
1936
1936
  des: 'jshopSign',
1937
1937
  activityRuleType: '0',
1938
1938
  shopId: global.info.queryInfo.shopId,
1939
1939
  venderId: global.info.queryInfo.venderId,
1940
1940
  },
1941
1941
  shopTotalInfo,
1942
1942
  ),
1943
1943
  );
1944
1944
  }
1945
1945
 
1946
1946
  jdJumpToSageAuthorHome(shopTotalInfo) {
1947
1947
  this.jdNavigateToNative(
1948
1948
  Object.assign(
1949
1949
  {},
1950
1950
  {
1951
1951
  category: 'jump',
1952
1952
  des: 'faxian_author',
1953
1953
  channel: 'shopHomePage',
1954
1954
  selectTab: '0',
1955
1955
  },
1956
1956
  shopTotalInfo,
1957
1957
  ),
1958
1958
  );
1959
1959
  }