add events js to repo for develop usage

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 7b855694e5
commit af856a64fa
2 changed files with 9 additions and 18 deletions

2
public/events.js Normal file

File diff suppressed because one or more lines are too long

View File

@@ -12,26 +12,15 @@
<body> <body>
<script src="./bundle.js"></script> <script src="./bundle.js"></script>
<script src="./bundle.events.js"></script> <script src="./events.js"></script>
<script> <script>
const queryObj = { // eslint-disable-next-line
sessionId: '8874be03-bf8f-411e-862a-64ea7f950026', new rrwebPlayer({
}; target: document.body,
let query = ''; data: {
Object.keys(queryObj).forEach(key => { events,
query += `${key}=${queryObj[key]}&`; },
}); });
fetch(`http://192.168.17.205:9090/api/events?${query}`)
.then(res => res.json())
.then(data => {
// eslint-disable-next-line
new rrwebPlayer({
target: document.body,
data: {
events: data.events,
},
});
});
</script> </script>
</body> </body>
</html> </html>