@conecli/cone-render 0.10.1-shop3.3 → 0.10.1-shop3.30

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 (82) hide show
  1. package/README.md +1 -1
  2. package/dist/api/index.ts +1 -1
  3. package/dist/common/const.ts +1 -1
  4. package/dist/common/index.h5.ts +1 -1
  5. package/dist/common/index.jd.ts +1 -1
  6. package/dist/common/index.ts +1 -1
  7. package/dist/common/index.weapp.ts +1 -1
  8. package/dist/common/jssdk.ts +1 -1
  9. package/dist/common/token/index.h5.ts +1 -1
  10. package/dist/common/token/token.jd.ts +1 -1
  11. package/dist/common/wxappApi.ts +1 -1
  12. package/dist/components/base/CommonFloorHead/index.module.scss +126 -111
  13. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  14. package/dist/components/base/CountDown/index.tsx +1 -1
  15. package/dist/components/base/CustomScrollView/index-back.tsx +1 -0
  16. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  17. package/dist/components/base/Dialog/index.module.scss +11 -0
  18. package/dist/components/base/ExposureSmart/index.h5.module.scss +12 -2
  19. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  20. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  21. package/dist/components/base/InViewRender/index.tsx +1 -1
  22. package/dist/components/base/ItemViewExposureSmart/index.module.scss +2 -2
  23. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  24. package/dist/components/base/NetworkDataError/const.ts +1 -1
  25. package/dist/components/base/NetworkDataError/index.module.scss +117 -71
  26. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  27. package/dist/components/base/Price/Base/index.module.scss +12 -0
  28. package/dist/components/base/Price/Base/index.tsx +1 -1
  29. package/dist/components/base/Price/Double/index.module.scss +6 -0
  30. package/dist/components/base/Price/Double/index.tsx +1 -1
  31. package/dist/components/debug/DebugLayout/index.module.scss +2 -2
  32. package/dist/components/floorItem.weapp.tsx +1 -1
  33. package/dist/interface/common.ts +1 -1
  34. package/dist/interface/component.ts +1 -1
  35. package/dist/interface/jumpEventReport.ts +1 -1
  36. package/dist/interface/service.ts +1 -1
  37. package/dist/jumpEventReport/base.ts +1 -1
  38. package/dist/jumpEventReport/const.ts +1 -1
  39. package/dist/jumpEventReport/index.h5.ts +1 -1
  40. package/dist/jumpEventReport/index.jd.ts +1 -1
  41. package/dist/jumpEventReport/index.weapp.ts +1 -1
  42. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  43. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  44. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  45. package/dist/jumpEventReport/web/report.ts +1 -1
  46. package/dist/jumpEventReport/web.base.ts +1 -1
  47. package/dist/jumpEventReport/web.jd.ts +1 -1
  48. package/dist/jumpEventReport/web.pc.ts +1 -1
  49. package/dist/jumpEventReport/web.tjm.ts +1 -1
  50. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  51. package/dist/language/en_US.json +176 -0
  52. package/dist/language/zh_CN.json +176 -0
  53. package/dist/language/zh_HK.json +176 -0
  54. package/dist/libs/taroAppReport.js +2 -2
  55. package/dist/modules/ContainerFloorList/index.h5.module.scss +66 -53
  56. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  57. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  58. package/dist/open/api/environment.ts +1 -1
  59. package/dist/open/api/shopMember.ts +1 -1
  60. package/dist/open/api/util.ts +1 -1
  61. package/dist/sass/app.h5.scss +273 -224
  62. package/dist/service/fetchGateway.ts +1 -1
  63. package/dist/service/fetchGateway.weapp.ts +1 -0
  64. package/dist/service/http/colorSign.ts +1 -1
  65. package/dist/service/http/const.ts +1 -1
  66. package/dist/service/http/h5Http.ts +1 -1
  67. package/dist/service/requestServer.h5.ts +1 -1
  68. package/dist/service/requestServer.ts +1 -1
  69. package/dist/service/requestServer.weapp.ts +1 -0
  70. package/dist/utils/connectNativeJsBridge.ts +1 -1
  71. package/dist/utils/h5Utils.ts +1 -1
  72. package/dist/utils/index.h5.ts +1 -1
  73. package/dist/utils/index.ts +1 -1
  74. package/dist/utils/index.weapp.ts +1 -1
  75. package/dist/utils/jumpExtMapUtil.h5.ts +1 -0
  76. package/dist/utils/jumpExtMapUtil.ts +1 -0
  77. package/dist/utils/log.ts +1 -0
  78. package/dist/utils/sColor.js +1 -0
  79. package/dist/utils/utils.ts +1 -1
  80. package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
  81. package/dist/wxapp/common/user_info.js +1 -1
  82. 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: JumpEventReportInterFace.ShopIdsInfo = {}) {
1024
1024
  console.log('[降级H5] jdJumpToShopHome jdJumpJdApp');
1025
1025
  const currentShopInfo = {
1026
1026
  shopId: global.info.queryInfo.shopId,
1027
1027
  venderId: global.info.queryInfo.venderId,
1028
1028
  };
1029
1029
  const restParams =
1030
1030
  (shopInfo?.shopId && shopInfo.shopId !== currentShopInfo.shopId) ||
1031
1031
  (shopInfo?.venderId && shopInfo.venderId !== currentShopInfo.venderId)
1032
1032
  ? {}
1033
1033
  : currentShopInfo;
1034
1034
  const getInfo = Object.assign({}, restParams, shopInfo);
1035
1035
  const getShopParams = this.getShopIdsInfo(getInfo);
1036
1036
  this.jdJumpToShopBase(getShopParams);
1037
1037
  }
