Merge branch 'main' of http://10.10.14.176:3000/huanghai/QingLong
commit
8bbc3e86d5
@ -0,0 +1,71 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title></title>
|
||||||
|
<link rel="stylesheet" href="../../../component/pear/css/pear.css" />
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="pear-container layui-form">
|
||||||
|
|
||||||
|
<pre class="layui-code code-demo" id="logs">
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<script src="../../../component/layui/layui.js"></script>
|
||||||
|
<script src="../../../component/pear/pear.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
layui.use(function () {
|
||||||
|
var $ = layui.jquery;
|
||||||
|
// code
|
||||||
|
|
||||||
|
var ts = GetQueryString('ts');
|
||||||
|
|
||||||
|
getTextFile('/QingLong/Logs/' + ts + '.log');
|
||||||
|
|
||||||
|
function getTextFile(url) {
|
||||||
|
let loading = layer.load();
|
||||||
|
fetch(url)
|
||||||
|
.then(response => {
|
||||||
|
if (!response.ok) {
|
||||||
|
layer.close(loading);
|
||||||
|
layer.msg('读取失败!', { icon: 2 });
|
||||||
|
} else {
|
||||||
|
return response.text();
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.then(content => {
|
||||||
|
layer.close(loading);
|
||||||
|
layui.code({
|
||||||
|
elem: '.code-demo',
|
||||||
|
code: content
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
layer.close(loading);
|
||||||
|
layer.msg('读取失败!', { icon: 2 });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function GetQueryString(name, istop) {
|
||||||
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||||
|
var r = window.location.search.substr(1).match(reg);
|
||||||
|
if (typeof (istop) != "undefined") r = top.location.search.substr(1).match(reg);
|
||||||
|
|
||||||
|
if (r != null) return unescape(r[2]);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
Loading…
Reference in new issue