@conecli/cone-render 0.10.1-shop-beta.37 → 0.10.1-shop-beta.40

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