1038
1038
 
1039
1039
  jdJumpToShopHomeInner(shopInfo: JumpEventReportInterFace.ShopIdsInfo = {}) {
1040
1040
  const getParam = Object.assign(
1041
1041
  {},
1042
1042
  {
1043
1043
  jumpTab: HOME_TOP_TAB_TYPE_APP.HOME,
1044
1044
  operation: 'jumpTabInner',
1045
1045
  },
1046
1046
  shopInfo,
1047
1047
  );
1048
1048
  this.jdJumpToShopBase(getParam);
1049
1049
  }
1050
1050
 
1051
1051
  jdJumpToUnifieddetail(sourceInfo) {
1052
1052
  this.jdNavigateToNative(
1053
1053
  Object.assign(
1054
1054
  {},
1055
1055
  {
1056
1056
  category: 'jump',
1057
1057
  des: 'unifieddetail',
1058
1058
  },
1059
1059
  sourceInfo,
1060
1060
  ),
1061
1061
  );
1062
1062
  }
1063
1063
 
1064
1064
  jdJumpToVideoImmersion(sourceInfo) {
1065
1065
  this.jdNavigateToNative(
1066
1066
  Object.assign(
1067
1067
  {},
1068
1068
  {
1069
1069
  category: 'jump',
1070
1070
  des: 'VideoImmersion',
1071
1071
  },
1072
1072
  sourceInfo,
1073
1073
  ),
1074
1074
  );
1075
1075
  }
1076
1076
 
1077
1077
  jdJumpToShopMember(shopInfo) {
1078
1078
  this.jdNavigateToNative(
1079
1079
  Object.assign(
1080
1080
  {},
1081
1081
  {
1082
1082
  category: 'jump',
1083
1083
  des: 'jshopMember',
1084
1084
  followAward: '-1',
1085
1085
  },
1086
1086
  shopInfo,
1087
1087
  ),
1088
1088
  );
1089
1089
  }
1090
1090
 
1091
1091
  jdJumpToMemberTab(shopInfo?) {
1092
1092
  this.jdNavigateToNative(
1093
1093
  Object.assign(
1094
1094
  {},
1095
1095
  {
1096
1096
  category: 'jump',
1097
1097
  des: 'jshopMain',
1098
1098
  shopId: global.info.queryInfo.shopId,
1099
1099
  venderId: global.info.queryInfo.venderId,
1100
1100
  operation: 'jumpBottomTabMember',
1101
1101
  sourceInfo: APP_SOURCE_INFO,
1102
1102
  },
1103
1103
  shopInfo,
1104
1104
  ),
1105
1105
  );
1106
1106
  }
1107
1107
 
1108
1108
  jdJumpToDongDongChatGroup(groupId, source = 'jdmini') {
1109
1109
  this.jdNavigateToNative({
1110
1110
  category: 'jump',
1111
1111
  des: 'dongdong_group_chat',
1112
1112
  source: source,
1113
1113
  groupId: `${groupId}`,
1114
1114
  });
1115
1115
  }
1116
1116
 
1117
1117
  jdJumpToDongDongChat(paramInfo: any = {}) {
1118
1118
  const { venderId, ...otherParams } = paramInfo;
1119
1119
  this.jdNavigateToNative(
1120
1120
  Object.assign(
1121
1121
  {},
1122
1122
  {
1123
1123
  category: 'jump',
1124
1124
  des: 'jd_dongdong_chat',
1125
1125
  venderId: `${venderId ? venderId : global.info.queryInfo?.venderId}`,
1126
1126
  entry: 'm_shop',
1127
1127
  },
1128
1128
  otherParams,
1129
1129
  ),
1130
1130
  );
1131
1131
  }
1132
1132
 
1133
1133
  jdJumpToShopActivity(shopInfo) {
1134
1134
  const getParams = Object.assign(
1135
1135
  {},
1136
1136
  {
1137
1137
  category: 'jump',
1138
1138
  des: 'jshopActivity',
1139
1139
  shopId: global.info.queryInfo.shopId,
1140
1140
  venderId: global.info.queryInfo.venderId,
1141
1141
  },
1142
1142
  shopInfo,
1143
1143
  );
1144
1144
  getParams['projectId'] && (getParams['projectId'] = `${getParams['projectId']}`);
1145
1145
  this.jdNavigateToNative(getParams);
1146
1146
  }
1147
1147
 
1148
1148
  jdJumpToShopActivityPage(shopInfo) {
1149
1149
  this.jdNavigateToNative(
1150
1150
  Object.assign(
1151
1151
  {},
1152
1152
  {
1153
1153
  category: 'jump',
1154
1154
  des: 'jshopActivityPage',
1155
1155
  shopId: global.info.queryInfo.shopId,
1156
1156
  title: global.info.queryInfo?.shopName,
1157
1157
  },
1158
1158
  shopInfo,
1159
1159
  ),
1160
1160
  );
1161
1161
  }
1162
1162
 
