@conecli/cone-render 0.8.20-beta.0 → 0.8.20-beta.2

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