-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.html
69 lines (67 loc) · 3.05 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<title>Go语言中文网</title>
<link rel="stylesheet" href="//necolas.github.io/normalize.css/latest/normalize.css"/>
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/github.min.css">
<link rel="stylesheet" href="/dist/css/main.css"/>
</head>
<body>
<div id="app"></div>
<script src="http://img.ishequ360.com/cssjs/bj-report.min.js"></script>
<script>
BJ_REPORT.init({
id: 1, // 上报 id, 不指定 id 将不上报
uin: 123, // 指定用户 id, (默认已经读取 qq uin)
combo: 1, // combo 是否合并上报, 0 关闭, 1 启动(默认)
delay: 1000, // 当 combo 为 true 可用,延迟多少毫秒,合并缓冲区中的上报(默认)
url: "/report.html", // 指定上报地址
ignore: [], // 忽略某个错误
random: 1, // 抽样上报,1~0 之间数值,1为100%上报(默认 1)
repeat: 1, // 重复上报次数(对于同一个错误超过多少次不上报)
// 避免出现单个用户同一错误上报过多的情况
onReport: function(id, errObj){}, // 当上报的时候回调。 id: 上报的 id, errObj: 错误的对象
ext: {
ua: navigator.userAgent,
density: window.devicePixelRatio,
width: window.screen.availWidth,
height: window.screen.availHeight
} // 扩展属性,后端做扩展处理属性。例如:存在 msid 就会分发到 monitor
});
</script>
<script>
~(function(global) {
"use strict";
var ready = false;
var callbacks = [];
global.NativeInitUtils = {
setReady: function() {
ready = true;
callbacks.forEach(function(callback) {
setTimeout(callback, 0);
});
callbacks = [];
},
onReady: function(callback) {
if (ready) {
setTimeout(callback, 0);
} else {
callbacks.push(callback);
}
}
};
})(window);
</script>
<script>
function onNativeInit() {
NativeInitUtils.setReady();
}
</script>
<script src="/dist/build.js?v=0.6"></script>
</body>
</html>