1163
1163
  jdJumpToShopDetail(shopInfo) {
1164
1164
  this.jdNavigateToNative(
1165
1165
  Object.assign(
1166
1166
  {},
1167
1167
  {
1168
1168
  category: 'jump',
1169
1169
  des: 'jshopDetail',
1170
1170
  shopId: global.info.queryInfo.shopId,
1171
1171
  venderId: global.info.queryInfo.venderId,
1172
1172
  sourceInfo: APP_SOURCE_INFO,
1173
1173
  },
1174
1174
  shopInfo,
1175
1175
  ),
1176
1176
  );
1177
1177
  }
1178
1178
 
1179
1179
  jdJumpToShopMemberCard(shopInfo) {
1180
1180
  const { url, logEventInfo } = shopInfo;
1181
1181
  if (this.isOpenJdAppUrl(url)) {
1182
1182
  const getOpenAppParams = this.jdOpenAppParams(url);
1183
1183
  console.log('jd web 获取自定义openApp链接解析后的参数结果', getOpenAppParams);
1184
1184
  if (getOpenAppParams) {
1185
1185
  this.jdNavigateToNative(Object.assign({}, getOpenAppParams, { logEventInfo }));
1186
1186
  }
1187
1187
  } else {
1188
1188
  super.jdJumpToWeb(url, {
1189
1189
  ...logEventInfo,
1190
1190
  });
1191
1191
  }
1192
1192
  }
1193
1193
 
1194
1194
  jdJumpToTotalPromotion(shopInfo) {
1195
1195
  const { url, logEventInfo } = shopInfo;
1196
1196
  if (this.isOpenJdAppUrl(url)) {
1197
1197
  const getOpenAppParams = this.jdOpenAppParams(url);
1198
1198
  console.log('jd web 获取自定义openApp链接解析后的参数结果', getOpenAppParams);
1199
1199
  if (getOpenAppParams) {
1200
1200
  this.jdNavigateToNative(Object.assign({}, getOpenAppParams, { logEventInfo }));
1201
1201
  }
1202
1202
  } else {
1203
1203
  super.jdJumpToWeb(url, {
1204
1204
  ...logEventInfo,
1205
1205
  });
1206
1206
  }
1207
1207
  }
1208
1208
 
1209
1209
  jdJumpToShopSearch(pageInfo = {}) {
1210
1210
  const getInfo = Object.assign(
1211
1211
  {},
1212
1212
  {
1213
1213
  shopId: global.info.queryInfo.shopId,
1214
1214
  venderId: global.info.queryInfo.venderId,
1215
1215
  sourceInfo: APP_SOURCE_INFO,
1216
1216
  },
1217
1217
  pageInfo,
1218
1218
  );
1219
1219
  const { keyword = '', categoryId = '', ...otherPageInfo }: any = getInfo;
1220
1220
  const searchInfo = {};
1221
1221
  if (categoryId !== '') {
1222
1222
  searchInfo['categoryId'] = typeof categoryId === 'string' ? categoryId?.trim() : categoryId;
1223
1223
  searchInfo['searchType'] = '5';
1224
1224
  } else if (keyword !== '') {
1225
1225
  searchInfo['keyWord'] = keyword;
1226
1226
  searchInfo['searchType'] = '4';
1227
1227
  }
1228
1228
  const openAppParam = {
1229
1229
  category: 'jump',
1230
1230
  des: 'jshopProductList',
1231
1231
  pageId: '1',
1232
1232
  ...searchInfo,
1233
1233
  };
1234
1234
  const jumpExtMap = getEnterShopExtInfo();
1235
1235
  if (jumpExtMap) {
1236
1236
  openAppParam.jumpExtMap = jumpExtMap;
1237
1237
  }
1238
1238
  this.jdNavigateToNative(Object.assign({}, openAppParam, otherPageInfo));
1239
1239
  }
1240
1240
 
1241
1241
  jdJumpToOrderList(logEventInfo = {}) {
1242
1242
  this.jdNavigateToNative(
1243
1243
  Object.assign(
1244
1244
  {},
1245
1245
  {
1246
1246
  category: 'jump',
1247
1247
  des: 'orderlist',
1248
1248
  from: 'dphycc',
1249
1249
  },
1250
1250
  logEventInfo,
1251
1251
  ),
1252
1252
  );
1253
1253
  }
1254
1254
 
1255
1255
  jdJumpToCouponSearchProductList(couponId, logEventInfo = {}) {
1256
1256
  this.jdNavigateToNative(
1257
1257
  Object.assign(
1258
1258
  {},
1259
1259
  {
1260
1260
  category: 'jump',
1261
1261
  des: 'productList',
1262
1262
  from: 'couponBatch',
1263
1263
  couponId: `${couponId}`,
1264
1264
  logEventInfo,
1265
1265
  },
1266
1266
  ),
1267
1267
  );
1268
1268
  }
1269
1269
 
1270
1270
  jdJumpToTabAllProduct(shopId, venderId, logEventInfo = {}) {
1271
1271
  console.log('jdJumpJdApp - jdJumpToTabAllProduct');
1272
1272
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId;
1273
1273
  if (typeof venderId === 'undefined') venderId = global.info.queryInfo.venderId;
1274
1274
  this.jdNavigateToNative(
1275
1275
  Object.assign(
1276
1276
  {},
1277
1277
  {
1278
1278
  category: 'jump',
1279
1279
  des: 'jshopMain',
1280
1280
  jumpTab: 'allProduct',
1281
1281
  },
1282
1282
  shopId !== 'undefined'
1283
1283
  ? {
1284
1284
  shopId,
1285
1285
  }
1286
1286
  : {},
1287
1287
  venderId !== 'undefined'
1288
1288
  ? {
1289
1289
  venderId,
1290
1290
  }
1291
1291
  : {},
1292
1292
  {
1293
1293
  logEventInfo,
1294
1294
  },
1295
1295
  ),
1296
1296
  );
1297
1297
  }
1298
1298
 
1299
1299
  jdJumpToTabAllProductInner(shopId, venderId, logEventInfo = {}) {
1300
1300
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId;
1301
1301
  if (typeof venderId === 'undefined') venderId = global.info.queryInfo.venderId;
1302
1302
  this.jdNavigateToNative(
1303
1303
  Object.assign(
1304
1304
  {},
1305
1305
  {
1306
1306
  category: 'jump',
1307
1307
  des: 'jshopMain',
1308
1308
  jumpTab: 'allProduct',
1309
1309
  operation: 'jumpTabInner',
1310
1310
  },
1311
1311
  shopId !== 'undefined'
1312
1312
  ? {
1313
1313
  shopId,
1314
1314
  }
1315
1315
  : {},
1316
1316
  venderId !== 'undefined'
1317
1317
  ? {
1318
1318
  venderId,
1319
1319
  }
1320
1320
  : {},
1321
1321
  {
1322
1322
  logEventInfo,
1323
1323
  },
1324
1324
  ),
1325
1325
  );
1326
1326
  }
1327
1327
 
1328
1328
  jdJumpToShopBase(shopInfo) {
1329
1329
  console.log('[降级H5] jdJumpToShopBase jdJumpJdApp');
1330
1330
  const currentShopInfo = {
1331
1331
  shopId: global.info.queryInfo.shopId,
1332
1332
  venderId: global.info.queryInfo.venderId,
1333
1333
  };
1334
1334
  const restParams =
1335
1335
  (shopInfo?.shopId && shopInfo.shopId !== currentShopInfo.shopId) ||
1336
1336
  (shopInfo?.venderId && shopInfo.venderId !== currentShopInfo.venderId)
1337
1337
  ? {}
1338
1338
  : currentShopInfo;
1339
1339
  const getParam = Object.assign(
1340
1340
  {},
1341
1341
  {
1342
1342
  category: 'jump',
1343
1343
  des: 'jshopMain',
1344
1344
  jumpTab: HOME_TOP_TAB_TYPE_APP.HOME,
1345
1345
  ...restParams,
1346
1346
  sourceInfo: APP_SOURCE_INFO,
1347
1347
  },
1348
1348
  shopInfo,
1349
1349
  );
1350
1350
  this.jdNavigateToNative(getParam);
1351
1351
  }
1352
1352
 
1353
1353
  jdJumpToTabNew(shopInfo = {}) {
1354
1354
  const getParam = Object.assign(
1355
1355
  {},
1356
1356
  {
1357
1357
  jumpTab: HOME_TOP_TAB_TYPE_APP.NEW,
1358
1358
  },
1359
1359
  shopInfo,
1360
1360
  );
1361
1361
  this.jdJumpToShopBase(getParam);
1362
1362
  }
1363
1363
 
1364
1364
  jdJumpToTabNewInner(shopInfo = {}) {
1365
1365
  const getParam = Object.assign(
1366
1366
  {},
1367
1367
  {
1368
1368
  jumpTab: HOME_TOP_TAB_TYPE_APP.NEW,
1369
1369
  operation: 'jumpTabInner',
1370
1370
  },
1371
1371
  shopInfo,
1372
1372
  );
1373
1373
  this.jdJumpToShopBase(getParam);
1374
1374
  }
1375
1375
  jdJumpToTabRank(shopInfo = {}) {
1376
1376
  const getParam = Object.assign(
1377
1377
  {},
1378
1378
  {
1379
1379
  jumpTab: HOME_TOP_TAB_TYPE_APP.RANK,
1380
1380
  },
1381
1381
  shopInfo,
1382
1382
  );
1383
1383
  this.jdJumpToShopBase(getParam);
1384
1384
  }
1385
1385
  jdJumpToTabRankInner(shopInfo = {}) {
1386
1386
  const getParam = Object.assign(
1387
1387
  {},
1388
1388
  {
1389
1389
  jumpTab: HOME_TOP_TAB_TYPE_APP.RANK,
1390
1390
  operation: 'jumpTabInner',
1391
1391
  },
1392
1392
  shopInfo,
1393
1393
  );
1394
1394
  this.jdJumpToShopBase(getParam);
1395
1395
  }
1396
1396
  jdJumpToTabBuyerShow(shopInfo = {}) {
1397
1397
  const getParam = Object.assign(
1398
1398
  {},
1399
1399
  {
1400
1400
  jumpTab: HOME_TOP_TAB_TYPE_APP.BUYERSHOW,
1401
1401
  },
1402
1402
  shopInfo,
1403
1403
  );
1404
1404
  this.jdJumpToShopBase(getParam);
1405
1405
  }
1406
1406
  jdJumpToTabBuyerShowInner(shopInfo = {}) {
1407
1407
  const getParam = Object.assign(
1408
1408
  {},
1409
1409
  {
1410
1410
  jumpTab: HOME_TOP_TAB_TYPE_APP.BUYERSHOW,
1411
1411
  operation: 'jumpTabInner',
1412
1412
  },
1413
1413
  shopInfo,
1414
1414
  );
1415
1415
  this.jdJumpToShopBase(getParam);
1416
1416
  }
