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

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 (91) hide show
  1. package/dist/api/index.ts +1 -1
  2. package/dist/common/const.ts +1 -1
  3. package/dist/common/index.h5.ts +1 -1
  4. package/dist/common/index.jd.ts +1 -1
  5. package/dist/common/isvStorage/index.h5.ts +1 -0
  6. package/dist/common/isvStorage/index.ts +1 -0
  7. package/dist/common/token/const.ts +1 -0
  8. package/dist/common/token/index.h5.ts +1 -0
  9. package/dist/common/token/index.ts +1 -0
  10. package/dist/common/token/token.jd.ts +1 -0
  11. package/dist/common/token/token.ts +1 -0
  12. package/dist/common/token/token.wxapp.ts +1 -0
  13. package/dist/components/base/CommonFloorHead/index.module.scss +1 -1
  14. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  15. package/dist/components/base/CustomVideo/const.ts +1 -0
  16. package/dist/components/base/CustomVideo/index.module.scss +40 -64
  17. package/dist/components/base/CustomVideo/index.tsx +1 -1
  18. package/dist/components/base/Dialog/index.module.scss +6 -2
  19. package/dist/components/base/Dialog/index.tsx +1 -1
  20. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  21. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  22. package/dist/components/base/InOrOutViewObserver/index.tsx +1 -1
  23. package/dist/components/base/NetworkDataError/const.ts +1 -1
  24. package/dist/components/base/NetworkDataError/index.module.scss +3 -0
  25. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  26. package/dist/components/base/Price/{const.ts → Base/const.ts} +0 -0
  27. package/dist/components/base/Price/Base/index.module.scss +136 -0
  28. package/dist/components/base/Price/Base/index.tsx +1 -0
  29. package/dist/components/base/Price/Double/index.module.scss +158 -0
  30. package/dist/components/base/Price/Double/index.tsx +1 -0
  31. package/dist/components/base/Price/index.tsx +1 -1
  32. package/dist/components/decorate/EmptyFloorModule/index.tsx +1 -1
  33. package/dist/components/decorate/PlaceHolder/index.tsx +1 -1
  34. package/dist/components/floorItem.jd.tsx +1 -0
  35. package/dist/components/floorItem.tsx +1 -1
  36. package/dist/components/isv/Floor/index.tsx +1 -1
  37. package/dist/interface/component.ts +1 -1
  38. package/dist/interface/jumpEventReport.ts +1 -1
  39. package/dist/interface/service.ts +1 -1
  40. package/dist/jumpEventReport/base.ts +1 -1
  41. package/dist/jumpEventReport/const.ts +1 -1
  42. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  43. package/dist/jumpEventReport/index.h5.ts +1 -1
  44. package/dist/jumpEventReport/index.weapp.ts +1 -1
  45. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  46. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  47. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  48. package/dist/jumpEventReport/web/report.ts +1 -1
  49. package/dist/jumpEventReport/web.base.ts +1 -1
  50. package/dist/jumpEventReport/web.jd.ts +1 -1
  51. package/dist/jumpEventReport/web.jdb.ts +1 -0
  52. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  53. package/dist/libs/taroAppReport.js +2 -2
  54. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  55. package/dist/open/api/index.ts +1 -1
  56. package/dist/open/api/jump/business.ts +1 -0
  57. package/dist/open/api/jump/index.ts +1 -0
  58. package/dist/open/api/jump/minPath.ts +1 -0
  59. package/dist/open/api/jump/side.ts +1 -0
  60. package/dist/open/api/jump/webUrl.ts +1 -0
  61. package/dist/open/api/jump copy.ts +1 -0
  62. package/dist/open/api/moduleUtil.ts +1 -1
  63. package/dist/open/api/request.ts +1 -0
  64. package/dist/open/api/shopMember.ts +1 -0
  65. package/dist/open/api/userToken.ts +1 -0
  66. package/dist/service/bMallConst.ts +1 -0
  67. package/dist/service/bMallConst.wxapp.ts +1 -0
  68. package/dist/service/fetchGateway.ts +1 -0
  69. package/dist/service/fetchJsonp.ts +1 -0
  70. package/dist/service/http/colorSign.ts +1 -0
  71. package/dist/service/http/colorSign.wxapp.ts +1 -0
  72. package/dist/service/http/const.ts +1 -0
  73. package/dist/service/http/http.ts +1 -0
  74. package/dist/service/http/httpInterceptors.jd.ts +1 -0
  75. package/dist/service/http/httpInterceptors.ts +1 -0
  76. package/dist/service/http/index.ts +1 -0
  77. package/dist/service/requestServer.ts +1 -0
  78. package/dist/utils/connectNativeJsBridge.ts +1 -1
  79. package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
  80. package/dist/utils/h5Utils.ts +1 -1
  81. package/dist/utils/index.h5.ts +1 -1
  82. package/dist/utils/index.ts +1 -1
  83. package/dist/utils/index.weapp.ts +1 -1
  84. package/dist/utils/jm-common.js +1 -1
  85. package/dist/utils/memberFormatUtils.js +1 -0
  86. package/dist/utils/priceUtils.js +1 -0
  87. package/dist/utils/ready.ts +1 -0
  88. package/dist/utils/utils.ts +1 -1
  89. package/package.json +5 -4
  90. package/dist/components/base/Price/index.module.scss +0 -136
  91. package/dist/open/api/jump.ts +0 -1
