@conecli/cone-render 0.10.1-shop3.1 → 0.10.1-shop3.10

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