@conecli/cone-render 0.10.1-shop3.2 → 0.10.1-shop3.21

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