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

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