@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 { JumpEventTJWebReport } from './web.tjm'
2
1
  routerInfo: {
3
2
  params: {},
4
3
  },
5
4
  nativeEvent: null,
6
5
  jumpConfig: {
7
6
  venderId: null,
8
7
  shopId: null,
9
8
  sourceValue: '',
10
9
  sourceType: 'App-H5',
11
10
  activityType: 'shopx',
12
11
  moduleId: 'none',
13
12
  entrance: 'none',
14
13
  },
15
14
  logPageParamStr: '',
16
15
  public logPageId: string
17
16
  public jumpConfig: JumpEventReportInterFace.JumpH5ReportConfig
18
17
  constructor(opt = {}) {
19
18
  console.log('jdlite加载==========')
20
19
  super(opt)
21
20
  this.getConfig(opt)
22
21
  }
23
22
  tjOpenAppParams(openAppUrl): Object | boolean {
24
23
  let getParams: boolean | Object = false
25
24
  if (this.isOpenTjAppUrl(openAppUrl)) {
26
25
  try {
27
26
  getParams = openAppUrl.replace(
28
27
  /openApp\.jdlite:\/\/virtual\?params=/i,
29
28
  '',
30
29
  )
31
30
  getParams = JSON.parse(String(getParams))
32
31
  } catch (e) {
33
32
  console.log(e)
34
33
  }
35
34
  }
36
35
  return getParams
37
36
  }
38
37
  isOpenTjAppUrl(openAppUrl) {
39
38
  return /openApp\.jdlite:\/\/virtual\?params=/i.test(openAppUrl)
40
39
  }
41
40
 
42
41
  async jdJumpConfigUrl(detail, logEventInfo = {}) {
43
42
  const { configDataType, configDataValue } = detail
44
43
  console.log("测试tj app",detail)
45
44
  switch (configDataType) {
46
45
  case LinkConfigType.CONFIG_TYPE_SKU_LIST:
47
46
  this.jdJumpToProduct( configDataValue.skuIds, logEventInfo)
48
47
  break
49
48
  case LinkConfigType.CONFIG_TYPE_CUSTOM_LINK: {
50
49
  const _url = configDataValue.linkUrl
51
50
  this.jdJumpToWeb(_url, logEventInfo)
52
51
  break
53
52
  }
54
53
  default:
55
54
  }
56
55
  }
57
56
 
58
57
  jdJumpToProduct(skuIds, logEventInfo) {
59
58
  skuIds = skuIds.toString().trim()
60
59
  const getSkuId = skuIds.indexOf(',') !== -1 ? skuIds.split(',')[0] : skuIds
61
60
  this.jdNavigateToNative({
62
61
  category: "jump",
63
62
  des: "productDetail",
64
63
  skuId: getSkuId,
65
64
  logEventInfo,
66
65
  })
67
66
  }
68
67
 
69
68
  jdJumpToCouponSearchProductList(couponId, logEventInfo = {}) {
70
69
  this.jdNavigateToNative(
71
70
  Object.assign(
72
71
  {},
73
72
  {
74
73
  category: "jump",
75
74
  des: "productList",
76
75
  from: "couponBatch",
77
76
  couponId: `${couponId}`,
78
77
  tip: "1",
79
78
  inlet: 0,
80
79
  quangoufrom: 2
81
80
  },
82
81
  logEventInfo,
83
82
  ),
84
83
  )
85
84
  }
86
85
 
87
86
  jdJumpToWeb(
88
87
  url,
89
88
  logEventInfo,
90
89
  successBack?: Function | undefined,
91
90
  failBack?: Function | undefined,
92
91
  ) {
93
92
  if (this.isOpenTjAppUrl(url)) {
94
93
  const getOpenAppParams = this.tjOpenAppParams(url)
95
94
  console.log(
96
95
  'tj web 获取自定义openApp链接解析后的参数结果',
97
96
  getOpenAppParams,
98
97
  )
99
98
  if (getOpenAppParams) {
100
99
  this.jdNavigateToNative(
101
100
  Object.assign({}, getOpenAppParams, {
102
101
  logEventInfo,
103
102
  }),
104
103
  )
105
104
  }
106
105
  } else {
107
106
  if(url.indexOf('tjshop') == -1) {
108
107
  url = url + this.getTjShopParam()
109
108
  }
110
109
  const changeUrl = /^\/\//.test(url) ? `https:${url}` : url
111
110
  this.jdNavigateToNative(
112
111
  {
113
112
  category: 'jump',
114
113
  des: 'm',
115
114
  url: changeUrl,
116
115
  logEventInfo,
117
116
  },
118
117
  OpenAppHost,
119
118
  successBack,
120
119
  failBack,
121
120
  )
122
121
  }
123
122
  }
124
123
  jdJumpToShopSearch(shopInfo) {
125
124
  const getInfo = Object.assign(
126
125
  {},
127
126
  {
128
127
  shopId: global.info.queryInfo.shopId,
129
128
  venderId: global.info.queryInfo.venderId,
130
129
  },
131
130
  shopInfo,
132
131
  )
133
132
  const { shopId, categoryId, keyword, pageId, description, shopName } =
134
133
  getInfo
135
134
  const cateId = categoryId ? `&cateId=${typeof categoryId === 'string' ? categoryId?.trim() : categoryId}` : ''
136
135
  const addKeyWord = keyword ? `&keyword=${keyword}` : ''
137
136
  const addPageId = pageId ? `&pageId=${pageId}` : ''
138
137
  const searchDes = description ? `&description=${description}` : ''
139
138
  const shopNameDes = shopName ? `&shopName=${shopName}` : ''
140
139
  const searchType = categoryId ? 5 : keyword ? 4 : 3
141
140
  super.jdNavigateToNative(
142
141
  `${this.jumpWebUrl.shopSearch}?shopId=${shopId}&searchType=${searchType}${cateId}${addKeyWord}${addPageId}${searchDes}${shopNameDes}`,
143
142
  getInfo,
144
143
  )
145
144
  }
146
145
 
147
146
  jdNavigateToNative(
148
147
  params,
149
148
  url = OpenAppHost,
150
149
  successBack?: Function | null,
151
150
  failBack?: Function | null,
152
151
  ) {
153
152
  console.log('tj web', params)
154
153
  const { logEventInfo , ...otherParams } = params
155
154
  console.log('tj web 获取open协议参数 jdNavigateToNative params: ',otherParams)
156
155
  console.log('logEventInfo params: ', logEventInfo)
157
156
  console.log('otherParams', otherParams)
158
157
  const paramsStr = JSON.stringify(otherParams)
159
158
  console.log('跳转web tj open协议', `${url}?params=${paramsStr}`)
160
159
  global.info.pageInfo.dataType === BUSINESS_TYPE.ONLINE &&
161
160
  this.clickEventLog(logEventInfo || params)
162
161
  .then(() => {
163
162
  if (typeof successBack == 'function') {
164
163
  successBack(params)
165
164
  } else {
166
165
  try {
167
166
  const paramsStr = encodeURIComponent(JSON.stringify(otherParams))
168
167
  console.log(
169
168
  'success: 跳转web tj open协议',
170
169
  `${url}?params=${paramsStr}`,
171
170
  )
172
171
  window.location.href = `${url}?params=${paramsStr}`
173
172
  } catch (e) {
174
173
  console.log('跳转异常', e)
175
174
  }
176
175
  }
177
176
  })
178
177
  .catch((e) => {
179
178
  console.log('catch', e)
180
179
  typeof failBack == 'function' && failBack(params)
181
180
  })
182
181
  }
183
182
 
184
183
  clickEventLog(
185
184
  opts: JumpEventReportInterFace.OptEventLogParams = {},
186
185
  reportKey = 'click',
187
186
  ) {
188
187
  const { eventId, jsonParam, eventLevel = 3, ...otherParams } = opts
189
188
  if (eventId && jsonParam) {
190
189
  const { etModelInfo, logBaseInfo } = jsonParam
191
190
  const webLogParams = {
192
191
  eid: eventId,
193
192
  elevel: eventLevel,
194
193
  eparam:JSON.stringify(logBaseInfo || jsonParam),
195
194
  jsonParam: JSON.stringify(logBaseInfo || jsonParam),
196
195
  etModel: JSON.stringify(etModelInfo || {}),
197
196
  pageId: this.logPageId,
198
197
  pageParam: this.logPageParamStr,
199
198
  ...otherParams,
200
199
  }
201
200
  return /click|exposure/.test(reportKey)
202
201
  ? reportClick(webLogParams)
203
202
  : reportToCart(opts,webLogParams)
204
203
  } else {
205
204
  console.log('暂无埋点参数eventId和eventParam')
206
205
  return Promise.resolve(false)
207
206
  }
208
207
  }
209
208
  getConfig(opt = {}) {
210
209
  return Object.assign(this, {}, defaultConfig, opt)
211
210
  }
211
+ import { JumpEventTJWebReport } from './web.tjm'
212
212
  routerInfo: {
213
213
  params: {},
214
214
  },
