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