Commit 09cd6b15 authored by Reko Meriö's avatar Reko Meriö

Profiili

parent 646cc338
This diff is collapsed.
......@@ -2577,8 +2577,8 @@ __webpack_require__.r(__webpack_exports__);
lowerBody: [],
hats: [],
shoes: [],
age: 60,
gender: "N"
age: null,
gender: null
};
},
props: {
......@@ -2637,6 +2637,22 @@ __webpack_require__.r(__webpack_exports__);
this.upperBodyIndex = 0;
this.lowerBodyIndex = 0;
this.shoeIndex = 0;
},
getProfile: function getProfile() {
this.age = this.$store.getters.Age;
this.gender = this.$store.getters.Gender;
switch (this.gender) {
case "Mies":
this.gender = "M";
break;
case "Nainen":
this.gender = "N";
break;
}
console.log(this.gender);
}
},
watch: {
......@@ -2645,6 +2661,7 @@ __webpack_require__.r(__webpack_exports__);
}
},
mounted: function mounted() {
this.getProfile();
this.getClothes();
}
});
......@@ -3045,7 +3062,6 @@ __webpack_require__.r(__webpack_exports__);
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
name: "profile",
......@@ -3064,8 +3080,6 @@ __webpack_require__.r(__webpack_exports__);
getData: function getData() {
this.age = this.$store.getters.Age;
this.gender = this.$store.getters.Gender;
console.log(this.$store.getters.Age);
console.log(this.$store.getters.Gender);
}
},
mounted: function mounted() {
......@@ -20,8 +20,8 @@
lowerBody: [],
hats: [],
shoes: [],
age: 60,
gender: "N",
age: null,
gender: null,
}),
props: {
weatherData: Array,
......@@ -79,7 +79,19 @@
this.upperBodyIndex = 0;
this.lowerBodyIndex = 0;
this.shoeIndex = 0;
}
},
getProfile() {
this.age = this.$store.getters.Age;
this.gender = this.$store.getters.Gender;
switch(this.gender){
case "Mies" : this.gender = "M";
break;
case "Nainen" : this.gender = "N";
break;
}
console.log(this.gender);
}
},
watch: {
......@@ -88,7 +100,9 @@
}
},
mounted: function() {
this.getProfile();
this.getClothes();
},
}
......
......@@ -16,8 +16,7 @@
</v-card>
</v-flex>
</v-layout>
</div>
</div>
</template>
<script>
import {login} from '../helpers/auth';
......@@ -36,9 +35,7 @@
},
getData() {
this.age = this.$store.getters.Age;
this.gender = this.$store.getters.Gender;
console.log(this.$store.getters.Age);
console.log(this.$store.getters.Gender);
this.gender = this.$store.getters.Gender;
}
},
mounted: function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment