Skip to content
Snippets Groups Projects
Commit 80bc4ae0 authored by Bilel El Yaagoubi's avatar Bilel El Yaagoubi
Browse files

middly finished page

parent 381ca560
No related branches found
No related tags found
1 merge request!8Movie page
Pipeline #42598 passed
<template> <template>
<div class="parent"> <div class="parent">
<div class="child">
<h1>{{ movieTitle }}</h1> <h1>{{ movieTitle }}</h1>
<h4>{{ movieVoteAverage }}</h4> <div class="mark">
<h4>{{ genreArray }}</h4> <h2>{{ movieVoteAverage }}</h2>
<h4>{{ movieOverview }} {{ movieOverview }} {{ movieOverview }}</h4> </div>
</div>
<h4>Genres : {{ genreArray.join(", ") }}</h4>
<h4>{{ movieOverview }}</h4>
</div> </div>
</template> </template>
...@@ -27,12 +31,9 @@ export default { ...@@ -27,12 +31,9 @@ export default {
methods: { methods: {
developGenre: async function (genreId) { developGenre: async function (genreId) {
try { try {
console.log("g");
const response = await axios const response = await axios
.get(backendURL + "/genres/genre/id/" + genreId) .get(backendURL + "/genres/genre/id/" + genreId)
.then(); .then();
console.log("oi");
console.log(response.data);
return response.data; return response.data;
} catch (error) { } catch (error) {
console.log(error); console.log(error);
...@@ -40,10 +41,6 @@ export default { ...@@ -40,10 +41,6 @@ export default {
}, },
developGenres: function (genreIdArray) { developGenres: function (genreIdArray) {
try { try {
var res = [];
console.log("f");
console.log(genreIdArray);
// console.log([12, 16].map(this.developGenre));
const genreArray = genreIdArray.map(this.developGenre); const genreArray = genreIdArray.map(this.developGenre);
return Promise.all(genreArray); return Promise.all(genreArray);
} catch (error) { } catch (error) {
...@@ -53,11 +50,7 @@ export default { ...@@ -53,11 +50,7 @@ export default {
}, },
}, },
created() { created() {
console.log("a"); this.developGenres(this.movieGenres).then((results) => {
console.log();
console.log("b");
this.genreArray = this.developGenres([12, 16]).then((results) => {
this.genreArray = results; this.genreArray = results;
}); });
}, },
...@@ -70,4 +63,17 @@ export default { ...@@ -70,4 +63,17 @@ export default {
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;
} }
.child {
display: flex;
justify-content: flex-start;
}
.mark {
text-align: center;
vertical-align: center;
width: 10%;
height: auto;
background-color: #912f56;
border-radius: 25%;
margin-left: auto;
}
</style> </style>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment