update
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="flex items-center flex-col pb-[30vw] md:pb-[7vw]">
|
||||
<div v-if="!access" class="flex items-center flex-col pb-[30vw] md:pb-[7vw]">
|
||||
<product-page-course-detailsHeader :props="data.course" />
|
||||
<div
|
||||
class="flex flex-col flex-col-reverse md:flex-row justify-between w-[87.69%] md:w-[81.04%] mt-[10vw] md:mt-[4.7vw]"
|
||||
@@ -142,7 +142,7 @@
|
||||
</div>
|
||||
<div class="w-full md:w-[23.438vw] text-[#383E43]">
|
||||
<product-page-course-detailsCourse-status :props="data.course" />
|
||||
<product-page-course-detailsCourse-information :props="data.course" />
|
||||
<product-page-course-detailsCourse-information :props="[data.course, access]" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -198,6 +198,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<product-pageAttended-course />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -205,13 +208,22 @@ import { useToast } from "vue-toastification";
|
||||
const toast = useToast();
|
||||
const route = useRoute();
|
||||
const replayTarget = ref(null);
|
||||
const access = ref(false)
|
||||
const { data, refresh } = await useFetch("/api/productId", {
|
||||
method: "POST",
|
||||
body: {
|
||||
id: route.params.product,
|
||||
},
|
||||
});
|
||||
console.log(data.value.comments[0]);
|
||||
const myCourses = await useFetch('/api/auth/me')
|
||||
myCourses.data.value.course.forEach(element => {
|
||||
if (element.id === route.params.product) {
|
||||
access.value = true
|
||||
}else{
|
||||
access.value = false
|
||||
}
|
||||
|
||||
});
|
||||
const comment = ref(null);
|
||||
|
||||
const sendComment = async () => {
|
||||
|
||||
Reference in New Issue
Block a user