@conecli/cone-render 0.10.1-shop-beta.4 → 0.10.1-shop-beta.6

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