增加聊天记录导出为html

This commit is contained in:
xaoyo committed 2023-11-16 18:55:45 +08:00
1 parent 447dec78c9
commit 21fe2bbcbd
6 files changed
+163 -15

No files matched your search

+8 -1
View File
@@ -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>