fixed faq bugs
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
body {
|
body {
|
||||||
font-family: "Iransans";
|
font-family: "Iransans";
|
||||||
direction: rtl;
|
direction: rtl;
|
||||||
|
overflow-x: hidden !important;
|
||||||
}
|
}
|
||||||
@layer utilities {
|
@layer utilities {
|
||||||
.pinkShadow {
|
.pinkShadow {
|
||||||
|
|||||||
+1
-1
@@ -129,7 +129,7 @@
|
|||||||
</linearGradient>
|
</linearGradient>
|
||||||
</defs>
|
</defs>
|
||||||
</svg>
|
</svg>
|
||||||
<span class="absolute top-[0.9vw] w-[1.5vw] text-center left-[0.4vw] text-[#383E43] font-bold thin text-[0.833vw]">{{props.course.averageRating}}</span>
|
<span class="absolute top-[1.3vw] md:top-[0.9vw] w-[1.5vw] text-center left-[3.7vw] md:left-[0.4vw] text-[#383E43] font-bold thin md:text-[0.833vw]">{{props.course.averageRating}}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,6 @@
|
|||||||
const props = defineProps(['item']);
|
const props = defineProps(['item']);
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
console.log(props);
|
|
||||||
const change = () =>{
|
const change = () =>{
|
||||||
router.replace(`/${props.item.id}`)
|
router.replace(`/${props.item.id}`)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<img src="/public/images/HeaderBg.jpg" class="absolute top-0 left-0 w-full h-full object-cover -z-[1] scale-x-[-1] md:scale-x-[1]" alt="">
|
<img src="/public/images/HeaderBg.jpg" class="absolute top-0 left-0 w-full h-full object-cover -z-[1] scale-x-[-1] md:scale-x-[1]" alt="">
|
||||||
<div class=" flex w-[81.04%] text-white">
|
<div class=" flex w-[81.04%] text-white">
|
||||||
<div class="flex flex-col text-start">
|
<div class="flex flex-col text-start">
|
||||||
<h2 class="w-[25vw] text-[5.751vw] md:text-[2.188vw] font-bold mt-[25vw] md:mt-[0.052vw]">
|
<h2 class="md:w-[25vw] text-[5.751vw] md:text-[2.188vw] font-bold mt-[25vw] md:mt-[0.052vw]">
|
||||||
{{ headers.data?.value.header }}
|
{{ headers.data?.value.header }}
|
||||||
</h2>
|
</h2>
|
||||||
<p class="hidden md:block mt-[1.25vw] text-[1.055vw] leading-[30.38px] mb-[2.917vw]">
|
<p class="hidden md:block mt-[1.25vw] text-[1.055vw] leading-[30.38px] mb-[2.917vw]">
|
||||||
|
|||||||
@@ -409,7 +409,7 @@
|
|||||||
{{ item.headline }}
|
{{ item.headline }}
|
||||||
</div>
|
</div>
|
||||||
<div class="flexBox gap-[1vw] md:gap-[0.3vw]">
|
<div class="flexBox gap-[1vw] md:gap-[0.3vw]">
|
||||||
02:24
|
{{ convertStoMs(item.time) }}
|
||||||
<svg
|
<svg
|
||||||
class="h-[4.359vw] w-[4.359vw] md:h-[0.99vw] md:w-[0.99vw]"
|
class="h-[4.359vw] w-[4.359vw] md:h-[0.99vw] md:w-[0.99vw]"
|
||||||
viewBox="0 0 19 20"
|
viewBox="0 0 19 20"
|
||||||
@@ -456,7 +456,7 @@
|
|||||||
class="flex justify-between text-[3.19vw] md:text-[0.833vw] font-semibold text-[#383E43]"
|
class="flex justify-between text-[3.19vw] md:text-[0.833vw] font-semibold text-[#383E43]"
|
||||||
>
|
>
|
||||||
<span class="text-[3.59vw] md:text-[0.938vw]">پیشرفت شما</span>
|
<span class="text-[3.59vw] md:text-[0.938vw]">پیشرفت شما</span>
|
||||||
<span>{{ progress.completionPercentage }}%</span>
|
<span>{{ Math.floor(progress.completionPercentage) }}%</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
id="progressbar"
|
id="progressbar"
|
||||||
@@ -500,6 +500,19 @@ const { data, refresh } = await useFetch("/api/courseHeadlines", {
|
|||||||
id: route.params.product,
|
id: route.params.product,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
function convertStoMs(seconds) {
|
||||||
|
let minutes = Math.floor(seconds / 60);
|
||||||
|
let extraSeconds = seconds % 60;
|
||||||
|
minutes = minutes < 10 ? "0" + minutes : minutes;
|
||||||
|
return (
|
||||||
|
minutes +
|
||||||
|
":" +
|
||||||
|
(extraSeconds < 10
|
||||||
|
? "0" + Math.floor(extraSeconds)
|
||||||
|
: Math.floor(extraSeconds))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
async function addToProgress() {
|
async function addToProgress() {
|
||||||
await $fetch("/api/progressCounter", {
|
await $fetch("/api/progressCounter", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@@ -510,14 +523,13 @@ async function addToProgress() {
|
|||||||
}
|
}
|
||||||
import progressAlert from "@/components/progressAlert.vue";
|
import progressAlert from "@/components/progressAlert.vue";
|
||||||
const handleVideoEnded = async () => {
|
const handleVideoEnded = async () => {
|
||||||
|
|
||||||
addToProgress();
|
addToProgress();
|
||||||
|
|
||||||
reload();
|
reload();
|
||||||
if (process.client) {
|
if (process.client) {
|
||||||
document.querySelector(".next").classList.remove("hidden");
|
document.querySelector(".next").classList.remove("hidden");
|
||||||
}
|
}
|
||||||
toast.success('ویدیو به پایان رسید');
|
toast.success("ویدیو به پایان رسید");
|
||||||
};
|
};
|
||||||
|
|
||||||
const sendComment = async () => {
|
const sendComment = async () => {
|
||||||
@@ -567,7 +579,6 @@ if (query.value.hasOwnProperty("episode")) {
|
|||||||
fileName: fimd.videoUrl,
|
fileName: fimd.videoUrl,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log("video", getUrl.data.value.url);
|
|
||||||
url.value = getUrl.data.value.url;
|
url.value = getUrl.data.value.url;
|
||||||
index.value = data.value.indexOf(fimd);
|
index.value = data.value.indexOf(fimd);
|
||||||
refresh();
|
refresh();
|
||||||
@@ -602,21 +613,21 @@ async function chengeVideo(item) {
|
|||||||
|
|
||||||
await refresh();
|
await refresh();
|
||||||
}
|
}
|
||||||
console.log("yek", data.value[index.value]);
|
|
||||||
async function nextHandler() {
|
async function nextHandler() {
|
||||||
if (process.client) {
|
if (process.client) {
|
||||||
document.querySelector(".next").classList.add("hidden");
|
document.querySelector(".next").classList.add("hidden");
|
||||||
}
|
}
|
||||||
query.value = { ...route.query, episode: data.value[index.value + 1].id };
|
query.value = { ...route.query, episode: data.value[index.value + 1].id };
|
||||||
index.value = index.value + 1;
|
index.value = index.value + 1;
|
||||||
console.log("index", index);
|
|
||||||
// const addToProgress = await $fetch("/api/progressCounter", {
|
// const addToProgress = await $fetch("/api/progressCounter", {
|
||||||
// method: "POST",
|
// method: "POST",
|
||||||
// body: {
|
// body: {
|
||||||
// id: route.query.episode,
|
// id: route.query.episode,
|
||||||
// },
|
// },
|
||||||
// });
|
// });
|
||||||
addToProgress()
|
addToProgress();
|
||||||
activeHead.value = data.value[index.value];
|
activeHead.value = data.value[index.value];
|
||||||
const getUrl = await useFetch("/api/checkMedia", {
|
const getUrl = await useFetch("/api/checkMedia", {
|
||||||
query: {
|
query: {
|
||||||
|
|||||||
@@ -147,5 +147,4 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
const props = defineProps(['props'])
|
const props = defineProps(['props'])
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@@ -262,6 +262,8 @@
|
|||||||
import { useToast } from "vue-toastification";
|
import { useToast } from "vue-toastification";
|
||||||
const { authUser } = useAuth();
|
const { authUser } = useAuth();
|
||||||
const props = defineProps(["props"], ["access"]);
|
const props = defineProps(["props"], ["access"]);
|
||||||
|
|
||||||
|
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const paymentHandler = (id) => {
|
const paymentHandler = (id) => {
|
||||||
|
|||||||
@@ -61,8 +61,8 @@
|
|||||||
class="mt-[3vw] md:mt-[0.7vw] h-[2.051vw] md:h-[0.521vw] rounded-[2vw] md:rounded-[0.521vw]"
|
class="mt-[3vw] md:mt-[0.7vw] h-[2.051vw] md:h-[0.521vw] rounded-[2vw] md:rounded-[0.521vw]"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
:class="`w-[${props.props.completionPercentage}%]`"
|
|
||||||
|
|
||||||
|
:style="{ width: activeClass + '%' }"
|
||||||
class="rounded-[2vw] md:rounded-[0.521vw] h-[2.051vw] md:h-[0.521vw]"
|
class="rounded-[2vw] md:rounded-[0.521vw] h-[2.051vw] md:h-[0.521vw]"
|
||||||
>
|
>
|
||||||
<!-- {{props.props.completionPercentage}} -->
|
<!-- {{props.props.completionPercentage}} -->
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
const adad = 2;
|
const adad = 2;
|
||||||
const props = defineProps(['props'])
|
const props = defineProps(['props'])
|
||||||
|
const activeClass = ref(props.props.completionPercentage);
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -17,35 +17,15 @@
|
|||||||
>توضیحات</span
|
>توضیحات</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<p class="mt-[4vw] md:mt-[2.1vw] thin">
|
<div class="descriptions mt-[4vw] md:mt-[2.1vw] thin">
|
||||||
{{props.props.description}}
|
</div>
|
||||||
</p>
|
|
||||||
<p class="mt-[3.4vw] thin">
|
|
||||||
شینان در کنار شماست تا بدون سردرگمی و گشتن بین آموزش های مختلف، کامل
|
|
||||||
ترین و تخصصی ترین آموزش HTML رو دریافت کنید و مزه ی یک آموزش اصولی و
|
|
||||||
یادگیری راحت رو بچشید و خیلی زود قدم های بعدی رو بردارید تا به شغل ها
|
|
||||||
و درآمدهای بالا برسید.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p class="text-[4.038vw] md:text-[1.335vw] mt-[10vw] md:mt-[4.8vw]">
|
|
||||||
این دوره برای چه کسانی مناسب هست؟
|
|
||||||
</p>
|
|
||||||
<p class="mt-[5vw] md:mt-[2.2vw] thin">اگر :</p>
|
|
||||||
<ul class="ms-[3vw] md:ms-[1vw] list-disc thin">
|
|
||||||
<li>به حوزه فرانت اند و طراحی رابط کاربری (UI) علاقه دارید</li>
|
|
||||||
<li>دوست دارید صفحات سایت خودتون رو شخصا به شکل دلخواه تغییر بدید</li>
|
|
||||||
<li>
|
|
||||||
قصد دارید سایت هارو آنالیز کنید یا از ساختار اونها ایده بگیرید
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
قصد دارید یک برنامه نویس وب (طراح سایت و اپلیکیشن تحت وب) بشید
|
|
||||||
</li>
|
|
||||||
<li>دوست دارید کدهای بهینه تولید کنید تا سئوی قوی تری داشته باشید</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
const props = defineProps(['props'])
|
const props = defineProps(['props'])
|
||||||
|
|
||||||
|
if (process.client) {
|
||||||
|
document.querySelector('.descriptions').innerHTML = props.props.description;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -2,28 +2,26 @@
|
|||||||
<div class="w-full relative flex h-[86.41vw] md:h-[40.625vw]">
|
<div class="w-full relative flex h-[86.41vw] md:h-[40.625vw]">
|
||||||
<NuxtImg
|
<NuxtImg
|
||||||
:placeholder="[30, 20]"
|
:placeholder="[30, 20]"
|
||||||
:src="props.props.image"
|
:src="props.props?.image"
|
||||||
alt="html"
|
alt="html"
|
||||||
class="absolute h-[86.41vw] md:h-[40.625vw] top-0 left-0 w-full object-cover brightness-75"
|
class="absolute h-[86.41vw] md:h-[40.625vw] top-0 left-0 w-full object-cover brightness-75"
|
||||||
/>
|
/>
|
||||||
<div class="mt-[14vw] ms-[9.5vw] z-[1] text-white">
|
<div class="mt-[14vw] ms-[9.5vw] z-[1] text-white">
|
||||||
<h1 class="text-[5.751vw] md:text-[1.69vw] font-[600] -tracking-[0.05vw]">
|
<h1 class="text-[5.751vw] md:text-[1.69vw] font-[600] -tracking-[0.05vw]">
|
||||||
{{ props.props.name }}
|
{{ props.props?.name }}
|
||||||
</h1>
|
</h1>
|
||||||
<p class="text-[3.19vw] md:text-[0.833vw] mt-[0.6vw] text-[#E5E5E5]">
|
<p class="text-[3.19vw] md:text-[0.833vw] mt-[0.6vw] text-[#E5E5E5]">
|
||||||
{{ props.props.categories[0].name }}
|
{{ props.props?.categories[0].name }}
|
||||||
</p>
|
|
||||||
<p
|
|
||||||
class="hidden md:block w-[39.896vw] text-[1.055vw] leading-[1.582vw] mt-[1.2vw]"
|
|
||||||
>
|
|
||||||
{{ props.props.description }}
|
|
||||||
</p>
|
</p>
|
||||||
|
<div
|
||||||
|
class="descriptios hidden md:block w-[39.896vw] text-[1.055vw] leading-[1.582vw] mt-[1.2vw]"
|
||||||
|
></div>
|
||||||
<p
|
<p
|
||||||
class="text-[2.836vw] md:text-[0.741vw] text-[##E5E5E5] mt-[1.8vw] absolute bottom-[8vw] md:bottom-auto md:relative"
|
class="text-[2.836vw] md:text-[0.741vw] text-[##E5E5E5] mt-[1.8vw] absolute bottom-[8vw] md:bottom-auto md:relative"
|
||||||
>
|
>
|
||||||
مدرس دوره :
|
مدرس دوره :
|
||||||
<span class="text-[3.59vw] md:text-[1.055vw] text-white ms-[1vw]"
|
<span class="text-[3.59vw] md:text-[1.055vw] text-white ms-[1vw]"
|
||||||
>حمیدرضا عبادی</span
|
>{{props.props?.teacher.name}}</span
|
||||||
>
|
>
|
||||||
</p>
|
</p>
|
||||||
<div
|
<div
|
||||||
@@ -113,9 +111,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
<div class="space-y-[0.3vw]">
|
<div class="space-y-[0.3vw]">
|
||||||
<p class="text-[3.59vw] md:text-[1.055vw]">آخرین بروزرسانی</p>
|
<p class="text-[3.59vw] md:text-[1.055vw]">آخرین بروزرسانی</p>
|
||||||
<p class="text-[2.518vw] md:text-[0.741vw]">
|
<p class="text-[2.518vw] md:text-[0.741vw]">{{jDate(props.props?.updatedAt)}}</p>
|
||||||
{{ shamsi[2] }} / {{ shamsi[1] }} / {{ shamsi[0] }}
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="border-l"></div>
|
<div class="border-l"></div>
|
||||||
@@ -145,7 +141,7 @@
|
|||||||
<div class="space-y-[0.3vw]">
|
<div class="space-y-[0.3vw]">
|
||||||
<p class="text-[3.59vw] md:text-[1.055vw]">مدت زمان دوره</p>
|
<p class="text-[3.59vw] md:text-[1.055vw]">مدت زمان دوره</p>
|
||||||
<p class="text-[2.518vw] md:text-[0.741vw]">
|
<p class="text-[2.518vw] md:text-[0.741vw]">
|
||||||
{{ props.props.duration }} ساعت
|
{{ props.props?.duration }} ساعت
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -189,7 +185,7 @@
|
|||||||
|
|
||||||
<div class="space-y-[0.3vw]">
|
<div class="space-y-[0.3vw]">
|
||||||
<p class="text-[3.59vw] md:text-[1.055vw]">
|
<p class="text-[3.59vw] md:text-[1.055vw]">
|
||||||
{{ props.props.studentsCount }}
|
{{ props.props?.studentsCount }}
|
||||||
</p>
|
</p>
|
||||||
<p class="text-[2.518vw] md:text-[0.741vw]">دانشجو</p>
|
<p class="text-[2.518vw] md:text-[0.741vw]">دانشجو</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -201,15 +197,20 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
const props = defineProps(["props"]);
|
const props = defineProps(["props"]);
|
||||||
const isoDateString = props.props.createdAt;
|
import {jDate} from "@/utils/jDate"
|
||||||
const dateObject = new Date(isoDateString);
|
|
||||||
const year = dateObject.getFullYear();
|
|
||||||
const month = dateObject.getMonth() + 1;
|
|
||||||
const day = dateObject.getDate();
|
|
||||||
const hours = dateObject.getHours();
|
|
||||||
const minutes = dateObject.getMinutes();
|
|
||||||
const seconds = dateObject.getSeconds();
|
|
||||||
|
|
||||||
|
if (process.client) {
|
||||||
const shamsi = gregorian_to_jalali(year,month,day)
|
const des = props?.props.description;
|
||||||
|
function hideEndOfString(inputString) {
|
||||||
|
const words = inputString.split(" ");
|
||||||
|
if (words.length > 50) {
|
||||||
|
const truncatedWords = words.slice(0, 50);
|
||||||
|
return truncatedWords.join(" ") + "...";
|
||||||
|
} else {
|
||||||
|
return inputString;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const data = hideEndOfString(des);
|
||||||
|
document.querySelector(".descriptios").innerHTML = data;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -113,31 +113,6 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -283,8 +283,8 @@
|
|||||||
|
|
||||||
<nuxt-link to="/account" v-if="authUser">
|
<nuxt-link to="/account" v-if="authUser">
|
||||||
<img
|
<img
|
||||||
v-if="profileImage"
|
v-if="authUser.avatarMedia"
|
||||||
:src="profileImage"
|
:src="authUser.avatarMedia"
|
||||||
alt="profile"
|
alt="profile"
|
||||||
class="h-[3.698vw] w-[3.698vw] rounded-full p-[0.521vw]"
|
class="h-[3.698vw] w-[3.698vw] rounded-full p-[0.521vw]"
|
||||||
/>
|
/>
|
||||||
@@ -365,9 +365,9 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
const {data: image} = await useFetch('/api/auth/me')
|
const {data: image} = await useFetch('/api/auth/me')
|
||||||
const profileImage = useState('profileImage', () => image.value?.avatarMedia)
|
|
||||||
const { authUser } = useAuth();
|
const { authUser } = useAuth();
|
||||||
const showSearchBox = useState("showSearchBox", () => false);
|
const showSearchBox = useState("showSearchBox", () => false);
|
||||||
|
|
||||||
const search = ref(null);
|
const search = ref(null);
|
||||||
const openSearchBox = () => {
|
const openSearchBox = () => {
|
||||||
search.value = "";
|
search.value = "";
|
||||||
|
|||||||
+4
-3
@@ -285,8 +285,8 @@
|
|||||||
class="py-[2vw] md:py-0 text-[17.72px] md:text-[1.502vw] text-[#383E43] mt-[0.417vw]"
|
class="py-[2vw] md:py-0 text-[17.72px] md:text-[1.502vw] text-[#383E43] mt-[0.417vw]"
|
||||||
>
|
>
|
||||||
|
|
||||||
<span v-if="profileName">
|
<span v-if="authUser.name">
|
||||||
{{profileName}}
|
{{authUser.name}}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span v-else>کاربر</span>
|
<span v-else>کاربر</span>
|
||||||
@@ -348,10 +348,11 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
const {data, refresh} = await useFetch('/api/auth/me')
|
const {data, refresh} = await useFetch('/api/auth/me')
|
||||||
const profileName = useState('profileName', () => data.value.name)
|
|
||||||
import { useToast } from 'vue-toastification'
|
import { useToast } from 'vue-toastification'
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
const {authUser} = useAuth();
|
const {authUser} = useAuth();
|
||||||
|
|
||||||
async function logout(){
|
async function logout(){
|
||||||
await useFetch('/api/auth/logout', {
|
await useFetch('/api/auth/logout', {
|
||||||
headers : useRequestHeaders(['cookie']),
|
headers : useRequestHeaders(['cookie']),
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
class="w-full md:w-[56.354vw] text-[#383E43] text-[3.59vw] md:text-[1.055vw] leading-[5.897vw] md:leading-[1.582vw]"
|
class="w-full md:w-[56.354vw] text-[#383E43] text-[3.59vw] md:text-[1.055vw] leading-[5.897vw] md:leading-[1.582vw]"
|
||||||
>
|
>
|
||||||
<product-page-course-detailsDescription :props="data.course" />
|
<product-page-course-detailsDescription :props="data.course" />
|
||||||
test
|
|
||||||
<product-page-course-detailsHeadlines :props="data.course" />
|
<product-page-course-detailsHeadlines :props="data.course" />
|
||||||
|
|
||||||
<!-- <product-page-course-detailsComments :props="data.comments" /> -->
|
<!-- <product-page-course-detailsComments :props="data.comments" /> -->
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="w-[63.438vw] bg-[#F8F8F8] p-[4vw] md:p-[1vw] rounded-[3.846vw] md:rounded-[0.781vw] mt-[6vw] md:mt-[2vw]"
|
class="md:w-[63.438vw] bg-[#F8F8F8] p-[4vw] md:p-[1vw] rounded-[3.846vw] md:rounded-[0.781vw] mt-[6vw] md:mt-[2vw]"
|
||||||
>
|
>
|
||||||
<div class="space-y-[5vw] md:space-y-[1vw]">
|
<div class="space-y-[5vw] md:space-y-[1vw]">
|
||||||
<div class="flex gap-[1vw]">
|
<div class="flex gap-[1vw]">
|
||||||
@@ -165,16 +165,16 @@
|
|||||||
v-if="authUser?.avatarMedia"
|
v-if="authUser?.avatarMedia"
|
||||||
:src="authUser.avatarMedia"
|
:src="authUser.avatarMedia"
|
||||||
alt=""
|
alt=""
|
||||||
class="h-[10.256vw0] md:h-[3.385vw] w-[10.256vw] md:w-[3.385vw] rounded-[50%]"
|
class="h-[8.256vw0] md:h-[3.385vw] w-[10.256vw] md:w-[3.385vw] rounded-[50%]"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
v-else
|
v-else
|
||||||
src="/public/images/alt.png"
|
src="/public/images/alt.png"
|
||||||
alt=""
|
alt=""
|
||||||
class="h-[10.256vw0] md:h-[3.385vw] w-[10.256vw] md:w-[3.385vw] rounded-[50%]"
|
class="h-[8.256vw0] md:h-[3.385vw] w-[10.256vw] md:w-[3.385vw] rounded-[50%]"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
class="space-y-[4vw] mt-[1vw] md:mt-0 ms-[1vw] md:ms-0 md:space-y-0"
|
class="space-y-[2vw] mt-[1vw] md:mt-0 ms-[1vw] md:ms-0 md:space-y-0"
|
||||||
>
|
>
|
||||||
<p class="text-[3.59vw] md:text-[0.938vw]">
|
<p class="text-[3.59vw] md:text-[0.938vw]">
|
||||||
{{ authUser?.name ? authUser.name : "کاربر مهمان" }}
|
{{ authUser?.name ? authUser.name : "کاربر مهمان" }}
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<textarea
|
<textarea
|
||||||
v-model="comment"
|
v-model="comment"
|
||||||
class="h-[50vw] md:h-[18vw] w-full rounded-[3.846vw] md:rounded-[0.781vw] p-[1vw]"
|
class="focus:outline-none h-[50vw] md:h-[18vw] w-full rounded-[3.846vw] md:rounded-[0.781vw] p-[1vw]"
|
||||||
name=""
|
name=""
|
||||||
id=""
|
id=""
|
||||||
cols="30"
|
cols="30"
|
||||||
|
|||||||
@@ -133,7 +133,7 @@
|
|||||||
<p
|
<p
|
||||||
class="text-[3.59vw] md:text-[1.055vw] font-[600] text-[#383E43]"
|
class="text-[3.59vw] md:text-[1.055vw] font-[600] text-[#383E43]"
|
||||||
>
|
>
|
||||||
{{ tickets?.data.value.length }}
|
{{ tickets?.data.value.result.length }}
|
||||||
تیکت
|
تیکت
|
||||||
</p>
|
</p>
|
||||||
<p
|
<p
|
||||||
@@ -361,8 +361,8 @@
|
|||||||
|
|
||||||
<div class="flex justify-center items-center flex-col mt-[1.823vw]">
|
<div class="flex justify-center items-center flex-col mt-[1.823vw]">
|
||||||
<img
|
<img
|
||||||
v-if="profileImage"
|
v-if="authUser.avatarMedia"
|
||||||
:src="profileImage"
|
:src="authUser.avatarMedia"
|
||||||
class="h-[27.949vw] md:h-[7.24vw] w-[27.949vw] md:w-[7.24vw] rounded-full"
|
class="h-[27.949vw] md:h-[7.24vw] w-[27.949vw] md:w-[7.24vw] rounded-full"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
@@ -518,10 +518,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
const profileImage = useState('profileImage')
|
|
||||||
const tickets = await useFetch("/api/ticket/getTickets");
|
const tickets = await useFetch("/api/ticket/getTickets");
|
||||||
console.log('tick',tickets.data);
|
const lastTickets = tickets?.data?.value.result.slice(-2);
|
||||||
const lastTickets = tickets?.data?.value.slice(-2);
|
|
||||||
const myCourses = await useFetch("/api/auth/me");
|
const myCourses = await useFetch("/api/auth/me");
|
||||||
const lastCourses = myCourses.data?.value.course.slice(-2);
|
const lastCourses = myCourses.data?.value.course.slice(-2);
|
||||||
const balance = await useFetch("/api/user/balance");
|
const balance = await useFetch("/api/user/balance");
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<div class="flex justify-between flex-col text-[#383E43]">
|
<div class="flex justify-between flex-col text-[#383E43]">
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<img
|
<img
|
||||||
v-if="profileImage"
|
v-if="authUser.avatarMedia"
|
||||||
:src="profileImage"
|
:src="authUser.avatarMedia"
|
||||||
class="w-[40.256vw] md:w-[8.177vw] h-[40.256vw] md:h-[8.177vw] rounded-[50%]"
|
class="w-[40.256vw] md:w-[8.177vw] h-[40.256vw] md:h-[8.177vw] rounded-[50%]"
|
||||||
alt="profile"
|
alt="profile"
|
||||||
/>
|
/>
|
||||||
@@ -153,8 +153,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
const profileName = useState('profileName')
|
|
||||||
const profileImage = useState('profileImage')
|
|
||||||
import { useToast } from "vue-toastification";
|
import { useToast } from "vue-toastification";
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const { authUser } = useAuth();
|
const { authUser } = useAuth();
|
||||||
@@ -162,11 +160,7 @@ const loading = ref(false);
|
|||||||
const {data, refresh} = await useFetch('/api/auth/me')
|
const {data, refresh} = await useFetch('/api/auth/me')
|
||||||
|
|
||||||
const edit = async (formData) => {
|
const edit = async (formData) => {
|
||||||
|
authUser.value.name = formData.name
|
||||||
if (formData.name !== authUser.value.name) {
|
|
||||||
profileName.value = formData.name
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await $fetch("/api/user/update", {
|
await $fetch("/api/user/update", {
|
||||||
@@ -184,27 +178,26 @@ const edit = async (formData) => {
|
|||||||
};
|
};
|
||||||
//const token = getCookie(event, 'token');
|
//const token = getCookie(event, 'token');
|
||||||
async function changePhoto(val) {
|
async function changePhoto(val) {
|
||||||
|
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("directoryName", "test");
|
formData.append("directoryName", "profileImage");
|
||||||
formData.append("file", val.target.files[0]);
|
formData.append("file", val.target.files[0]);
|
||||||
|
|
||||||
const data = await useFetch("/api/uploader", {
|
const data = await useFetch("/api/uploader", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: formData,
|
body: formData,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (data.data.value.url) {
|
if (data.data.value.url) {
|
||||||
console.log('done');
|
|
||||||
await $fetch("/api/user/update", {
|
await $fetch("/api/user/update", {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
body: {
|
body: {
|
||||||
avatarMedia: data.data.value.url
|
avatarMedia: data.data.value.url
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
profileImage.value = data.data.value.url
|
authUser.value.avatarMedia = data.data.value.url
|
||||||
|
// profileImage.value = data.data.value.url
|
||||||
toast.success('تصویر پروفایل تغییر کرد')
|
toast.success('تصویر پروفایل تغییر کرد')
|
||||||
|
refresh()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<div class="flex flex-col flex-col-reverse pb-[10vw]">
|
<div class="flex flex-col flex-col-reverse pb-[10vw]">
|
||||||
<ul
|
<ul
|
||||||
class="space-y-[2vw] md:space-y-[0.5vw] mt-[0.5vw] border-b"
|
class="space-y-[2vw] md:space-y-[0.5vw] mt-[0.5vw] border-b"
|
||||||
v-for="ticket in tickets"
|
v-for="ticket in tickets.result"
|
||||||
:key="ticket.id"
|
:key="ticket.id"
|
||||||
>
|
>
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
<div class="flex flex-col flex-col-reverse pb-[10vw]">
|
<div class="flex flex-col flex-col-reverse pb-[10vw]">
|
||||||
<ul
|
<ul
|
||||||
class="space-y-[2vw] md:space-y-[0.5vw] mt-[0.5vw] border-b"
|
class="space-y-[2vw] md:space-y-[0.5vw] mt-[0.5vw] border-b"
|
||||||
v-for="ticket in tickets"
|
v-for="ticket in tickets.result"
|
||||||
:key="ticket.id"
|
:key="ticket.id"
|
||||||
v-show="ticket.status === 'active'"
|
v-show="ticket.status === 'active'"
|
||||||
>
|
>
|
||||||
@@ -212,7 +212,7 @@
|
|||||||
<div class="flex flex-col flex-col-reverse pb-[10vw]">
|
<div class="flex flex-col flex-col-reverse pb-[10vw]">
|
||||||
<ul
|
<ul
|
||||||
class="space-y-[2vw] md:space-y-[0.5vw] mt-[0.5vw] border-b"
|
class="space-y-[2vw] md:space-y-[0.5vw] mt-[0.5vw] border-b"
|
||||||
v-for="ticket in tickets"
|
v-for="ticket in tickets.result"
|
||||||
:key="ticket.id"
|
:key="ticket.id"
|
||||||
v-show="ticket.status !== 'active'"
|
v-show="ticket.status !== 'active'"
|
||||||
>
|
>
|
||||||
@@ -383,7 +383,7 @@ const month = ref([])
|
|||||||
const year = ref([])
|
const year = ref([])
|
||||||
const shamsi = ref([])
|
const shamsi = ref([])
|
||||||
|
|
||||||
tickets.value.map(item =>{
|
tickets.value.result.map(item =>{
|
||||||
item = new Date(item.createdAt)
|
item = new Date(item.createdAt)
|
||||||
year.value.push(item.getFullYear())
|
year.value.push(item.getFullYear())
|
||||||
month.value.push(item.getMonth() + 1)
|
month.value.push(item.getMonth() + 1)
|
||||||
@@ -442,13 +442,14 @@ const openTicket = async (data) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const {data: single, refresh: reload} = await useFetch("/api/ticket/id", {
|
const {data: single, refresh: reload} = await useFetch("/api/ticket/id", {
|
||||||
method: "POST",
|
method: 'POST',
|
||||||
body: {
|
query: {
|
||||||
id: data,
|
id: data,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
ticketMessages.value.push(single.value);
|
ticketMessages.value.push(single.value);
|
||||||
reload()
|
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
const sendMessage = async (data, reload) => {
|
const sendMessage = async (data, reload) => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flexBox overflow-x-hidden !max-w-[100vw]">
|
<div class="flexBox overflow-x-hidden">
|
||||||
<div class="relative flexBox round">
|
<div class="relative flexBox round">
|
||||||
<img
|
<img
|
||||||
src="/public/images/questions.jpg"
|
src="/public/images/questions.jpg"
|
||||||
@@ -22,14 +22,19 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-[#878787] mt-[10vw] mb-[10vw] flex flex-col mx-auto justify-center w-[80vw]">
|
<div
|
||||||
|
class="text-[#878787] mt-[10vw] mb-[10vw] flex flex-col mx-auto justify-center w-[80vw]"
|
||||||
|
>
|
||||||
<button class="rounded-t-[1.302vw] !px-[3vw] !pt-[1.1vw] mt-[0.5vw] accordion flex justify-between items-center">
|
<div v-for="(item, index) in data" :key="item.id">
|
||||||
|
<button
|
||||||
|
class="rounded-t-[1.302vw] !px-[3vw] !pt-[1.1vw] mt-[0.5vw] accordion flex justify-between items-center"
|
||||||
|
>
|
||||||
<div class="flexBox gap-[2vw]">
|
<div class="flexBox gap-[2vw]">
|
||||||
<p class="text-[1.901vw] font-bold ">01</p>
|
<p class="text-[1.901vw] font-bold">
|
||||||
|
{{ index < 9 ? "0" + (index + 1) : index + 1 }}
|
||||||
|
</p>
|
||||||
<h2 class="text-[0.938vw] font-semibold thin">
|
<h2 class="text-[0.938vw] font-semibold thin">
|
||||||
آیا در صورت خرید دوره، گواهی نامه آن به من تعلق می گیرد؟
|
{{ item.title }}
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<svg
|
<svg
|
||||||
@@ -57,79 +62,24 @@
|
|||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<div class="text-[#878787] content overflow-x-hidden !max-w-[100vw] !bg-[#E0FEFF] rounded-b-[1.302vw]">
|
<div class="text-[#878787] content !bg-[#E0FEFF] rounded-b-[1.302vw]">
|
||||||
<p class="px-[4vw] pb-[3vw]">
|
<p class="px-[4vw] pb-[3vw]">
|
||||||
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی مورد نیاز و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد کتابهای زیادی در شصت و سه درصد گذشته حال و آینده شناخت فراوان جامعه و متخصصان را می طلبد
|
{{ item.description }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="border-b py-[0.2vw]"></div>
|
<div class="border-b py-[0.2vw]"></div>
|
||||||
|
|
||||||
|
|
||||||
<button class="rounded-t-[1.302vw] !px-[3vw] !pt-[1.1vw] mt-[0.5vw] accordion flex justify-between items-center">
|
|
||||||
<div class="flexBox gap-[2vw]">
|
|
||||||
<p class="text-[1.901vw] font-bold ">01</p>
|
|
||||||
<h2 class="text-[0.938vw] font-semibold thin">
|
|
||||||
آیا در صورت خرید دوره، گواهی نامه آن به من تعلق می گیرد؟
|
|
||||||
</h2>
|
|
||||||
</div>
|
</div>
|
||||||
<svg
|
|
||||||
class="h-[2.604vw] w-[2.604vw] transition"
|
|
||||||
viewBox="0 0 50 51"
|
|
||||||
fill="none"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<rect y="0.5" width="50" height="50" rx="25" fill="#E5E5E5" />
|
|
||||||
<path
|
|
||||||
id="center"
|
|
||||||
d="M17.6665 25.5H32.3332"
|
|
||||||
stroke="#878787"
|
|
||||||
stroke-width="2.5"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
/>
|
|
||||||
<path
|
|
||||||
id="around"
|
|
||||||
d="M25 32.8334V18.1667"
|
|
||||||
stroke="#878787"
|
|
||||||
stroke-width="2.5"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
<div class="text-[#878787] content overflow-x-hidden !max-w-[100vw] !bg-[#E0FEFF] rounded-b-[1.302vw]">
|
|
||||||
<p class="px-[4vw] pb-[3vw]">
|
|
||||||
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی مورد نیاز و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد کتابهای زیادی در شصت و سه درصد گذشته حال و آینده شناخت فراوان جامعه و متخصصان را می طلبد
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="border-b py-[0.2vw]"></div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <button class="accordion ">متن تست 2</button>
|
|
||||||
<div class="content">
|
|
||||||
<p>لوریپسوم...</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button class="accordion">متن تست 3</button>
|
|
||||||
<div class="content">
|
|
||||||
<p>لوریپسوم...</p>
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
if (process.client) {
|
const { data } = await useFetch("/api/faq");
|
||||||
var acc = document.getElementsByClassName("accordion");
|
onMounted(() => {
|
||||||
var i;
|
|
||||||
|
|
||||||
|
var acc = document.getElementsByClassName("accordion");
|
||||||
|
|
||||||
|
var i;
|
||||||
for (i = 0; i < acc.length; i++) {
|
for (i = 0; i < acc.length; i++) {
|
||||||
acc[i].addEventListener("click", function () {
|
acc[i].addEventListener("click", function () {
|
||||||
this.classList.toggle("active");
|
this.classList.toggle("active");
|
||||||
@@ -137,22 +87,18 @@ if (process.client) {
|
|||||||
var content = this.nextElementSibling;
|
var content = this.nextElementSibling;
|
||||||
if (content.style.maxHeight) {
|
if (content.style.maxHeight) {
|
||||||
content.style.maxHeight = null;
|
content.style.maxHeight = null;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
content.style.maxHeight = content.scrollHeight + 50 + "px";
|
content.style.maxHeight = content.scrollHeight + 50 + "px";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
.accordion {
|
.accordion {
|
||||||
max-width: 100vw !important;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 18px;
|
padding: 18px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -162,26 +108,24 @@ max-width: 100vw !important;
|
|||||||
transition: 0.4s;
|
transition: 0.4s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
background-color: #E0FEFF;
|
background-color: #e0feff;
|
||||||
|
|
||||||
}
|
}
|
||||||
.active svg {
|
.active svg {
|
||||||
transform: rotate(45deg);
|
transform: rotate(45deg);
|
||||||
transition: 0.2s;
|
transition: 0.2s;
|
||||||
}
|
}
|
||||||
.active svg path {
|
.active svg path {
|
||||||
stroke: #E0FEFF;
|
stroke: #e0feff;
|
||||||
}
|
}
|
||||||
.active rect {
|
.active rect {
|
||||||
fill: #0D3F40;
|
fill: #0d3f40;
|
||||||
}
|
}
|
||||||
.active p {
|
.active p {
|
||||||
color: #0D3F40;
|
color: #0d3f40;
|
||||||
}
|
}
|
||||||
.active h2 {
|
.active h2 {
|
||||||
color: #383E43;
|
color: #383e43;
|
||||||
}
|
}
|
||||||
/*.panel {
|
/*.panel {
|
||||||
padding: 0 18px;
|
padding: 0 18px;
|
||||||
@@ -191,7 +135,6 @@ max-width: 100vw !important;
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
max-width: 100vw !important;
|
|
||||||
background-color: white;
|
background-color: white;
|
||||||
max-height: 0;
|
max-height: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -201,5 +144,4 @@ max-width: 100vw !important;
|
|||||||
filter: brightness(50%);
|
filter: brightness(50%);
|
||||||
border-radius: 0 0 200% 200% / 80%;
|
border-radius: 0 0 200% 200% / 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
export default defineEventHandler(async (event) => {
|
|
||||||
const { public: { apiBase } } = useRuntimeConfig();
|
|
||||||
|
|
||||||
const query = getQuery(event);
|
|
||||||
let category = query.hasOwnProperty('category') ? `categoryId=${query.category}` : '';
|
|
||||||
let page = query.hasOwnProperty('page') ? `page=${query.page}` : '';
|
|
||||||
// let sortBy = query.hasOwnProperty('sortBy') ? `price=${query.price}` : '';
|
|
||||||
let price = query.hasOwnProperty('price') ? `price=${query.price}` : '';
|
|
||||||
let name = query.hasOwnProperty('name') ? `name=${query.name}` : '';
|
|
||||||
try {
|
|
||||||
const data = await $fetch(`${apiBase}/course?${category}&${page}&pageSize=2&${price}&${name}`, {
|
|
||||||
method: 'GET',
|
|
||||||
headers: {
|
|
||||||
'Accept': 'application/json',
|
|
||||||
'content-type': 'application/json'
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return data;
|
|
||||||
} catch (error) {
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
export default defineEventHandler(async (event) => {
|
||||||
|
const { public: { apiBase } } = useRuntimeConfig();
|
||||||
|
const token = getCookie(event, 'token');
|
||||||
|
|
||||||
|
const query = getQuery(event);
|
||||||
|
|
||||||
|
try {
|
||||||
|
const data = await $fetch(`${apiBase}/common/faq/faq`, {
|
||||||
|
method: 'GET',
|
||||||
|
headers: {
|
||||||
|
'Accept': 'application/json',
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return data;
|
||||||
|
} catch (error) {
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
@@ -1,16 +1,15 @@
|
|||||||
export default defineEventHandler(async (event) => {
|
export default defineEventHandler(async (event) => {
|
||||||
|
|
||||||
const { public: { apiBase } } = useRuntimeConfig();
|
const { public: { apiBase } } = useRuntimeConfig();
|
||||||
const token = getCookie(event, 'token');
|
const token = getCookie(event, 'token');
|
||||||
const body = await readBody(event);
|
const body = await readBody(event);
|
||||||
|
const query = getQuery(event);
|
||||||
try {
|
try {
|
||||||
const data = await $fetch(`${apiBase}/ticket/${body.id}`, {
|
const data = await $fetch(`${apiBase}/ticket/${query.id}`, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'Accept': 'application/json',
|
'Accept': 'application/json',
|
||||||
'Authorization': `Bearer ${token}`
|
'Authorization': `Bearer ${token}`
|
||||||
},
|
}
|
||||||
id: body.id
|
|
||||||
});
|
});
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user