@conecli/cone-render 0.10.1-isv2.1 → 0.10.1-isv2.2

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