@conecli/cone-render 0.8.15-beta.49 → 0.8.15-beta.50

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.
@@ -1 +1 @@
1
- import { useReducer } from 'react'
2
1
  const isTimeout = startWaitTime != 0 && (Date.now() - startWaitTime >= 1000)
3
2
  const isOverMax = arrTask.length >= 10
4
3
  if(isTimeout || isOverMax){
5
4
  debugger
6
5
  const reduceData = connactData(arrTask)
7
6
  track.reportExposureEventLog(reduceData)
8
7
  arrTask = []
9
8
  startWaitTime = 0
10
9
  clearTimeout(timer)
11
10
  }
12
11
  const initData = JSON.parse(JSON.stringify(arr[1]))
13
12
  initData.jsonParam.logBaseInfo = []
14
13
  initData.jsonParam.etModelInfo.lstms = []
15
14
  return arr.reduce((acc, cur) => {
16
15
  cur.jsonParam.etModelInfo.lstms[0].p_id = cur.eventId
17
16
  cur.jsonParam.etModelInfo.lstms[0].la_p = cur.jsonParam.logBaseInfo.mInfo.pos
18
17
  acc.jsonParam.logBaseInfo.push(cur.jsonParam.logBaseInfo)
19
18
  acc.jsonParam.etModelInfo.lstms.push(cur.jsonParam.etModelInfo.lstms)
20
19
  return acc
21
20
  }, initData)
22
21
  if(!Array.isArray(data)){
23
22
  console.log('坑位曝光埋点原始数据参类型错误,期望是数组,实际是:', data)
24
23
  return
25
24
  }
26
25
  const [floorData, mInfo, etModelInfo] = data
27
26
  if(floorData && mInfo && etModelInfo){
28
27
  const reportJson = track.getIsvExposureInfo(floorData, mInfo, etModelInfo)
29
28
  if(arrTask.length === 0){
30
29
  startWaitTime = Date.now()
31
30
  }
32
31
  if(reportJson){
33
32
  arrTask.push(reportJson)
34
33
  clearTimeout(timer)
35
34
  timer = setTimeout(check, 1000)
36
35
  check()
37
36
  }
38
37
  }else{
39
38
  console.log('坑位曝光埋点原始数据参数缺失,期望是[floorData, mInfo, etModelInfo],实际是:', data)
40
39
  }
40
+ import { useReducer } from 'react'
41
41
  const isTimeout = startWaitTime != 0 && (Date.now() - startWaitTime >= 1000)
42
42
  const isOverMax = arrTask.length >= 10
43
43
  const hasData = arrTask.length > 0
44
44
  if(hasData && (isTimeout || isOverMax)){
45
45
  const reduceData = connactData(arrTask)
46
46
  track.reportExposureEventLog(reduceData)
47
47
  arrTask = []
48
48
  startWaitTime = 0
49
49
  clearTimeout(timer)
50
50
  }
51
51
  const initData = JSON.parse(JSON.stringify(arr[0]))
52
52
  initData.jsonParam.logBaseInfo = []
53
53
  initData.jsonParam.etModelInfo.lstms = []
54
54
  return arr.reduce((acc, cur) => {
55
55
  cur.jsonParam.etModelInfo.lstms[0].la_p = cur.jsonParam.logBaseInfo.mInfo.pos
56
56
  acc.jsonParam.logBaseInfo.push(cur.jsonParam.logBaseInfo)
57
57
  acc.jsonParam.etModelInfo.lstms.push(cur.jsonParam.etModelInfo.lstms)
58
58
  return acc
59
59
  }, initData)
60
60
  if(!Array.isArray(data)){
61
61
  console.log('坑位曝光埋点原始数据参类型错误,期望是数组,实际是:', data)
62
62
  return
63
63
  }
64
64
  const [floorData, mInfo, etModelInfo] = data
65
65
  if(floorData && mInfo && etModelInfo){
66
66
  const reportJson = track.getIsvExposureInfo(floorData, mInfo, etModelInfo)
67
67
  if(arrTask.length === 0){
68
68
  startWaitTime = Date.now()
69
69
  }
70
70
  if(reportJson){
71
71
  arrTask.push(reportJson)
72
72
  clearTimeout(timer)
73
73
  timer = setTimeout(check, 1000)
74
74
  check()
75
75
  }
76
76
  }else{
77
77
  console.log('坑位曝光埋点原始数据参数缺失,期望是[floorData, mInfo, etModelInfo],实际是:', data)
78
78
  }
@@ -1 +1 @@
1
- import { JumpEventReport, JumpEventReportPromise } from '../../jumpEventReport'
1
+ import { JumpEventReport, JumpEventReportPromise } from '../../jumpEventReport'
2
2
  initReportBaseData: ReportContainerData.initReportBaseData.bind(ReportContainerData),
3
3
  updateSectionTabDataInfo: ReportContainerData.updateSectionTabDataInfo.bind(ReportContainerData),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conecli/cone-render",
3
- "version": "0.8.15-beta.49",
3
+ "version": "0.8.15-beta.50",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist/"