215
215
  nativeEvent: null,
216
216
  jumpConfig: {
217
217
  venderId: null,
218
218
  shopId: null,
219
219
  sourceValue: '',
220
220
  sourceType: 'App-H5',
221
221
  activityType: 'shopx',
222
222
  moduleId: 'none',
223
223
  entrance: 'none',
224
224
  },
225
225
  logPageParamStr: '',
226
226
  public logPageId: string
227
227
  public jumpConfig: JumpEventReportInterFace.JumpH5ReportConfig
228
228
  constructor(opt = {}) {
229
229
  console.log('jdlite加载==========')
230
230
  super(opt)
231
231
  this.getConfig(opt)
232
232
  }
233
233
  tjOpenAppParams(openAppUrl): Object | boolean {
234
234
  let getParams: boolean | Object = false
235
235
  if (this.isOpenTjAppUrl(openAppUrl)) {
236
236
  try {
237
237
  getParams = openAppUrl.replace(
238
238
  /openApp\.jdlite:\/\/virtual\?params=/i,
239
239
  '',
240
240
  )
241
241
  getParams = JSON.parse(String(getParams))
242
242
  } catch (e) {
243
243
  console.log(e)
244
244
  }
245
245
  }
246
246
  return getParams
247
247
  }
248
248
  isOpenTjAppUrl(openAppUrl) {
249
249
  return /openApp\.jdlite:\/\/virtual\?params=/i.test(openAppUrl)
250
250
  }
251
251
 
252
252
  async jdJumpConfigUrl(detail, logEventInfo = {}) {
253
253
  const { configDataType, configDataValue } = detail
254
254
  console.log("测试tj app",detail)
255
255
  switch (configDataType) {
256
256
  case LinkConfigType.CONFIG_TYPE_SKU_LIST:
257
257
  this.jdJumpToProduct( configDataValue.skuIds, logEventInfo)
258
258
  break
259
259
  case LinkConfigType.CONFIG_TYPE_CUSTOM_LINK: {
260
260
  const _url = configDataValue.linkUrl
261
261
  this.jdJumpToWeb(_url, logEventInfo)
262
262
  break
263
263
  }
264
264
  default:
265
265
  }
266
266
  }
267
267
 
268
268
  jdJumpToProduct(skuIds, logEventInfo) {
269
269
  skuIds = skuIds.toString().trim()
270
270
  const getSkuId = skuIds.indexOf(',') !== -1 ? skuIds.split(',')[0] : skuIds
271
271
  this.jdNavigateToNative({
272
272
  category: "jump",
273
273
  des: "productDetail",
274
274
  skuId: getSkuId,
275
275
  logEventInfo,
276
276
  })
277
277
  }
278
278
 
279
279
  jdJumpSkuInfoToProduct(skuInfo: any = {}, logEventInfo) {
280
280
  const getSkuId = skuInfo?.skuId;
281
281
  this.jdJumpToProduct(getSkuId, logEventInfo)
282
282
  }
283
283
 
284
284
  jdJumpToCouponSearchProductList(couponId, logEventInfo = {}) {
285
285
  this.jdNavigateToNative(
286
286
  Object.assign(
287
287
  {},
288
288
  {
289
289
  category: "jump",
290
290
  des: "productList",
291
291
  from: "couponBatch",
292
292
  couponId: `${couponId}`,
293
293
  tip: "1",
294
294
  inlet: 0,
295
295
  quangoufrom: 2
296
296
  },
297
297
  logEventInfo,
298
298
  ),
299
299
  )
300
300
  }
301
301
 
302
302
  jdJumpToWeb(
303
303
  url,
304
304
  logEventInfo,
305
305
  successBack?: Function | undefined,
306
306
  failBack?: Function | undefined,
307
307
  ) {
308
308
  if (this.isOpenTjAppUrl(url)) {
309
309
  const getOpenAppParams = this.tjOpenAppParams(url)
310
310
  console.log(
311
311
  'tj web 获取自定义openApp链接解析后的参数结果',
312
312
  getOpenAppParams,
313
313
  )
314
314
  if (getOpenAppParams) {
315
315
  this.jdNavigateToNative(
316
316
  Object.assign({}, getOpenAppParams, {
317
317
  logEventInfo,
318
318
  }),
319
319
  )
320
320
  }
321
321
  } else {
322
322
  if(url.indexOf('tjshop') == -1) {
323
323
  url = url + this.getTjShopParam()
324
324
  }
325
325
  const changeUrl = /^\/\//.test(url) ? `https:${url}` : url
326
326
  this.jdNavigateToNative(
327
327
  {
328
328
  category: 'jump',
329
329
  des: 'm',
330
330
  url: changeUrl,
331
331
  logEventInfo,
332
332
  },
333
333
  OpenAppHost,
334
334
  successBack,
335
335
  failBack,
336
336
  )
337
337
  }
338
338
  }
