@conecli/cone-render 0.10.1-beta.5 → 0.10.1-beta.6

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 (57) hide show
  1. package/dist/api/index.ts +1 -1
  2. package/dist/common/const.ts +1 -1
  3. package/dist/common/environmentType.ts +1 -1
  4. package/dist/common/index.h5.ts +1 -1
  5. package/dist/common/index.jd.ts +1 -1
  6. package/dist/common/index.ts +1 -1
  7. package/dist/common/index.weapp.ts +1 -1
  8. package/dist/common/pageType.ts +1 -1
  9. package/dist/common/sgmCustomCode.ts +1 -1
  10. package/dist/components/base/CountDown/index.module.scss +49 -44
  11. package/dist/components/base/CountDown/index.tsx +1 -1
  12. package/dist/components/base/CustomVideo/common.ts +1 -0
  13. package/dist/components/base/CustomVideo/index.tsx +1 -1
  14. package/dist/components/base/LazyLoadImage/index.h5.module.scss +11 -6
  15. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  16. package/dist/components/base/Price/Base/index.tsx +1 -1
  17. package/dist/components/base/Price/Double/index.module.scss +8 -0
  18. package/dist/components/base/Price/Double/index.tsx +1 -1
  19. package/dist/components/floorItem.tsx +1 -1
  20. package/dist/components/isv/Floor/index.tsx +1 -1
  21. package/dist/interface/component.ts +1 -1
  22. package/dist/interface/jumpEventReport.ts +1 -1
  23. package/dist/interface/service.ts +1 -1
  24. package/dist/jumpEventReport/base.ts +1 -1
  25. package/dist/jumpEventReport/index.jd.ts +1 -1
  26. package/dist/jumpEventReport/index.weapp.ts +1 -1
  27. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  28. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  29. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  30. package/dist/jumpEventReport/web.base.ts +1 -1
  31. package/dist/jumpEventReport/web.jd.ts +1 -1
  32. package/dist/jumpEventReport/web.jdb.ts +1 -1
  33. package/dist/jumpEventReport/web.jdjch.ts +1 -1
  34. package/dist/jumpEventReport/web.jxwxapp.ts +1 -1
  35. package/dist/jumpEventReport/web.pc.ts +1 -1
  36. package/dist/jumpEventReport/web.tjapp.ts +1 -1
  37. package/dist/jumpEventReport/web.tjm.ts +1 -1
  38. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  39. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  40. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  41. package/dist/open/api/util.ts +1 -1
  42. package/dist/sass/base.scss +142 -141
  43. package/dist/service/fetchGateway.ts +1 -1
  44. package/dist/service/http/colorSign.ts +1 -1
  45. package/dist/service/http/h5Http.ts +1 -0
  46. package/dist/service/http/index.h5.ts +1 -0
  47. package/dist/service/requestServer.h5.ts +1 -0
  48. package/dist/service/requestServer.ts +1 -1
  49. package/dist/utils/connectNativeJsBridge.ts +1 -1
  50. package/dist/utils/connectNativeJsBridge.weapp.ts +1 -1
  51. package/dist/utils/h5Utils.ts +1 -1
  52. package/dist/utils/index.h5.ts +1 -1
  53. package/dist/utils/index.ts +1 -1
  54. package/dist/utils/index.weapp.ts +1 -1
  55. package/dist/utils/utils.ts +1 -1
  56. package/package.json +35 -29
  57. package/dist/utils/memberFormatUtils.js +0 -1
@@ -1 +1 @@
1
- import { JdJumpJdApp } from './jdJumpJdApp'
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('jdb加载==========')
20
19
  super(opt)
21
20
  this.getConfig(opt)
22
21
  }
