Some other stuff

This commit is contained in:
Frank 2021-11-17 16:32:39 -05:00
parent a500ad19e9
commit 7a5a537cd4
3 changed files with 14 additions and 17 deletions

View file

@ -1,8 +1,8 @@
<template>
<div class="select-car">
<div class="select-car-form rounded text-center">
<!-- <Header :text="headerTextWidgetModel.HeaderText" class="Header" />
<yearQuestion :questionText="radioQuestionWidgetModel.QuestionText" /> -->
<Header :text="headerTextWidgets[0].HeaderText" class="Header" />
<yearQuestion :questionText="radioQuestionWidgets[0].QuestionText" />
</div>
</div>
</template>
@ -20,15 +20,18 @@ export default {
};
},
computed: {},
async mounted() {
created() {
let self = this;
this.GetContentFromCms().then(response => {
self.headerTextWidgets = response.HeaderTextWidget;
self.radioQuestionWidgets = response.RadioQuestionWidget;
});
const content = await this.GetContentFromCms();
this.headerTextWidgets = content.HeaderTextWidget;
console.log(content);
},
components: {
// yearQuestion,
// Header,
yearQuestion,
Header,
},
};
</script>

View file

@ -4,8 +4,6 @@
<script>
import radioQuestion from "@/commonComponents/radioQuestion/radioQuestion";
import store from "@/store";
import router from "@/router";
export default {
name: "year-question",
@ -17,9 +15,8 @@ export default {
years: [],
};
},
mounted() {
this.dispatchNonBlockingStoreAction(this.storeActions.GET_VEHICLE_YEARS, {}
).then((response) => {
created() {
this.dispatchNonBlockingStoreAction(this.storeActions.GET_VEHICLE_YEARS, {}).then((response) => {
this.years = response.data;
});
},

View file

@ -20,10 +20,7 @@ export default {
},
GetContentFromCms() {
return this.dispatchNonBlockingStoreAction(
this.storeActions.GET_PAGE_DATA,
{ pageName: this.$route.query.fmgPage }
).then((response) => {
return this.dispatchNonBlockingStoreAction(this.storeActions.GET_PAGE_DATA,{ pageName: this.$route.query.fmgPage }).then((response) => {
const pageDataFromCms = {};
response.data.Result.forEach((widget) => {