339
339
  jdJumpToShopSearch(shopInfo) {
340
340
  const getInfo = Object.assign(
341
341
  {},
342
342
  {
343
343
  shopId: global.info.queryInfo.shopId,
344
344
  venderId: global.info.queryInfo.venderId,
345
345
  },
346
346
  shopInfo,
347
347
  )
348
348
  const { shopId, categoryId, keyword, pageId, description, shopName } =
349
349
  getInfo
350
350
  const cateId = categoryId ? `&cateId=${typeof categoryId === 'string' ? categoryId?.trim() : categoryId}` : ''
351
351
  const addKeyWord = keyword ? `&keyword=${keyword}` : ''
352
352
  const addPageId = pageId ? `&pageId=${pageId}` : ''
353
353
  const searchDes = description ? `&description=${description}` : ''
354
354
  const shopNameDes = shopName ? `&shopName=${shopName}` : ''
355
355
  const searchType = categoryId ? 5 : keyword ? 4 : 3
356
356
  super.jdNavigateToNative(
357
357
  `${this.jumpWebUrl.shopSearch}?shopId=${shopId}&searchType=${searchType}${cateId}${addKeyWord}${addPageId}${searchDes}${shopNameDes}`,
358
358
  getInfo,
359
359
  )
360
360
  }
361
361
 
362
362
  jdNavigateToNative(
363
363
  params,
364
364
  url = OpenAppHost,
365
365
  successBack?: Function | null,
366
366
  failBack?: Function | null,
367
367
  ) {
368
368
  console.log('tj web', params)
369
369
  const { logEventInfo , ...otherParams } = params
370
370
  console.log('tj web 获取open协议参数 jdNavigateToNative params: ',otherParams)
371
371
  console.log('logEventInfo params: ', logEventInfo)
372
372
  console.log('otherParams', otherParams)
373
373
  const paramsStr = JSON.stringify(otherParams)
374
374
  console.log('跳转web tj open协议', `${url}?params=${paramsStr}`)
375
375
  global.info.pageInfo.dataType === BUSINESS_TYPE.ONLINE &&
376
376
  this.clickEventLog(logEventInfo || params)
377
377
  .then(() => {
378
378
  if (typeof successBack == 'function') {
379
379
  successBack(params)
380
380
  } else {
381
381
  try {
382
382
  const paramsStr = encodeURIComponent(JSON.stringify(otherParams))
383
383
  console.log(
384
384
  'success: 跳转web tj open协议',
385
385
  `${url}?params=${paramsStr}`,
386
386
  )
387
387
  window.location.href = `${url}?params=${paramsStr}`
388
388
  } catch (e) {
389
389
  console.log('跳转异常', e)
390
390
  }
391
391
  }
392
392
  })
393
393
  .catch((e) => {
394
394
  console.log('catch', e)
395
395
  typeof failBack == 'function' && failBack(params)
396
396
  })
397
397
  }
398
398
 
399
399
  clickEventLog(
400
400
  opts: JumpEventReportInterFace.OptEventLogParams = {},
401
401
  reportKey = 'click',
402
402
  ) {
403
403
  const { eventId, jsonParam, eventLevel = 3, ...otherParams } = opts
404
404
  if (eventId && jsonParam) {
405
405
  const { etModelInfo, logBaseInfo } = jsonParam
406
406
  const webLogParams = {
407
407
  eid: eventId,
408
408
  elevel: eventLevel,
409
409
  eparam:JSON.stringify(logBaseInfo || jsonParam),
410
410
  jsonParam: JSON.stringify(logBaseInfo || jsonParam),
411
411
  etModel: JSON.stringify(etModelInfo || {}),
412
412
  pageId: this.logPageId,
413
413
  pageParam: this.logPageParamStr,
414
414
  ...otherParams,
415
415
  }
416
416
  return /click|exposure/.test(reportKey)
417
417
  ? reportClick(webLogParams)
418
418
  : reportToCart(opts,webLogParams)
419
419
  } else {
420
420
  console.log('暂无埋点参数eventId和eventParam')
421
421
  return Promise.resolve(false)
422
422
  }
423
423
  }
424
424
  getConfig(opt = {}) {
425
425
  return Object.assign(this, {}, defaultConfig, opt)
426
426
  }