Authored by htoooth

add router

... ... @@ -17,7 +17,8 @@ var errReporter = {
u: reporter.getUid(),
ud: reporter.getUdid(),
rid: reporter.getReqId(),
st: JSON.stringify(error && error.stack)
st: JSON.stringify(error && error.stack),
r: reporter.getRoute()
});
cookies(errorKey, JSON.stringify(errorList));
... ...
... ... @@ -51,6 +51,9 @@ var reporter = {
},
getReqId: function() {
return cookies('docreqid') || 0;
},
getRoute: function() {
return window._router || '';
}
};
... ...
... ... @@ -67,6 +67,7 @@ var speedReporter = {
var ud = reporter.getUdid();
var rid = reporter.getReqId();
var pStart = window.performance && window.performance.timing.navigationStart || 0;
var r = reporter.getRoute();
_timeStart = window._timeStart || 0;
... ... @@ -77,7 +78,8 @@ var speedReporter = {
pt: pt,
u: u,
ud: ud,
rid: rid
rid: rid,
r: r
});
// 首屏加载速度
... ... @@ -94,7 +96,8 @@ var speedReporter = {
pt: pt,
u: u,
ud: ud,
rid: rid
rid: rid,
r: r
});
// 首屏加载速度
... ... @@ -110,7 +113,8 @@ var speedReporter = {
pt: pt,
u: u,
ud: ud,
rid: rid
rid: rid,
r: r
});
}
... ... @@ -121,7 +125,8 @@ var speedReporter = {
pt: pt,
u: u,
ud: ud,
rid: rid
rid: rid,
r: r
});
self.reportTime(timeList);
... ...