Commit f6b1f985 authored by fanxuehui's avatar fanxuehui

fix:

parent 6c947e5d
......@@ -63,9 +63,7 @@ class Reporter {
}
});
const extra = {
system: this.system,
userIdentifier: this.userIdentifier,
path: this.path,
...this.baseInfo,
recordKey: this.recordKey,
trackId: trackId,
isCDN: true,
......@@ -94,9 +92,7 @@ class Reporter {
}
toBus(data) {
const extra = {
system: this.system,
userIdentifier: this.userIdentifier,
path: this.path,
...this.baseInfo,
recordKey: this.recordKey,
trackId: this.counter.next(),
isCDN: false,
......
......@@ -15,13 +15,13 @@ onmessage = ({ data: { type, payload } }) => {
reporter.toBus(payload);
log("bus", reporter.bus);
// todo : 全量快照上传cdn
log("track type", payload.type);
log("track type", payload.type, payload);
if (payload.type === 2) {
reporter.toCDN(payload);
}
// todo : 数据压缩
// 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);
}
// 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