1417
1417
  jdJumpToTabActivity(shopInfo = {}) {
1418
1418
  const getParam = Object.assign(
1419
1419
  {},
1420
1420
  {
1421
1421
  jumpTab: HOME_TOP_TAB_TYPE_APP.ACTIVITY,
1422
1422
  },
1423
1423
  shopInfo,
1424
1424
  );
1425
1425
  this.jdJumpToShopBase(getParam);
1426
1426
  }
1427
1427
  jdJumpToTabActivityInner(shopInfo = {}) {
1428
1428
  const getParam = Object.assign(
1429
1429
  {},
1430
1430
  {
1431
1431
  jumpTab: HOME_TOP_TAB_TYPE_APP.ACTIVITY,
1432
1432
  operation: 'jumpTabInner',
1433
1433
  },
1434
1434
  shopInfo,
1435
1435
  );
1436
1436
  this.jdJumpToShopBase(getParam);
1437
1437
  }
1438
1438
  jdJumpToTabSecKill(shopInfo = {}) {
1439
1439
  const getParam = Object.assign(
1440
1440
  {},
1441
1441
  {
1442
1442
  jumpTab: HOME_TOP_TAB_TYPE_APP.SECKILL,
1443
1443
  },
1444
1444
  shopInfo,
1445
1445
  );
1446
1446
  this.jdJumpToShopBase(getParam);
1447
1447
  }
1448
1448
  jdJumpToTabSecKillInner(shopInfo = {}) {
1449
1449
  const getParam = Object.assign(
1450
1450
  {},
1451
1451
  {
1452
1452
  jumpTab: HOME_TOP_TAB_TYPE_APP.SECKILL,
1453
1453
  operation: 'jumpTabInner',
1454
1454
  },
1455
1455
  shopInfo,
1456
1456
  );
1457
1457
  this.jdJumpToShopBase(getParam);
1458
1458
  }
1459
1459
 
1460
1460
  jdJumpToBottomTabBase(type, shopInfo = {}) {
1461
1461
  this.jdNavigateToNative(
1462
1462
  Object.assign(
1463
1463
  {},
1464
1464
  {
1465
1465
  category: 'jump',
1466
1466
  des: 'jshopMain',
1467
1467
  shopId: global.info.queryInfo.shopId,
1468
1468
  venderId: global.info.queryInfo.venderId,
1469
1469
  jumpBottomTab: type,
1470
1470
  sourceInfo: APP_SOURCE_INFO,
1471
1471
  },
1472
1472
  shopInfo,
1473
1473
  ),
1474
1474
  );
1475
1475
  }
1476
1476
 
1477
1477
  jdJumpToBottomTabProduct(shopInfo = {}) {
1478
1478
  this.jdJumpToBottomTabBase(BOTTOM_TAB_TYPE_APP.PRODUCT, shopInfo);
1479
1479
  }
1480
1480
 
1481
1481
  jdJumpToBottomTabCategory(shopInfo = {}) {
1482
1482
  this.jdJumpToBottomTabBase(BOTTOM_TAB_TYPE_APP.CATEGORY, shopInfo);
1483
1483
  }
1484
1484
 
1485
1485
  jdJumpToBottomTabFind(shopInfo = {}) {
1486
1486
  this.jdJumpToBottomTabBase(BOTTOM_TAB_TYPE_APP.FIND, shopInfo);
1487
1487
  }
1488
1488
 
1489
1489
  jdJumpToBottomTabBrandMember(shopInfo = {}) {
1490
1490
  this.jdJumpToBottomTabBase(BOTTOM_TAB_TYPE_APP.BRANDMEMBER, shopInfo);
1491
1491
  }
1492
1492
 
1493
1493
  jdJumpToBottomTabBrandMemberInner(shopInfo = {}) {
1494
1494
  this.jdJumpToMemberTab(shopInfo);
1495
1495
  }
1496
1496
 
1497
1497
  jdJumpToWeb(
1498
1498
  url,
1499
1499
  logEventInfo,
1500
1500
  successBack?: functionType | undefined,
1501
1501
  failBack?: functionType | undefined,
1502
1502
  ) {
1503
1503
  const changeUrl = /^\/\//.test(url) ? `https:${url}` : url;
1504
1504
  this.jdNavigateToNative(
1505
1505
  {
1506
1506
  category: 'jump',
1507
1507
  des: 'm',
1508
1508
  url: encodeURIComponent(changeUrl),
1509
1509
  logEventInfo,
1510
1510
  },
1511
1511
  OpenAppHost,
1512
1512
  successBack,
1513
1513
  failBack,
1514
1514
  );
1515
1515
  }
1516
1516
 
1517
1517
  jdJumpToLive(clickUrlOrObj, logEventInfo) {
1518
1518
  if (typeof clickUrlOrObj === 'object') {
1519
1519
  this.jdNavigateToNative({
1520
1520
  category: 'jump',
1521
1521
  des: 'LivePlayerRoom',
1522
1522
  liveOrigin: '1',
1523
1523
  needLogin: '0',
1524
1524
  isNeedVideo: true,
1525
1525
  logEventInfo,
1526
1526
  ...clickUrlOrObj,
1527
1527
  });
1528
1528
  } else {
1529
1529
  const getShopLiveParams = this.jdOpenAppParams(clickUrlOrObj);
1530
1530
  console.log('getShopLiveParams=====', getShopLiveParams);
1531
1531
  if (typeof getShopLiveParams === 'object') {
1532
1532
  this.jdNavigateToNative({
1533
1533
  ...getShopLiveParams,
1534
1534
  logEventInfo,
1535
1535
  });
1536
1536
  }
1537
1537
  }
1538
1538
  }
1539
1539
 
1540
1540
  jdJumpToUgcContent(urlObj, logEventInfo = {}) {
1541
1541
  if (typeof urlObj === 'object') {
1542
1542
  this.jdNavigateToNative({
1543
1543
  category: 'jump',
1544
1544
  des: 'shareOrderUgcContent',
1545
1545
  channel: 'shopshangxin',
1546
1546
  cmtType: '10',
1547
1547
  isNeedVideo: true,
1548
1548
  ...urlObj,
1549
1549
  logEventInfo,
1550
1550
  });
1551
1551
  } else {
1552
1552
  const getShopUgcParams = this.jdOpenAppParams(urlObj);
1553
1553
  if (getShopUgcParams) {
1554
1554
  getShopUgcParams['logEventInfo'] = logEventInfo;
1555
1555
  console.log('getShopUgcParams=====', getShopUgcParams);
1556
1556
  getShopUgcParams && this.jdNavigateToNative(getShopUgcParams as string);
1557
1557
  }
1558
1558
  }
1559
1559
  }
1560
1560
 
1561
1561
  jdJumpToSeckillNewBrand(brandId) {
1562
1562
  this.jdNavigateToNative({
1563
1563
  category: 'jump',
1564
1564
  des: 'seckillnewbrand',
1565
1565
  brandId: `${brandId}`,
1566
1566
  });
1567
1567
  }
1568
1568
 
1569
1569
  jdJumpToJshopDynamicDetail(info) {
1570
1570
  this.jdNavigateToNative({
1571
1571
  category: 'jump',
1572
1572
  des: 'jshopDynamicDetail',
1573
1573
  shopId: global.info.queryInfo.shopId,
1574
1574
  venderId: global.info.queryInfo.venderId,
1575
1575
  ...info,
1576
1576
  });
1577
1577
  }
1578
1578
 
1579
1579
  jdJumpToRankList(rankingId, rankType, logEventInfo) {
1580
1580
  this.jdNavigateToNative(
1581
1581
  Object.assign(
1582
1582
  {},
1583
1583
  {
1584
1584
  category: 'jump',
1585
1585
  des: 'jdreactcommon',
1586
1586
  modulename: 'JDReactRankingList',
1587
1587
  appname: 'JDReactRankingList',
1588
1588
  transparentenable: true,
1589
1589
  ishidden: true,
1590
1590
  param: {
1591
1591
  contentId: '' + rankingId,
1592
1592
  fromSkuId: '',
1593
1593
  detailPageType: '5',
1594
1594
  rankType: rankType || 10 + '',
1595
1595
  },
1596
1596
  logEventInfo,
1597
1597
  },
1598
1598
  ),
1599
1599
  );
1600
1600
  }
1601
1601
 
1602
1602
  jdJumpToFlashSaleTab(logEventInfo) {
1603
1603
  this.jdNavigateToNative(
1604
1604
  Object.assign(
1605
1605
  {},
1606
1606
  {
1607
1607
  category: 'jump',
1608
1608
  des: 'jshopMain',
1609
1609
  jumpTab: 'flashPurchase',
1610
1610
  shopId: global.info.queryInfo.shopId,
1611
1611
  venderId: global.info.queryInfo.venderId,
1612
1612
  sourceType: 'JDReactShopActivityTAB',
1613
1613
  sourceValue: '2',
1614
1614
  operation: 'jumpTabInner',
1615
1615
  logEventInfo,
1616
1616
  },
1617
1617
  ),
1618
1618
  );
1619
1619
  }
1620
1620
 
1621
1621
 
1622
1622
  jdJumpToShopMemberInfo(logEventInfo) {
1623
1623
  this.jdNavigateToNative(
1624
1624
  Object.assign(
1625
1625
  {},
1626
1626
  {
1627
1627
  category: 'jump',
1628
1628
  des: 'jdreactcommon',
1629
1629
  modulename: 'JDReactShopMember',
1630
1630
  appname: 'JDReactShopMember',
1631
1631
  ishidden: true,
1632
1632
  param: {
1633
1633
  page: 'memberInfo',
1634
1634
  shopId: global.info.queryInfo.shopId,
1635
1635
  venderId: global.info.queryInfo.venderId,
1636
1636
  },
1637
1637
  logEventInfo,
1638
1638
  },
1639
1639
  ),
1640
1640
  );
1641
1641
  }
1642
1642
 
1643
1643
  jdJumpToShopMemberBenefit(logEventInfo) {
1644
1644
  const venderId = global.info.queryInfo.venderId;
1645
1645
  const shopId = global.info.queryInfo.shopId;
1646
1646
  this.jdJumpToWeb(
1647
1647
  `${this.jumpWebUrl.memberBenefit}?venderId=${venderId}&shopId=${shopId}`,
1648
1648
  logEventInfo,
1649
1649
  );
1650
1650
  }
1651
1651
 
