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