@@ -1 +1 @@
1
- import Taro from '@tarojs/taro'
1
+ import Taro from '@tarojs/taro'
2
2
 
3
3
  jdJumpToProduct(skuIds, logEventInfo, otherParams = {}) {
4
4
  skuIds = skuIds.toString().trim()
5
5
  const getSkuId = skuIds.indexOf(',') !== -1 ? skuIds.split(',')[0] : skuIds
6
6
  this.jdNavigateToNative({
7
7
  category: 'jump',
8
8
  des: 'productDetail',
9
9
  skuId: getSkuId,
10
10
  logEventInfo,
11
11
  ...otherParams,
12
12
  })
13
13
  }
14
14
 
15
15
  jdJumpToShopCategory(shopInfo = {}) {
16
16
  console.log(
17
17
  '🚀 ~ file: jdJumpJdApp.ts:40 ~ JdJumpJdApp ~ jdJumpToShopCategory ~ shopInfo:',
18
18
  shopInfo,
19
19
  )
20
20
  console.log('[降级H5] jdJumpToShopCategory jdJumpJdApp')
21
21
  this.jdNavigateToNative(
22
22
  Object.assign(
23
23
  {},
24
24
  {
25
25
  category: 'jump',
26
26
  des: 'jshopMain',
27
27
  jumpBottomTab: 'category',
28
28
  },
29
29
  shopInfo,
30
30
  {
31
31
  shopId: String(shopInfo.shopId ?? ''),
32
32
  venderId: String(shopInfo.venderId ?? ''),
33
33
  },
34
34
  ),
35
35
  )
36
36
  }
37
37
 
38
38
  jdJumpToOrderInfoView(wareId, wareNum = 1, logEventInfo) {
39
39
  this.jdNavigateToNative({
40
40
  category: 'jump',
41
41
  des: 'orderInfoView',
42
42
  wareId: `${wareId}`,
43
43
  wareNum: global.info.sysInfo.isIOS ? `${wareNum}` : wareNum,
44
44
  skuSource: 25,
45
45
  sourceType: 6,
46
46
  extFlag: '{}',
47
47
  logEventInfo,
48
48
  })
49
49
  }
50
50
 
51
51
  jdJumpToTryDetail(tryId) {
52
52
  this.jdNavigateToNative({
53
53
  category: 'jump',
54
54
  des: 'jdreactcommon',
55
55
  appname: 'JDReactNewProduct',
56
56
  modulename: 'JDReactNewProduct',
57
57
  param: {
58
58
  activityId: tryId,
59
59
  isNative: true,
60
60
  nativePage: 'jdtry_detail',
61
61
  transparentenable: true,
62
62
  },
63
63
  })
64
64
  }
65
65
 
66
66
  jdJumpToShopHome(shopInfo = {}) {
67
67
  console.log('[降级H5] jdJumpToShopHome jdJumpJdApp')
68
68
  const getShopParams = this.getShopIdsInfo(shopInfo)
69
69
  this.jdJumpToShopBase(getShopParams)
70
70
  }
71
71
 
72
72
  jdJumpToUnifieddetail(sourceInfo) {
73
73
  this.jdNavigateToNative(
74
74
  Object.assign(
75
75
  {},
76
76
  {
77
77
  category: 'jump',
78
78
  des: 'unifieddetail',
79
79
  },
80
80
  sourceInfo,
81
81
  ),
82
82
  )
83
83
  }
84
84
 
85
85
  jdJumpToVideoImmersion(sourceInfo) {
86
86
  this.jdNavigateToNative(
87
87
  Object.assign(
88
88
  {},
89
89
  {
90
90
  category: 'jump',
91
91
  des: 'VideoImmersion',
92
92
  },
93
93
  sourceInfo,
94
94
  ),
95
95
  )
96
96
  }
97
97
 
98
98
  jdJumpToShopMember(shopInfo) {
99
99
  this.jdNavigateToNative(
100
100
  Object.assign(
101
101
  {},
102
102
  {
103
103
  category: 'jump',
104
104
  des: 'jshopMember',
105
105
  followAward: '-1',
106
106
  },
107
107
  shopInfo,
108
108
  ),
109
109
  )
110
110
  }
111
111
 
112
112
  jdJumpToMemberTab(shopInfo?) {
113
113
  this.jdNavigateToNative(
114
114
  Object.assign(
115
115
  {},
116
116
  {
117
117
  category: 'jump',
118
118
  des: 'jshopMain',
119
119
  shopId: global.info.queryInfo.shopId,
120
120
  venderId: global.info.queryInfo.venderId,
121
121
  operation: 'jumpBottomTabMember',
122
122
  },
123
123
  shopInfo,
124
124
  ),
125
125
  )
126
126
  }
127
127
 
128
128
  jdJumpToDongDongChatGroup(groupId, source = 'jdmini') {
129
129
  this.jdNavigateToNative({
130
130
  category: 'jump',
131
131
  des: 'dongdong_group_chat',
132
132
  source: source,
133
133
  groupId: `${groupId}`,
134
134
  })
135
135
  }
136
136
 
137
137
  jdJumpToDongDongChat(paramInfo = {}) {
138
138
  this.jdNavigateToNative(
139
139
  Object.assign(
140
140
  {},
141
141
  {
142
142
  category: 'jump',
143
143
  des: 'jd_dongdong_chat',
144
144
  venderId: global.info.queryInfo.venderId,
145
145
  entry: 'm_shop',
146
146
  },
147
147
  paramInfo,
148
148
  ),
149
149
  )
150
150
  }
151
151
 
152
152
  jdJumpToShopActivity(shopInfo) {
153
153
  const getParams = Object.assign(
154
154
  {},
155
155
  {
156
156
  category: 'jump',
157
157
  des: 'jshopActivity',
158
158
  shopId: global.info.queryInfo.shopId,
159
159
  venderId: global.info.queryInfo.venderId,
160
160
  },
161
161
  shopInfo,
162
162
  )
163
163
  getParams['projectId'] &&
164
164
  (getParams['projectId'] = `${getParams['projectId']}`)
165
165
  this.jdNavigateToNative(getParams)
166
166
  }
167
167
 
168
168
  jdJumpToShopActivityPage(shopInfo) {
169
169
  this.jdNavigateToNative(
170
170
  Object.assign(
171
171
  {},
172
172
  {
173
173
  category: 'jump',
174
174
  des: 'jshopActivityPage',
175
175
  shopId: global.info.queryInfo.shopId,
176
176
  title: global.info.queryInfo?.shopName,
177
177
  },
178
178
  shopInfo,
179
179
  ),
180
180
  )
181
181
  }
