fixed a bug
This commit is contained in:
1 parent
574fc326cd
commit
4661c90034
10 files changed
+4
-1123
No files matched your search
@@ -25,29 +25,5 @@
|
||||
<pre>{{ log_content }}</pre>
|
||||
<div id="markdown-content" class="layui-card-body"></div>
|
||||
</div>
|
||||
|
||||
<!-- 引入 Layui 的 JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/layui-src/dist/layui.js"></script>
|
||||
<!-- <script>
|
||||
layui.use(['layer'], function(){
|
||||
var layer = layui.layer;
|
||||
|
||||
fetch('/get-log')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.content) {
|
||||
const htmlContent = marked.parse(data.content);
|
||||
document.getElementById('markdown-content').innerHTML = htmlContent;
|
||||
} else {
|
||||
document.getElementById('markdown-content').innerHTML = '<p>Error loading markdown.</p>';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error fetching the markdown:', error);
|
||||
document.getElementById('markdown-content').innerHTML = '<p>Failed to load markdown.</p>';
|
||||
layer.msg('Failed to load markdown.', {icon: 5});
|
||||
});
|
||||
});
|
||||
</script> -->
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user