23
22
  jdbOpenAppParams(openAppUrl): Object | boolean {
24
23
  let getParams: boolean | Object = false
25
24
  if (this.isOpenJdbAppUrl(openAppUrl)) {
26
25
  try {
27
26
  getParams = openAppUrl.replace(
28
27
  /openApp\.jdbmall:\/\/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
  isOpenJdbAppUrl(openAppUrl) {
39
38
  return /openApp\.jdbmall:\/\/virtual\?params=/i.test(openAppUrl)
40
39
  }
41
40
 
42
41
  async jdJumpConfigUrl(detail, logEventInfo = {}) {
43
42
  const { configDataType, configDataValue } = detail
44
43
  switch (configDataType) {
45
44
  case LinkConfigType.CONFIG_TYPE_SKU_LIST:
46
45
  this.jdJumpToProduct(
47
46
  {
48
47
  ...configDataValue,
49
48
  skuId: configDataValue.skuIds,
50
49
  skuUniformBizInfo: { buId: configDataValue.buId },
51
50
  },
52
51
  logEventInfo,
53
52
  )
54
53
  break
55
54
  case LinkConfigType.CONFIG_TYPE_CUSTOM_LINK: {
56
55
  const _url = configDataValue.linkUrl
57
56
  if (this.isOpenJdbAppUrl(_url)) {
58
57
  const getOpenAppParams = this.jdbOpenAppParams(_url)
59
58
  console.log('jd web 获取自定义链接解析后的参数结果', getOpenAppParams)
60
59
  if (getOpenAppParams) {
61
60
  this.jdNavigateToNative(
62
61
  Object.assign({}, getOpenAppParams, {
63
62
  logEventInfo,
64
63
  }),
65
64
  )
66
65
  }
67
66
  }
68
67
  break
69
68
  }
70
69
  default:
71
70
  }
72
71
  }
73
72
 
74
73
  jdJumpToProduct(skuParams, logEventInfo) {
75
74
  if (typeof skuParams !== 'object') {
76
75
  console.error('万商app跳转商品详情参数需要对象,详情请查看文档')
77
76
  return
78
77
  }
79
78
 
80
79
  let { skuId, bMallTag = '1', skuUniformBizInfo } = skuParams
81
80
  skuId = skuId.toString().trim()
82
81
  this.jdNavigateToNative({
83
82
  category: 'jump',
84
83
  des: 'skudetail',
85
84
  param: {
86
85
  skuId: skuId,
87
86
  bMallTag: bMallTag,
88
87
  skuUniformBizInfo,
89
88
  },
90
89
  logEventInfo,
91
90
  })
92
91
  }
93
92
 
94
93
  jdNavigateToNative(
95
94
  params: {},
96
95
  url = OpenAppHost,
97
96
  successBack?: Function | null,
98
97
  failBack?: Function | null,
99
98
  ) {
100
99
  console.log('jdb web', params)
101
100
  const getResParams: JumpEventReportInterFace.JdMiniJumpParams =
102
101
  Object.assign(
103
102
  {},
104
103
  {
105
104
  param: {},
106
105
  },
107
106
  params,
108
107
  )
109
108
  const { logEventInfo, ...otherParams } = getResParams
110
109
  console.log(
111
110
  'jdb web 获取open协议参数 jdNavigateToNative params: ',
112
111
  otherParams,
113
112
  )
114
113
  console.log('logEventInfo params: ', logEventInfo)
115
114
  console.log('otherParams', otherParams)
116
115
  const paramsStr = JSON.stringify(otherParams)
117
116
  console.log('跳转web jdb open协议', `${url}?params=${paramsStr}`)
118
117
  global.info.pageInfo.dataType === BUSINESS_TYPE.ONLINE &&
119
118
  this.clickEventLog(logEventInfo || getResParams)
120
119
  .then(() => {
121
120
  if (typeof successBack == 'function') {
122
121
  successBack(getResParams)
123
122
  } else {
124
123
  try {
125
124
  const paramsStr = JSON.stringify(otherParams)
126
125
  console.log(
127
126
  'success: 跳转web jdb open协议',
128
127
  `${url}?params=${paramsStr}`,
129
128
  )
130
129
  window.location.href = `${url}?params=${paramsStr}`
131
130
  } catch (e) {
132
131
  console.log('跳转异常', e)
133
132
  }
134
133
  }
135
134
  })
136
135
  .catch((e) => {
137
136
  console.log('catch', e)
138
137
  typeof failBack == 'function' && failBack(getResParams)
139
138
  })
140
139
  }
141
140
 
142
141
  clickEventLog(
143
142
  opts: JumpEventReportInterFace.OptEventLogParams = {},
144
143
  reportKey = 'click',
145
144
  ) {
146
145
  const { eventId, jsonParam, eventLevel = 3, ...otherParams } = opts
147
146
  if (eventId && jsonParam) {
148
147
  const { etModelInfo, logBaseInfo } = jsonParam
149
148
  let getJsonParam = {}
150
149
  if (etModelInfo && logBaseInfo) {
151
150
  getJsonParam = logBaseInfo
152
151
  } else {
153
152
  if (Array.isArray(jsonParam)){
154
153
  getJsonParam = jsonParam
155
154
  } else {
156
155
  getJsonParam = Object.assign(
157
156
  {},
158
157
  {
159
158
  shopid: global.info.queryInfo?.shopId,
160
159
  },
161
160
  jsonParam,
162
161
  )
163
162
  }
164
163
  }
165
164
  const webLogParams = {
166
165
  eid: eventId,
167
166
  elevel: eventLevel,
168
167
  eparam:JSON.stringify(getJsonParam),
169
168
  jsonParam: JSON.stringify(getJsonParam),
170
169
  etModel: JSON.stringify(etModelInfo || {}),
171
170
  pageId: this.logPageId,
172
171
  pageParam: this.logPageParamStr,
173
172
  ...otherParams,
174
173
  }
175
174
  return /click|exposure/.test(reportKey)
176
175
  ? reportClick(webLogParams)
177
176
  : reportToCart(opts,webLogParams)
178
177
  } else {
179
178
  console.log('暂无埋点参数eventId和eventParam')
180
179
  return Promise.resolve(false)
181
180
  }
182
181
  }
183
182
  getConfig(opt = {}) {
184
183
  return Object.assign(this, {}, defaultConfig, opt)
185
184
  }
185
+ import { JdJumpJdApp } from './jdJumpJdApp'
186
186
  routerInfo: {
187
187
  params: {},
188
188
  },
189
189
  nativeEvent: null,
190
190
  jumpConfig: {
191
191
  venderId: null,
192
192
  shopId: null,
193
193
  sourceValue: '',
194
194
  sourceType: 'App-H5',
195
195
  activityType: 'shopx',
196
196
  moduleId: 'none',
197
197
  entrance: 'none',
198
198
  },
199
199
  logPageParamStr: '',
200
200
  public logPageId: string
201
201
  public jumpConfig: JumpEventReportInterFace.JumpH5ReportConfig
202
202
  constructor(opt = {}) {
203
203
  console.log('jdb加载==========')
204
204
  super(opt)
205
205
  this.getConfig(opt)
206
206
  }
207
207
  jdbOpenAppParams(openAppUrl): Object | boolean {
208
208
  let getParams: boolean | Object = false
209
209
  if (this.isOpenJdbAppUrl(openAppUrl)) {
210
210
  try {
211
211
  getParams = openAppUrl.replace(
212
212
  /openApp\.jdbmall:\/\/virtual\?params=/i,
213
213
  '',
214
214
  )
215
215
  getParams = JSON.parse(String(getParams))
216
216
  } catch (e) {
217
217
  console.log(e)
218
218
  }
219
219
  }
220
220
  return getParams
221
221
  }
222
222
  isOpenJdbAppUrl(openAppUrl) {
223
223
  return /openApp\.jdbmall:\/\/virtual\?params=/i.test(openAppUrl)
224
224
  }
225
225
 
226
226
  async jdJumpConfigUrl(detail, logEventInfo = {}) {
227
227
  const { configDataType, configDataValue } = detail
228
228
  switch (configDataType) {
229
229
  case LinkConfigType.CONFIG_TYPE_SKU_LIST:
230
230
  this.jdJumpToProduct(
231
231
  {
232
232
  ...configDataValue,
233
233
  skuId: configDataValue.skuIds,
234
234
  skuUniformBizInfo: { buId: configDataValue.buId },
235
235
  },
236
236
  logEventInfo,
237
237
  )
238
238
  break
239
239
  case LinkConfigType.CONFIG_TYPE_CUSTOM_LINK: {
240
240
  const _url = configDataValue.linkUrl
241
241
  if (this.isOpenJdbAppUrl(_url)) {
242
242
  const getOpenAppParams = this.jdbOpenAppParams(_url)
243
243
  console.log('jd web 获取自定义链接解析后的参数结果', getOpenAppParams)
244
244
  if (getOpenAppParams) {
245
245
  this.jdNavigateToNative(
246
246
  Object.assign({}, getOpenAppParams, {
247
247
  logEventInfo,
248
248
  }),
249
249
  )
250
250
  }
251
251
  }
252
252
  break
253
253
  }
254
254
  default:
255
255
  }
256
256
  }
257
257
 
258
258
  jdJumpToProduct(skuParams, logEventInfo) {
259
259
  if (typeof skuParams !== 'object') {
260
260
  console.error('万商app跳转商品详情参数需要对象,详情请查看文档')
261
261
  return
262
262
  }
263
263
 
264
264
  let { skuId, bMallTag = '1', skuUniformBizInfo } = skuParams
265
265
  skuId = skuId.toString().trim()
266
266
  this.jdNavigateToNative({
267
267
  category: 'jump',
268
268
  des: 'skudetail',
269
269
  param: {
270
270
  skuId: skuId,
271
271
  bMallTag: bMallTag,
272
272
  skuUniformBizInfo,
273
273
  },
274
274
  logEventInfo,
275
275
  })
276
276
  }
277
277
 
278
278
  jdJumpSkuInfoToProduct(skuInfo: any = {}, logEventInfo) {
279
279
  this.jdJumpToProduct(skuInfo, logEventInfo)
280
280
  }
281
281
 
282
282
  jdNavigateToNative(
283
283
  params: {},
284
284
  url = OpenAppHost,
285
285
  successBack?: Function | null,
286
286
  failBack?: Function | null,
287
287
  ) {
288
288
  console.log('jdb web', params)
289
289
  const getResParams: JumpEventReportInterFace.JdMiniJumpParams =
290
290
  Object.assign(
291
291
  {},
292
292
  {
293
293
  param: {},
294
294
  },
295
295
  params,
296
296
  )
297
297
  const { logEventInfo, ...otherParams } = getResParams
298
298
  console.log(
299
299
  'jdb web 获取open协议参数 jdNavigateToNative params: ',
300
300
  otherParams,
301
301
  )
302
302
  console.log('logEventInfo params: ', logEventInfo)
303
303
  console.log('otherParams', otherParams)
304
304
  const paramsStr = JSON.stringify(otherParams)
305
305
  console.log('跳转web jdb open协议', `${url}?params=${paramsStr}`)
306
306
  global.info.pageInfo.dataType === BUSINESS_TYPE.ONLINE &&
307
307
  this.clickEventLog(logEventInfo || getResParams)
308
308
  .then(() => {
309
309
  if (typeof successBack == 'function') {
310
310
  successBack(getResParams)
311
311
  } else {
312
312
  try {
313
313
  const paramsStr = JSON.stringify(otherParams)
314
314
  console.log(
315
315
  'success: 跳转web jdb open协议',
316
316
  `${url}?params=${paramsStr}`,
317
317
  )
318
318
  window.location.href = `${url}?params=${paramsStr}`
319
319
  } catch (e) {
320
320
  console.log('跳转异常', e)
321
321
  }
322
322
  }
323
323
  })
324
324
  .catch((e) => {
325
325
  console.log('catch', e)
326
326
  typeof failBack == 'function' && failBack(getResParams)
327
327
  })
328
328
  }
329
329
 
330
330
  clickEventLog(
331
331
  opts: JumpEventReportInterFace.OptEventLogParams = {},
332
332
  reportKey = 'click',
333
333
  ) {
334
334
  const { eventId, jsonParam, eventLevel = 3, ...otherParams } = opts
335
335
  if (eventId && jsonParam) {
336
336
  const { etModelInfo, logBaseInfo } = jsonParam
337
337
  let getJsonParam = {}
338
338
  if (etModelInfo && logBaseInfo) {
339
339
  getJsonParam = logBaseInfo
340
340
  } else {
341
341
  if (Array.isArray(jsonParam)){
342
342
  getJsonParam = jsonParam
343
343
  } else {
344
344
  getJsonParam = Object.assign(
345
345
  {},
346
346
  {
347
347
  shopid: global.info.queryInfo?.shopId,
348
348
  },
349
349
  jsonParam,
350
350
  )
351
351
  }
352
352
  }
353
353
  const webLogParams = {
354
354
  eid: eventId,
355
355
  elevel: eventLevel,
356
356
  eparam:JSON.stringify(getJsonParam),
357
357
  jsonParam: JSON.stringify(getJsonParam),
358
358
  etModel: JSON.stringify(etModelInfo || {}),
359
359
  pageId: this.logPageId,
360
360
  pageParam: this.logPageParamStr,
361
361
  ...otherParams,
362
362
  }
363
363
  return /click|exposure/.test(reportKey)
364
364
  ? reportClick(webLogParams)
365
365
  : reportToCart(opts,webLogParams)
366
366
  } else {
367
367
  console.log('暂无埋点参数eventId和eventParam')
368
368
  return Promise.resolve(false)
369
369
  }
370
370
  }
371
371
  getConfig(opt = {}) {
372
372
  return Object.assign(this, {}, defaultConfig, opt)
373
373
  }