182
182
 
183
183
  jdJumpToShopDetail(shopInfo) {
184
184
  this.jdNavigateToNative(
185
185
  Object.assign(
186
186
  {},
187
187
  {
188
188
  category: 'jump',
189
189
  des: 'jshopDetail',
190
190
  },
191
191
  shopInfo,
192
192
  ),
193
193
  )
194
194
  }
195
195
 
196
196
  jdJumpToShopMemberCard(shopInfo) {
197
197
  const { url, logEventInfo } = shopInfo
198
198
  if (this.isOpenJdAppUrl(url)) {
199
199
  const getOpenAppParams = this.jdOpenAppParams(url)
200
200
  console.log(
201
201
  'jd web 获取自定义openApp链接解析后的参数结果',
202
202
  getOpenAppParams,
203
203
  )
204
204
  if (getOpenAppParams) {
205
205
  this.jdNavigateToNative(
206
206
  Object.assign({}, getOpenAppParams, { logEventInfo }),
207
207
  )
208
208
  }
209
209
  } else {
210
210
  super.jdJumpToWeb(url, {
211
211
  ...logEventInfo,
212
212
  })
213
213
  }
214
214
  }
215
215
 
216
216
  jdJumpToTotalPromotion(shopInfo) {
217
217
  const { url, logEventInfo } = shopInfo
218
218
  if (this.isOpenJdAppUrl(url)) {
219
219
  const getOpenAppParams = this.jdOpenAppParams(url)
220
220
  console.log(
221
221
  'jd web 获取自定义openApp链接解析后的参数结果',
222
222
  getOpenAppParams,
223
223
  )
224
224
  if (getOpenAppParams) {
225
225
  this.jdNavigateToNative(
226
226
  Object.assign({}, getOpenAppParams, { logEventInfo }),
227
227
  )
228
228
  }
229
229
  } else {
230
230
  super.jdJumpToWeb(url, {
231
231
  ...logEventInfo,
232
232
  })
233
233
  }
234
234
  }
235
235
 
236
236
  jdJumpToShopSearch(pageInfo = {}) {
237
237
  const getInfo = Object.assign(
238
238
  {},
239
239
  {
240
240
  shopId: global.info.queryInfo.shopId,
241
241
  venderId: global.info.queryInfo.venderId,
242
242
  sourceInfo:{
243
243
  entrance: 'shop-page-tab',
244
244
  moduleId: 'shop-modular-floor'
245
245
  }
246
246
  },
247
247
  pageInfo,
248
248
  )
249
249
  const { keyword = '', categoryId = '', ...otherPageInfo }: any = getInfo
250
250
  const searchInfo = {}
251
251
  if (categoryId != '') {
252
252
  searchInfo['categoryId'] = typeof categoryId === 'string' ? categoryId?.trim() : categoryId
253
253
  searchInfo['searchType'] = '5'
254
254
  } else if (keyword != '') {
255
255
  searchInfo['keyWord'] = keyword
256
256
  searchInfo['searchType'] = '4'
257
257
  }
258
258
  this.jdNavigateToNative(
259
259
  Object.assign(
260
260
  {},
261
261
  {
262
262
  category: 'jump',
263
263
  des: 'jshopProductList',
264
264
  pageId: '1',
265
265
  ...searchInfo,
266
266
  },
267
267
  otherPageInfo,
268
268
  ),
269
269
  )
270
270
  }
271
271
 
272
272
  jdJumpToOrderList(logEventInfo = {}) {
273
273
  this.jdNavigateToNative(
274
274
  Object.assign(
275
275
  {},
276
276
  {
277
277
  category: 'jump',
278
278
  des: 'orderlist',
279
279
  from: 'dphycc',
280
280
  },
281
281
  logEventInfo,
282
282
  ),
283
283
  )
284
284
  }
285
285
 
286
286
  jdJumpToCouponSearchProductList(couponId, logEventInfo = {}) {
287
287
  this.jdNavigateToNative(
288
288
  Object.assign(
289
289
  {},
290
290
  {
291
291
  category: 'jump',
292
292
  des: 'productList',
293
293
  from: 'couponBatch',
294
294
  couponId: `${couponId}`,
295
295
  },
296
296
  logEventInfo,
297
297
  ),
298
298
  )
299
299
  }
300
300
 
301
301
  jdJumpToTabAllProduct(shopId, venderId, logEventInfo = {}) {
302
302
  this.jdNavigateToNative(
303
303
  Object.assign(
304
304
  {},
305
305
  {
306
306
  category: 'jump',
307
307
  des: 'jshopMain',
308
308
  jumpTab: 'allProduct',
309
309
  shopId: `${shopId}`,
310
310
  venderId: `${venderId}`,
311
311
  },
312
312
  logEventInfo,
313
313
  ),
314
314
  )
315
315
  }
316
316
 
317
317
  jdJumpToTabAllProductInner(shopId, venderId, logEventInfo = {}) {
318
318
  this.jdNavigateToNative(
319
319
  Object.assign(
320
320
  {},
321
321
  {
322
322
  category: 'jump',
323
323
  des: 'jshopMain',
324
324
  jumpTab: 'allProduct',
325
325
  shopId: `${shopId}`,
326
326
  venderId: `${venderId}`,
327
327
  operation: 'jumpTabInner',
328
328
  },
329
329
  logEventInfo,
330
330
  ),
331
331
  )
332
332
  }
333
333
 
334
334
  jdJumpToShopBase(shopInfo, jumpTab = 'home', des = 'jshopMain') {
335
335
  console.log('[降级H5] jdJumpToShopBase jdJumpJdApp')
336
336
  this.jdNavigateToNative(
337
337
  Object.assign(
338
338
  {},
339
339
  {
340
340
  category: 'jump',
341
341
  des: des,
342
342
  jumpTab: jumpTab,
343
343
  },
344
344
  shopInfo,
345
345
  ),
346
346
  )
347
347
  }
348
348
 
349
349
  jdJumpToWeb(
350
350
  url,
351
351
  logEventInfo,
352
352
  successBack?: Function | undefined,
353
353
  failBack?: Function | undefined,
354
354
  ) {
355
355
  const changeUrl = /^\/\//.test(url) ? `https:${url}` : url
356
356
  this.jdNavigateToNative(
357
357
  {
358
358
  category: 'jump',
359
359
  des: 'm',
360
360
  url: encodeURIComponent(changeUrl),
361
361
  logEventInfo,
362
362
  },
363
363
  OpenAppHost,
364
364
  successBack,
365
365
  failBack,
366
366
  )
367
367
  }
368
368
 
369
369
  jdJumpToLive(clickUrlOrObj, logEventInfo) {
370
370
  if (typeof clickUrlOrObj === 'object') {
371
371
  this.jdNavigateToNative({
372
372
  category: 'jump',
373
373
  des: 'LivePlayerRoom',
374
374
  liveOrigin: '1',
375
375
  needLogin: '0',
376
376
  isNeedVideo: true,
377
377
  logEventInfo,
378
378
  ...clickUrlOrObj,
379
379
  })
380
380
  } else {
381
381
  const getShopLiveParams = this.jdOpenAppParams(clickUrlOrObj)
382
382
  console.log('getShopLiveParams=====', getShopLiveParams)
383
383
  if (typeof getShopLiveParams === 'object') {
384
384
  this.jdNavigateToNative({
385
385
  ...getShopLiveParams,
386
386
  logEventInfo,
387
387
  })
388
388
  }
389
389
  }
390
390
  }
391
391
 
392
392
  jdJumpToUgcContent(urlObj) {
393
393
  if (typeof urlObj === 'object') {
394
394
  this.jdNavigateToNative({
395
395
  category: 'jump',
396
396
  des: 'shareOrderUgcContent',
397
397
  channel: 'shopshangxin',
398
398
  cmtType: '10',
399
399
  isNeedVideo: true,
400
400
  ...urlObj,
401
401
  })
402
402
  } else {
403
403
  const getShopUgcParams = this.jdOpenAppParams(urlObj)
404
404
  console.log('getShopUgcParams=====', getShopUgcParams)
405
405
  getShopUgcParams && this.jdNavigateToNative(getShopUgcParams as String)
406
406
  }
407
407
  }