1652
1652
  jdJumpToShopMemberPointExchange(venderType, levelZeroMenuUrl, logEventInfo) {
1653
1653
  this.jdNavigateToNative(
1654
1654
  Object.assign(
1655
1655
  {},
1656
1656
  {
1657
1657
  category: 'jump',
1658
1658
  des: 'jdreactcommon',
1659
1659
  modulename: 'JDReactShopMember',
1660
1660
  appname: 'JDReactShopMember',
1661
1661
  ishidden: true,
1662
1662
  param: {
1663
1663
  page: 'pointsExchangePage',
1664
1664
  shopId: global.info.queryInfo.shopId,
1665
1665
  venderId: global.info.queryInfo.venderId,
1666
1666
  levelZeroMenuUrl,
1667
1667
  },
1668
1668
  logEventInfo,
1669
1669
  },
1670
1670
  ),
1671
1671
  );
1672
1672
  }
1673
1673
 
1674
1674
  jdJumpToShopMemberBonusPurchase(customerLevel, logEventInfo) {
1675
1675
  this.jdNavigateToNative(
1676
1676
  Object.assign(
1677
1677
  {},
1678
1678
  {
1679
1679
  category: 'jump',
1680
1680
  des: 'jdreactcommon',
1681
1681
  modulename: 'JDReactShopMember',
1682
1682
  appname: 'JDReactShopMember',
1683
1683
  ishidden: true,
1684
1684
  param: {
1685
1685
  page: 'bonusPurchase',
1686
1686
  shopId: global.info.queryInfo.shopId,
1687
1687
  venderId: global.info.queryInfo.venderId,
1688
1688
  customerLevel,
1689
1689
  },
1690
1690
  logEventInfo,
1691
1691
  },
1692
1692
  ),
1693
1693
  );
1694
1694
  }
1695
1695
 
1696
1696
  jdJumpToMyRedEnvelope(logEventInfo) {
1697
1697
  this.jdNavigateToNative(
1698
1698
  Object.assign(
1699
1699
  {},
1700
1700
  {
1701
1701
  category: 'jump',
1702
1702
  des: 'jdreactcommon',
1703
1703
  modulename: 'JDReactMyRedEnvelope',
1704
1704
  appname: 'JDReactMyRedEnvelope',
1705
1705
  ishidden: true,
1706
1706
  fromName: 2,
1707
1707
  needLogin: true,
1708
1708
  logEventInfo,
1709
1709
  },
1710
1710
  ),
1711
1711
  );
1712
1712
  }
1713
1713
 
1714
1714
  jdJumpToMyCoupon(logEventInfo) {
1715
1715
  this.jdNavigateToNative(
1716
1716
  Object.assign(
1717
1717
  {},
1718
1718
  {
1719
1719
  category: 'jump',
1720
1720
  des: 'mycoupon',
1721
1721
  logEventInfo,
1722
1722
  },
1723
1723
  ),
1724
1724
  );
1725
1725
  }
1726
1726
 
1727
1727
 
1728
1728
  jdJumpToMiniProgram({ vapptype, appId, path, param }) {
1729
1729
  const pageName = param['pageType'] || 'home';
1730
1730
  const nowMiniPath = `pages/${pageName}/index`;
1731
1731
  if (appId === global.info.pageInfo.appId) {
1732
1732
  Taro.navigateTo({
1733
1733
  url: `/${nowMiniPath}?${objectToUrlEncode(param)}`,
1734
1734
  }).catch((err) => {
1735
1735
  console.warn('跳转小程序页面错误:', err);
1736
1736
  });
1737
1737
  } else {
1738
1738
  const params = {
1739
1739
  category: 'jump',
1740
1740
  des: 'jdmp',
1741
1741
  appId,
1742
1742
  vapptype,
1743
1743
  param,
1744
1744
  path: '',
1745
1745
  };
1746
1746
  if (path) {
1747
1747
  params.path = `${path}.html`;
1748
1748
  }
1749
1749
  this.jdNavigateToNative(params);
1750
1750
  }
1751
1751
  }
1752
1752
 
1753
1753
  jdJumpToAppMiniProgram(
1754
1754
  path: string,
1755
1755
  param = {},
1756
1756
  successBack?: functionType,
1757
1757
  failBack?: functionType,
1758
1758
  ) {
1759
1759
  this.jdNavigateToNative(param, path, successBack, failBack);
1760
1760
  }
1761
1761
 
1762
1762
  jdNavigateToNative(
1763
1763
  params: object,
1764
1764
  url = OpenAppHost,
1765
1765
  successBack?: functionType | undefined,
1766
1766
  failBack?: functionType | undefined,
1767
1767
  ) {
1768
1768
  console.log('[降级H5] jdNavigateToNative jdJumJdApp:', params);
1769
1769
  const getResParams: JumpEventReportInterFace.JdMiniJumpParams = Object.assign(
1770
1770
  {},
1771
1771
  {
1772
1772
  sourceValue: 'sourceValue_jshopMini',
1773
1773
  sourceType: 'sourceType_jshopMini',
1774
1774
  param: {},
1775
1775
  },
1776
1776
  params,
1777
1777
  );
1778
1778
  const { logEventInfo, ...otherParams } = getResParams;
1779
1779
  console.log('jdNavigateToNative params: ', getResParams);
1780
1780
  console.log('logEventInfo params: ', logEventInfo);
1781
1781
  this.clickEventLog(logEventInfo || getResParams, getResParams.des);
1782
1782
  jd.navigateToNative({
1783
1783
  dataParam: {
1784
1784
  url: url,
1785
1785
  params: otherParams,
1786
1786
  },
1787
1787
  success(res) {
1788
1788
  typeof successBack === 'function' && successBack(res);
1789
1789
  console.log('navigateToNative.success', res);
1790
1790
  },
1791
1791
  fail(res) {
1792
1792
  typeof failBack === 'function' && failBack(res);
1793
1793
  console.log('navigateToNative.fail', res);
1794
1794
  },
1795
1795
  });
1796
1796
  }
1797
1797
 
1798
1798
  clickEventLog(opts: JumpEventReportInterFace.OptEventLogParams = {}, clickKey = 'click') {
1799
1799
  const { eventId, jsonParam, eventLevel = 3, skuId, ...otherParams } = opts;
1800
1800
  if (eventId && jsonParam) {
1801
1801
  const { etModelInfo, logBaseInfo } = jsonParam;
1802
1802
  let getJsonParam = {};
1803
1803
  if (etModelInfo && logBaseInfo) {
1804
1804
  getJsonParam = logBaseInfo;
1805
1805
  } else {
1806
1806
  if (Array.isArray(jsonParam)) {
1807
1807
  getJsonParam = jsonParam;
1808
1808
  } else {
1809
1809
  getJsonParam = Object.assign(
1810
1810
  {},
1811
1811
  {
1812
1812
  shopid: global.info.queryInfo?.shopId,
1813
1813
  },
1814
1814
  jsonParam,
1815
1815
  );
1816
1816
  }
1817
1817
  }
1818
1818
  if (
1819
1819
  clickKey === 'exposure' &&
1820
1820
  /^TerminatorNew/.test(eventId) &&
1821
1821
  !Array.isArray(getJsonParam)
1822
1822
  ) {
1823
1823
  getJsonParam = [getJsonParam];
1824
1824
  }
1825
1825
  const miniLogParams = {
1826
1826
  eid: eventId,
1827
1827
  elevel: eventLevel,
1828
1828
  eparam: JSON.stringify(getJsonParam),
1829
1829
  pageId: this.logPageId,
1830
1830
  pname: this.logPname,
1831
1831
  pparam: JSON.stringify(this.routerInfo.params),
1832
1832
  target: this.routerInfo.path,
1833
1833
  event: this.nativeEvent,
1834
1834
  ...otherParams,
1835
1835
  };
1836
1836
  if (clickKey === 'addToCart' && skuId) {
1837
1837
  miniLogParams['shoppingList'] = {
1838
1838
  [skuId]: 1,
1839
1839
  };
1840
1840
  }
1841
1841
  console.log('点击埋点参数对象', miniLogParams, clickKey);
1842
1842
  global.miniAppLogInstance && global.miniAppLogInstance[clickKey](miniLogParams);
1843
1843
  } else {
1844
1844
  console.log('暂无埋点参数eventId和eventParam');
1845
1845
  }
1846
1846
  }
1847
1847
 
1848
1848
  exposureEventLog(opts: JumpEventReportInterFace.OptEventLogParams = {}) {
1849
1849
  return this.clickEventLog(opts, 'exposure');
1850
1850
  }
1851
1851
 
1852
1852
  jdJumpToSearch(shopId, suggestWord) {
1853
1853
  if (typeof shopId === 'undefined') shopId = global.info.queryInfo.shopId;
1854
1854
  this.jdNavigateToNative({
1855
1855
  category: 'jump',
1856
1856
  des: 'jshopGuessWord',
1857
1857
  shopId: String(shopId),
1858
1858
  transparentEnable: true,
1859
1859
  suggestWord,
1860
1860
  sourceInfo: APP_SOURCE_INFO,
1861
1861
  });
1862
1862
  }
1863
1863
 
1864
1864
  jdJumpToMyMessageBox() {
1865
1865
  this.jdNavigateToNative({
1866
1866
  category: 'jump',
1867
1867
  des: 'myMessageBox',
1868
1868
  });
1869
1869
  }
1870
1870
 
1871
1871
  jdJumpToAppHome() {
1872
1872
  this.jdNavigateToNative({
1873
1873
  category: 'jump',
1874
1874
  des: 'HomePage',
1875
1875
  });
1876
1876
  }
1877
1877
 
1878
1878
  jdJumpToShopHomeDetail({ shopId, venderId }) {
1879
1879
  this.jdNavigateToNative({
1880
1880
  category: 'jump',
1881
1881
  des: 'jshopDetail',
1882
1882
  shopId: String(shopId),
1883
1883
  venderId: String(venderId),
1884
1884
  });
1885
1885
  }
1886
1886
 
1887
1887
  jdJumpToShopLottery(shopTotalInfo) {
1888
1888
  this.jdNavigateToNative(
1889
1889
  Object.assign(
1890
1890
  {},
1891
1891
  {
1892
1892
  category: 'jump',
1893
1893
  des: 'jshopSign',
1894
1894
  activityRuleType: '0',
1895
1895
  shopId: global.info.queryInfo.shopId,
1896
1896
  venderId: global.info.queryInfo.venderId,
1897
1897
  },
1898
1898
  shopTotalInfo,
1899
1899
  ),
1900
1900
  );
1901
1901
  }
1902
1902
 
1903
1903
  jdJumpToSageAuthorHome(shopTotalInfo) {
1904
1904
  this.jdNavigateToNative(
1905
1905
  Object.assign(
1906
1906
  {},
1907
1907
  {
1908
1908
  category: 'jump',
1909
1909
  des: 'faxian_author',
1910
1910
  channel: 'shopHomePage',
1911
1911
  selectTab: '0',
1912
1912
  },
1913
1913
  shopTotalInfo,
1914
1914
  ),
1915
1915
  );
1916
1916
  }