@conecli/cone-render 0.10.1-shop3.66 → 0.10.1-shop3.67

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