408
408
 
409
409
  jdJumpToSeckillNewBrand(brandId) {
410
410
  this.jdNavigateToNative({
411
411
  category: 'jump',
412
412
  des: 'seckillnewbrand',
413
413
  brandId: `${brandId}`,
414
414
  })
415
415
  }
416
416
 
417
417
  jdJumpToJshopDynamicDetail(info) {
418
418
  this.jdNavigateToNative({
419
419
  category: 'jump',
420
420
  des: 'jshopDynamicDetail',
421
421
  shopId: global.info.queryInfo.shopId,
422
422
  venderId: global.info.queryInfo.venderId,
423
423
  ...info,
424
424
  })
425
425
  }
426
426
 
427
427
  jdJumpToRankList(rankingId, rankType, logEventInfo) {
428
428
  this.jdNavigateToNative(
429
429
  Object.assign(
430
430
  {},
431
431
  {
432
432
  category: 'jump',
433
433
  des: 'jdreactcommon',
434
434
  modulename: 'JDReactRankingList',
435
435
  appname: 'JDReactRankingList',
436
436
  transparentenable: true,
437
437
  ishidden: true,
438
438
  param: {
439
439
  contentId: '' + rankingId,
440
440
  fromSkuId: '',
441
441
  detailPageType: '5',
442
442
  rankType: rankType || 10 + '',
443
443
  },
444
444
  logEventInfo,
445
445
  },
446
446
  ),
447
447
  )
448
448
  }
449
449
 
450
450
  jdJumpToFlashSaleTab(logEventInfo) {
451
451
  this.jdNavigateToNative(
452
452
  Object.assign(
453
453
  {},
454
454
  {
455
455
  category: 'jump',
456
456
  des: 'jshopMain',
457
457
  jumpTab: 'flashPurchase',
458
458
  shopId: global.info.queryInfo.shopId,
459
459
  venderId: global.info.queryInfo.venderId,
460
460
  sourceType: 'JDReactShopActivityTAB',
461
461
  sourceValue: '2',
462
462
  operation: 'jumpTabInner',
463
463
  logEventInfo,
464
464
  },
465
465
  ),
466
466
  )
467
467
  }
468
468
 
469
469
 
470
470
  jdJumpToShopMemberInfo(logEventInfo) {
471
471
  this.jdNavigateToNative(
472
472
  Object.assign(
473
473
  {},
474
474
  {
475
475
  category: 'jump',
476
476
  des: 'jdreactcommon',
477
477
  modulename: 'JDReactShopMember',
478
478
  appname: 'JDReactShopMember',
479
479
  ishidden: true,
480
480
  param: {
481
481
  page: 'memberInfo',
482
482
  shopId: global.info.queryInfo.shopId,
483
483
  venderId: global.info.queryInfo.venderId,
484
484
  },
485
485
  logEventInfo,
486
486
  },
487
487
  ),
488
488
  )
489
489
  }
490
490
 
491
491
  jdJumpToShopMemberBenefit(logEventInfo) {
492
492
  this.jdNavigateToNative(
493
493
  Object.assign(
494
494
  {},
495
495
  {
496
496
  category: 'jump',
497
497
  des: 'jdreactcommon',
498
498
  modulename: 'JDReactShopMember',
499
499
  appname: 'JDReactShopMember',
500
500
  ishidden: true,
501
501
  param: {
502
502
  page: 'benefitList',
503
503
  shopId: global.info.queryInfo.shopId,
504
504
  venderId: global.info.queryInfo.venderId,
505
505
  },
506
506
  logEventInfo,
507
507
  },
508
508
  ),
509
509
  )
510
510
  }
511
511
 
