增加聊天记录导出为html
This commit is contained in:
1 parent
447dec78c9
commit
21fe2bbcbd
6 files changed
+163
-15
No files matched your search
@@ -4,6 +4,11 @@
|
||||
<meta charset="UTF-8">
|
||||
<title>chat</title>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
|
||||
<style>
|
||||
img {
|
||||
max-width: 400px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
</div>
|
||||
<div class="col-3" style="display: flex; justify-content: flex-end;">
|
||||
<button type="button" class="btn btn-primary">导出</button>
|
||||
<button id="btn_export" type="button" class="btn btn-primary">导出</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -184,6 +184,13 @@
|
||||
request_function(requestUrl);
|
||||
}
|
||||
});
|
||||
|
||||
// 导出按钮点击事件
|
||||
document.getElementById('btn_export').addEventListener('click', function () {
|
||||
var requestUrl = '/export_chat_data?username=' + encodeURIComponent(globalUsername);
|
||||
window.open(requestUrl);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
Reference in new issue
Block a user