@conecli/cone-render 0.10.1-isv2.2 → 0.10.1-isv3.1

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