@conecli/cone-render 0.10.1-shop3.5 → 0.10.1-shop3.50

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