42 lines
848 B
Vue
42 lines
848 B
Vue
<script>
|
|
import axios from 'axios';
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
count: 0,
|
|
circleData: {}
|
|
}
|
|
},
|
|
mounted() {
|
|
console.log('CircleAnalyseExampleView mounted');
|
|
axios({
|
|
method: 'get',
|
|
url: 'http://localhost:8000/wagtailapi/v2/pages/?type=learnpath.Circle&slug=analyse&fields=title,description,learning_sequences'
|
|
}).then((response) => {
|
|
this.circleData = response.data.items[0];
|
|
});
|
|
}
|
|
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div class="circle">
|
|
<h1 class="text-6xl">
|
|
Hello world!
|
|
</h1>
|
|
|
|
<div v-for="learningSequence in circleData.learning_sequences">
|
|
<h2>{{learningSequence.title}}</h2>
|
|
<div v-for="learningPackage in learningSequence.learning_packages">
|
|
<h3>{{learningPackage.id}}</h3>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
|
|
</style>
|