@conecli/cone-render 0.10.1-shop3.9 → 0.10.1-shop3.91

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