add events js to repo for develop usage

This commit is contained in:
Yanzhen Yu
2018-12-14 14:13:54 +08:00
parent b0b4249c45
commit b29fb5c697
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>
<script src="./bundle.js"></script>
<script src="./bundle.events.js"></script>
<script src="./events.js"></script>
<script>
const queryObj = {
sessionId: '8874be03-bf8f-411e-862a-64ea7f950026',
};
let query = '';
Object.keys(queryObj).forEach(key => {
query += `${key}=${queryObj[key]}&`;
// eslint-disable-next-line
new rrwebPlayer({
target: document.body,
data: {
events,
},
});
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>
</body>
</html>