Прописала запрос на /registry/event/

This commit is contained in:
Daria Golova
2022-10-19 11:09:24 +03:00
parent a3311c040b
commit e7f5026d7b
2 changed files with 14 additions and 0 deletions

View File

@@ -35,6 +35,7 @@ export function clientsServer() {
}, },
], ],
})); }));
this.passthrough("http://45.84.227.122:8080/**");
}, },
}); });
} }

View File

@@ -23,6 +23,7 @@ export default {
dayStartTime: "8:00", dayStartTime: "8:00",
dayEndTime: "18:00", dayEndTime: "18:00",
}, },
eventsData: [],
}; };
}, },
methods: { methods: {
@@ -35,6 +36,18 @@ export default {
changeCalendarLayout(option) { changeCalendarLayout(option) {
this.calendarLayout = option; this.calendarLayout = option;
}, },
saveEventsData(res) {
this.eventsData = res.results;
},
fetchEventsData() {
fetch("http://45.84.227.122:8080/registry/event/")
.then((res) => res.json())
.then((res) => this.saveEventsData(res));
},
},
mounted() {
this.fetchEventsData();
console.log(this.eventsData);
}, },
}; };
</script> </script>