Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function reportPerf() {
var _context, _context2;
if (!times || !firstScreenLoadingTime) {
return;
}
times.firstScreenLoadingTime = firstScreenLoadingTime;
me.debugLogger('发送页面性能指标数据, 上报内容 => ', _objectSpread({}, times, {
url: _concatInstanceProperty(_context = "".concat(window.location.host)).call(_context, window.location.pathname)
})); // 需要等待首屏数据加载完成
cb && cb.call(me, 'perf', 20001, _objectSpread({}, times, {
url: _concatInstanceProperty(_context2 = "".concat(window.location.host)).call(_context2, window.location.pathname)
}));
}
function reportPerf() {
var _context, _context2;
if (!times || !firstScreenLoadingTime) {
return;
}
times.firstScreenLoadingTime = firstScreenLoadingTime;
me.debugLogger('发送页面性能指标数据, 上报内容 => ', _objectSpread({}, times, {
url: _concatInstanceProperty(_context = "".concat(window.location.host)).call(_context, window.location.pathname)
})); // 需要等待首屏数据加载完成
cb && cb.call(me, 'perf', 20001, _objectSpread({}, times, {
url: _concatInstanceProperty(_context2 = "".concat(window.location.host)).call(_context2, window.location.pathname)
}));
}
var realFields = _Object$keys(detail);
var needFields = [];
_forEachInstanceProperty(requireFields).call(requireFields, function (field) {
// 缺字端
if (_indexOfInstanceProperty(realFields).call(realFields, field) === -1) {
needFields.push(field);
}
});
if (needFields.length) {
var _context2;
return _concatInstanceProperty(_context2 = "code: ".concat(code, " \u8981\u6C42 ")).call(_context2, needFields.join(','), "\u5B57\u6BB5\u5FC5\u586B");
}
}
return '';
};
export var detailAdapter = function detailAdapter(code) {
getPageType: function getPageType() {
var _context;
var location = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.location;
return _concatInstanceProperty(_context = "".concat(location.host)).call(_context, location.pathname);
}
};