512
512
  jdJumpToShopMemberPointExchange(venderType, levelZeroMenuUrl, logEventInfo) {
513
513
  this.jdNavigateToNative(
514
514
  Object.assign(
515
515
  {},
516
516
  {
517
517
  category: 'jump',
518
518
  des: 'jdreactcommon',
519
519
  modulename: 'JDReactShopMember',
520
520
  appname: 'JDReactShopMember',
521
521
  ishidden: true,
522
522
  param: {
523
523
  page: 'pointsExchangePage',
524
524
  shopId: global.info.queryInfo.shopId,
525
525
  venderId: global.info.queryInfo.venderId,
526
526
  levelZeroMenuUrl,
527
527
  },
528
528
  logEventInfo,
529
529
  },
530
530
  ),
531
531
  )
532
532
  }
533
533
 
534
534
  jdJumpToShopMemberBonusPurchase(customerLevel, logEventInfo) {
535
535
  this.jdNavigateToNative(
536
536
  Object.assign(
537
537
  {},
538
538
  {
539
539
  category: 'jump',
540
540
  des: 'jdreactcommon',
541
541
  modulename: 'JDReactShopMember',
542
542
  appname: 'JDReactShopMember',
543
543
  ishidden: true,
544
544
  param: {
545
545
  page: 'bonusPurchase',
546
546
  shopId: global.info.queryInfo.shopId,
547
547
  venderId: global.info.queryInfo.venderId,
548
548
  customerLevel,
549
549
  },
550
550
  logEventInfo,
551
551
  },
552
552
  ),
553
553
  )
554
554
  }
555
555
 
556
556
  jdJumpToMyRedEnvelope(logEventInfo) {
557
557
  this.jdNavigateToNative(
558
558
  Object.assign(
559
559
  {},
560
560
  {
561
561
  category: 'jump',
562
562
  des: 'jdreactcommon',
563
563
  modulename: 'JDReactMyRedEnvelope',
564
564
  appname: 'JDReactMyRedEnvelope',
565
565
  ishidden: true,
566
566
  fromName: 2,
567
567
  needLogin: true,
568
568
  logEventInfo,
569
569
  },
570
570
  ),
571
571
  )
572
572
  }
573
573
 
574
574
  jdJumpToMyCoupon(logEventInfo) {
575
575
  this.jdNavigateToNative(
576
576
  Object.assign(
577
577
  {},
578
578
  {
579
579
  category: 'jump',
580
580
  des: 'mycoupon',
581
581
  logEventInfo,
582
582
  },
583
583
  ),
584
584
  )
585
585
  }
586
586
 
587
587
 
588
588
  jdJumpToMiniProgram({ vapptype, appId, path, param }) {
589
589
  const pageName = param['pageType'] || 'home'
590
590
  const nowMiniPath = `pages/${pageName}/index`
591
591
  if (appId === global.info.pageInfo.appId) {
592
592
  Taro.navigateTo({
593
593
  url: `/${nowMiniPath}?${objectToUrlEncode(param)}`,
594
594
  }).catch((err) => {
595
595
  console.warn('跳转小程序页面错误:', err)
596
596
  })
597
597
  } else {
598
598
  const params = {
599
599
  category: 'jump',
600
600
  des: 'jdmp',
601
601
  appId,
602
602
  vapptype,
603
603
  param,
604
604
  path: '',
605
605
  }
606
606
  if (path) {
607
607
  params.path = `${path}.html`
608
608
  }
609
609
  this.jdNavigateToNative(params)
610
610
  }
611
611
  }
612
612
 
613
613
  jdJumpToAppMiniProgram(
614
614
  path: string,
615
615
  param = {},
616
616
  successBack?: Function,
617
617
  failBack?: Function,
618
618
  ) {
619
619
  this.jdNavigateToNative(param, path, successBack, failBack)
620
620
  }
621
621
 
622
622
  jdNavigateToNative(
623
623
  params: {},
624
624
  url = OpenAppHost,
625
625
  successBack?: Function | undefined,
626
626
  failBack?: Function | undefined,
627
627
  ) {
628
628
  console.log('[降级H5] jdNavigateToNative jdJumJdApp:', params)
629
629
  const getResParams: JumpEventReportInterFace.JdMiniJumpParams =
630
630
  Object.assign(
631
631
  {},
632
632
  {
633
633
  sourceValue: 'sourceValue_jshopMini',
634
634
  sourceType: 'sourceType_jshopMini',
635
635
  param: {},
636
636
  },
637
637
  params,
638
638
  )
639
639
  const { logEventInfo, ...otherParams } = getResParams
640
640
  console.log('jdNavigateToNative params: ', getResParams)
641
641
  console.log('logEventInfo params: ', logEventInfo)
642
642
  this.clickEventLog(logEventInfo || getResParams, getResParams.des)
643
643
  jd.navigateToNative({
644
644
  dataParam: {
645
645
  url: url,
646
646
  params: otherParams,
647
647
  },
648
648
  success(res) {
649
649
  typeof successBack === 'function' && successBack(res)
650
650
  console.log('navigateToNative.success', res)
651
651
  },
652
652
  fail(res) {
653
653
  typeof failBack === 'function' && failBack(res)
654
654
  console.log('navigateToNative.fail', res)
655
655
  },
656
656
  })
657
657
  }
658
658
 
659
659
  clickEventLog(
660
660
  opts: JumpEventReportInterFace.OptEventLogParams = {},
661
661
  clickKey = 'click',
662
662
  ) {
663
663
  const { eventId, jsonParam, eventLevel = 3, skuId, ...otherParams } = opts
664
664
  if (eventId && jsonParam) {
665
665
  const { etModelInfo, logBaseInfo } = jsonParam
666
666
  const miniLogParams = {
667
667
  eid: eventId,
668
668
  elevel: eventLevel,
669
669
  eparam: JSON.stringify(logBaseInfo || jsonParam),
670
670
  ext: {
671
671
  et_model: JSON.stringify(etModelInfo || {}),
672
672
  },
673
673
  pageId: this.logPageId,
674
674
  pname: this.logPname,
675
675
  pparam: JSON.stringify(this.routerInfo.params),
676
676
  target: this.routerInfo.path,
677
677
  event: this.nativeEvent,
678
678
  ...otherParams,
679
679
  }
680
680
  if (clickKey === 'addToCart' && skuId) {
681
681
  miniLogParams['shoppingList'] = {
682
682
  [skuId]: 1,
683
683
  }
684
684
  }
685
685
  console.log('点击埋点参数对象', miniLogParams, clickKey)
686
686
  global.miniAppLogInstance &&
687
687
  global.miniAppLogInstance[clickKey](miniLogParams)
688
688
  } else {
689
689
  console.log('暂无埋点参数eventId和eventParam')
690
690
  }
691
691
  }
692
692
 
693
693
  exposureEventLog(opts: JumpEventReportInterFace.OptEventLogParams = {}) {
694
694
  return this.clickEventLog(opts, 'exposure')
695
695
  }
696
696
 
697
697
  jdJumpToSearch(shopId, suggestWord) {
698
698
  this.jdNavigateToNative({
699
699
  category: 'jump',
700
700
  des: 'jshopGuessWord',
701
701
  shopId: String(shopId),
702
702
  transparentEnable: true,
703
703
  suggestWord,
704
704
  })
705
705
  }
706
706
 
707
707
  jdJumpToMyMessageBox() {
708
708
  this.jdNavigateToNative({
709
709
  category: 'jump',
710
710
  des: 'myMessageBox',
711
711
  })
712
712
  }
713
713
 
714
714
  jdJumpToAppHome() {
715
715
  this.jdNavigateToNative({
716
716
  category: 'jump',
717
717
  des: 'HomePage',
718
718
  })
719
719
  }
720
720
 
721
721
  jdJumpToShopHomeDetail({ shopId, venderId }) {
722
722
  this.jdNavigateToNative({
723
723
  category: 'jump',
724
724
  des: 'jshopDetail',
725
725
  shopId: String(shopId),
726
726
  venderId: String(venderId),
727
727
  })
728
728
  }