@conecli/cone-render 0.10.1-shop-beta.22 → 0.10.1-shop-beta.24

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