Commit f6b1f985 authored by fanxuehui's avatar fanxuehui

fix:

parent 6c947e5d
...@@ -63,9 +63,7 @@ class Reporter { ...@@ -63,9 +63,7 @@ class Reporter {
} }
}); });
const extra = { const extra = {
system: this.system, ...this.baseInfo,
userIdentifier: this.userIdentifier,
path: this.path,
recordKey: this.recordKey, recordKey: this.recordKey,
trackId: trackId, trackId: trackId,
isCDN: true, isCDN: true,
...@@ -94,9 +92,7 @@ class Reporter { ...@@ -94,9 +92,7 @@ class Reporter {
} }
toBus(data) { toBus(data) {
const extra = { const extra = {
system: this.system, ...this.baseInfo,
userIdentifier: this.userIdentifier,
path: this.path,
recordKey: this.recordKey, recordKey: this.recordKey,
trackId: this.counter.next(), trackId: this.counter.next(),
isCDN: false, isCDN: false,
......
...@@ -15,13 +15,13 @@ onmessage = ({ data: { type, payload } }) => { ...@@ -15,13 +15,13 @@ onmessage = ({ data: { type, payload } }) => {
reporter.toBus(payload); reporter.toBus(payload);
log("bus", reporter.bus); log("bus", reporter.bus);
// todo : 全量快照上传cdn // todo : 全量快照上传cdn
log("track type", payload.type); log("track type", payload.type, payload);
if (payload.type === 2) { if (payload.type === 2) {
reporter.toCDN(payload); reporter.toCDN(payload);
} }
// todo : 数据压缩 // todo : 数据压缩
// todo : 根据事件类型优先级触发上传策略(click) // todo : 根据事件类型优先级触发上传策略(click)
if (payload.data.source === 2 && !reporter.isUploading) { if (payload.data.source === 2 && (payload.data.type === 2 || payload.data.type === 3) && !reporter.isUploading) {
reporter.report(reporter.bus); reporter.report(reporter.bus);
} }
// todo : 数据超出100条上线,自动上传 // todo : 数据超出100条上线,自动上传
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment