fixed faq bugs

This commit is contained in:
HAM!DREZA
2024-07-02 18:19:51 +03:30
parent a8e723ddf0
commit d2f71b6b14
21 changed files with 205 additions and 307 deletions
+1
View File
@@ -13,6 +13,7 @@
body {
font-family: "Iransans";
direction: rtl;
overflow-x: hidden !important;
}
@layer utilities {
.pinkShadow {
+1 -1
View File
@@ -129,7 +129,7 @@
</linearGradient>
</defs>
</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>
</div>
-1
View File
@@ -47,7 +47,6 @@
const props = defineProps(['item']);
const router = useRouter()
const route = useRoute()
console.log(props);
const change = () =>{
router.replace(`/${props.item.id}`)
}
+1 -1
View File
@@ -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="">
<div class=" flex w-[81.04%] text-white">
<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 }}
</h2>
<p class="hidden md:block mt-[1.25vw] text-[1.055vw] leading-[30.38px] mb-[2.917vw]">
+19 -8
View File
@@ -409,7 +409,7 @@
{{ item.headline }}
</div>
<div class="flexBox gap-[1vw] md:gap-[0.3vw]">
02:24
{{ convertStoMs(item.time) }}
<svg
class="h-[4.359vw] w-[4.359vw] md:h-[0.99vw] md:w-[0.99vw]"
viewBox="0 0 19 20"
@@ -456,7 +456,7 @@
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>{{ progress.completionPercentage }}%</span>
<span>{{ Math.floor(progress.completionPercentage) }}%</span>
</div>
<div
id="progressbar"
@@ -500,6 +500,19 @@ const { data, refresh } = await useFetch("/api/courseHeadlines", {
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() {
await $fetch("/api/progressCounter", {
method: "POST",
@@ -510,14 +523,13 @@ async function addToProgress() {
}
import progressAlert from "@/components/progressAlert.vue";
const handleVideoEnded = async () => {
addToProgress();
reload();
if (process.client) {
document.querySelector(".next").classList.remove("hidden");
}
toast.success('ویدیو به پایان رسید');
toast.success("ویدیو به پایان رسید");
};
const sendComment = async () => {
@@ -567,7 +579,6 @@ if (query.value.hasOwnProperty("episode")) {
fileName: fimd.videoUrl,
},
});
console.log("video", getUrl.data.value.url);
url.value = getUrl.data.value.url;
index.value = data.value.indexOf(fimd);
refresh();
@@ -602,21 +613,21 @@ async function chengeVideo(item) {
await refresh();
}
console.log("yek", data.value[index.value]);
async function nextHandler() {
if (process.client) {
document.querySelector(".next").classList.add("hidden");
}
query.value = { ...route.query, episode: data.value[index.value + 1].id };
index.value = index.value + 1;
console.log("index", index);
// const addToProgress = await $fetch("/api/progressCounter", {
// method: "POST",
// body: {
// id: route.query.episode,
// },
// });
addToProgress()
addToProgress();
activeHead.value = data.value[index.value];
const getUrl = await useFetch("/api/checkMedia", {
query: {
@@ -147,5 +147,4 @@
<script setup>
const props = defineProps(['props'])
</script>
@@ -262,6 +262,8 @@
import { useToast } from "vue-toastification";
const { authUser } = useAuth();
const props = defineProps(["props"], ["access"]);
const toast = useToast()
const router = useRouter()
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]"
>
<div
:class="`w-[${props.props.completionPercentage}%]`"
:style="{ width: activeClass + '%' }"
class="rounded-[2vw] md:rounded-[0.521vw] h-[2.051vw] md:h-[0.521vw]"
>
<!-- {{props.props.completionPercentage}} -->
@@ -75,7 +75,7 @@
<script setup>
const adad = 2;
const props = defineProps(['props'])
const activeClass = ref(props.props.completionPercentage);
</script>
<style scoped>
@@ -17,35 +17,15 @@
>توضیحات</span
>
</div>
<p class="mt-[4vw] md:mt-[2.1vw] thin">
{{props.props.description}}
</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>
<div class="descriptions mt-[4vw] md:mt-[2.1vw] thin">
</div>
</template>
<script setup>
const props = defineProps(['props'])
if (process.client) {
document.querySelector('.descriptions').innerHTML = props.props.description;
}
</script>
@@ -2,28 +2,26 @@
<div class="w-full relative flex h-[86.41vw] md:h-[40.625vw]">
<NuxtImg
:placeholder="[30, 20]"
:src="props.props.image"
:src="props.props?.image"
alt="html"
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">
<h1 class="text-[5.751vw] md:text-[1.69vw] font-[600] -tracking-[0.05vw]">
{{ props.props.name }}
{{ props.props?.name }}
</h1>
<p class="text-[3.19vw] md:text-[0.833vw] mt-[0.6vw] text-[#E5E5E5]">
{{ 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 }}
{{ props.props?.categories[0].name }}
</p>
<div
class="descriptios hidden md:block w-[39.896vw] text-[1.055vw] leading-[1.582vw] mt-[1.2vw]"
></div>
<p
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
>{{props.props?.teacher.name}}</span
>
</p>
<div
@@ -113,9 +111,7 @@
</svg>
<div class="space-y-[0.3vw]">
<p class="text-[3.59vw] md:text-[1.055vw]">آخرین بروزرسانی</p>
<p class="text-[2.518vw] md:text-[0.741vw]">
{{ shamsi[2] }} / {{ shamsi[1] }} / {{ shamsi[0] }}
</p>
<p class="text-[2.518vw] md:text-[0.741vw]">{{jDate(props.props?.updatedAt)}}</p>
</div>
</div>
<div class="border-l"></div>
@@ -145,7 +141,7 @@
<div class="space-y-[0.3vw]">
<p class="text-[3.59vw] md:text-[1.055vw]">مدت زمان دوره</p>
<p class="text-[2.518vw] md:text-[0.741vw]">
{{ props.props.duration }} ساعت
{{ props.props?.duration }} ساعت
</p>
</div>
</div>
@@ -189,7 +185,7 @@
<div class="space-y-[0.3vw]">
<p class="text-[3.59vw] md:text-[1.055vw]">
{{ props.props.studentsCount }}
{{ props.props?.studentsCount }}
</p>
<p class="text-[2.518vw] md:text-[0.741vw]">دانشجو</p>
</div>
@@ -201,15 +197,20 @@
<script setup>
const props = defineProps(["props"]);
const isoDateString = props.props.createdAt;
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();
import {jDate} from "@/utils/jDate"
const shamsi = gregorian_to_jalali(year,month,day)
if (process.client) {
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>
@@ -113,31 +113,6 @@
</svg>
</div>
</div>
</div>
</template>
+3 -3
View File
@@ -283,8 +283,8 @@
<nuxt-link to="/account" v-if="authUser">
<img
v-if="profileImage"
:src="profileImage"
v-if="authUser.avatarMedia"
:src="authUser.avatarMedia"
alt="profile"
class="h-[3.698vw] w-[3.698vw] rounded-full p-[0.521vw]"
/>
@@ -365,9 +365,9 @@
<script setup>
const {data: image} = await useFetch('/api/auth/me')
const profileImage = useState('profileImage', () => image.value?.avatarMedia)
const { authUser } = useAuth();
const showSearchBox = useState("showSearchBox", () => false);
const search = ref(null);
const openSearchBox = () => {
search.value = "";
+4 -3
View File
@@ -285,8 +285,8 @@
class="py-[2vw] md:py-0 text-[17.72px] md:text-[1.502vw] text-[#383E43] mt-[0.417vw]"
>
<span v-if="profileName">
{{profileName}}
<span v-if="authUser.name">
{{authUser.name}}
</span>
<span v-else>کاربر</span>
@@ -348,10 +348,11 @@
<script setup>
const {data, refresh} = await useFetch('/api/auth/me')
const profileName = useState('profileName', () => data.value.name)
import { useToast } from 'vue-toastification'
const toast = useToast()
const {authUser} = useAuth();
async function logout(){
await useFetch('/api/auth/logout', {
headers : useRequestHeaders(['cookie']),
+6 -6
View File
@@ -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]"
>
<product-page-course-detailsDescription :props="data.course" />
test
<product-page-course-detailsHeadlines :props="data.course" />
<!-- <product-page-course-detailsComments :props="data.comments" /> -->
@@ -157,7 +157,7 @@
</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="flex gap-[1vw]">
@@ -165,16 +165,16 @@
v-if="authUser?.avatarMedia"
:src="authUser.avatarMedia"
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
v-else
src="/public/images/alt.png"
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
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]">
{{ authUser?.name ? authUser.name : "کاربر مهمان" }}
@@ -192,7 +192,7 @@
</div>
<textarea
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=""
id=""
cols="30"
+4 -6
View File
@@ -133,7 +133,7 @@
<p
class="text-[3.59vw] md:text-[1.055vw] font-[600] text-[#383E43]"
>
{{ tickets?.data.value.length }}
{{ tickets?.data.value.result.length }}
تیکت
</p>
<p
@@ -361,8 +361,8 @@
<div class="flex justify-center items-center flex-col mt-[1.823vw]">
<img
v-if="profileImage"
:src="profileImage"
v-if="authUser.avatarMedia"
:src="authUser.avatarMedia"
class="h-[27.949vw] md:h-[7.24vw] w-[27.949vw] md:w-[7.24vw] rounded-full"
alt=""
/>
@@ -518,10 +518,8 @@
<script setup>
const profileImage = useState('profileImage')
const tickets = await useFetch("/api/ticket/getTickets");
console.log('tick',tickets.data);
const lastTickets = tickets?.data?.value.slice(-2);
const lastTickets = tickets?.data?.value.result.slice(-2);
const myCourses = await useFetch("/api/auth/me");
const lastCourses = myCourses.data?.value.course.slice(-2);
const balance = await useFetch("/api/user/balance");
+8 -15
View File
@@ -2,8 +2,8 @@
<div class="flex justify-between flex-col text-[#383E43]">
<div class="relative">
<img
v-if="profileImage"
:src="profileImage"
v-if="authUser.avatarMedia"
:src="authUser.avatarMedia"
class="w-[40.256vw] md:w-[8.177vw] h-[40.256vw] md:h-[8.177vw] rounded-[50%]"
alt="profile"
/>
@@ -153,8 +153,6 @@
<script setup>
const profileName = useState('profileName')
const profileImage = useState('profileImage')
import { useToast } from "vue-toastification";
const toast = useToast();
const { authUser } = useAuth();
@@ -162,11 +160,7 @@ const loading = ref(false);
const {data, refresh} = await useFetch('/api/auth/me')
const edit = async (formData) => {
if (formData.name !== authUser.value.name) {
profileName.value = formData.name
}
authUser.value.name = formData.name
try {
loading.value = true;
await $fetch("/api/user/update", {
@@ -184,27 +178,26 @@ const edit = async (formData) => {
};
//const token = getCookie(event, 'token');
async function changePhoto(val) {
const formData = new FormData();
formData.append("directoryName", "test");
formData.append("directoryName", "profileImage");
formData.append("file", val.target.files[0]);
const data = await useFetch("/api/uploader", {
method: "POST",
body: formData,
});
if (data.data.value.url) {
console.log('done');
await $fetch("/api/user/update", {
method: "PUT",
body: {
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('تصویر پروفایل تغییر کرد')
refresh()
}
}
+8 -7
View File
@@ -17,7 +17,7 @@
<div class="flex flex-col flex-col-reverse pb-[10vw]">
<ul
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"
>
@@ -118,7 +118,7 @@
<div class="flex flex-col flex-col-reverse pb-[10vw]">
<ul
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"
v-show="ticket.status === 'active'"
>
@@ -212,7 +212,7 @@
<div class="flex flex-col flex-col-reverse pb-[10vw]">
<ul
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"
v-show="ticket.status !== 'active'"
>
@@ -383,7 +383,7 @@ const month = ref([])
const year = ref([])
const shamsi = ref([])
tickets.value.map(item =>{
tickets.value.result.map(item =>{
item = new Date(item.createdAt)
year.value.push(item.getFullYear())
month.value.push(item.getMonth() + 1)
@@ -442,13 +442,14 @@ const openTicket = async (data) => {
}
}
const {data: single, refresh: reload} = await useFetch("/api/ticket/id", {
method: "POST",
body: {
method: 'POST',
query: {
id: data,
},
});
ticketMessages.value.push(single.value);
reload()
loading.value = false;
};
const sendMessage = async (data, reload) => {
+26 -84
View File
@@ -1,5 +1,5 @@
<template>
<div class="flexBox overflow-x-hidden !max-w-[100vw]">
<div class="flexBox overflow-x-hidden">
<div class="relative flexBox round">
<img
src="/public/images/questions.jpg"
@@ -22,14 +22,19 @@
</svg>
</div>
</div>
<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
class="text-[#878787] mt-[10vw] mb-[10vw] flex flex-col mx-auto justify-center w-[80vw]"
>
<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]">
<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">
آیا در صورت خرید دوره، گواهی نامه آن به من تعلق می گیرد؟
{{ item.title }}
</h2>
</div>
<svg
@@ -57,79 +62,24 @@
/>
</svg>
</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]">
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است و برای شرایط فعلی تکنولوژی مورد نیاز و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد کتابهای زیادی در شصت و سه درصد گذشته حال و آینده شناخت فراوان جامعه و متخصصان را می طلبد
{{ item.description }}
</p>
</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>
<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 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>
<script setup>
if (process.client) {
var acc = document.getElementsByClassName("accordion");
var i;
const { data } = await useFetch("/api/faq");
onMounted(() => {
var acc = document.getElementsByClassName("accordion");
var i;
for (i = 0; i < acc.length; i++) {
acc[i].addEventListener("click", function () {
this.classList.toggle("active");
@@ -137,22 +87,18 @@ if (process.client) {
var content = this.nextElementSibling;
if (content.style.maxHeight) {
content.style.maxHeight = null;
}
else
{
} else {
content.style.maxHeight = content.scrollHeight + 50 + "px";
}
});
}
})
}
</script>
<style scoped>
.accordion {
max-width: 100vw !important;
cursor: pointer;
padding: 18px;
width: 100%;
@@ -162,26 +108,24 @@ max-width: 100vw !important;
transition: 0.4s;
}
.active {
background-color: #E0FEFF;
background-color: #e0feff;
}
.active svg {
transform: rotate(45deg);
transition: 0.2s;
}
.active svg path {
stroke: #E0FEFF;
stroke: #e0feff;
}
.active rect {
fill: #0D3F40;
fill: #0d3f40;
}
.active p {
color: #0D3F40;
color: #0d3f40;
}
.active h2 {
color: #383E43;
color: #383e43;
}
/*.panel {
padding: 0 18px;
@@ -191,7 +135,6 @@ max-width: 100vw !important;
}*/
.content {
max-width: 100vw !important;
background-color: white;
max-height: 0;
overflow: hidden;
@@ -201,5 +144,4 @@ max-width: 100vw !important;
filter: brightness(50%);
border-radius: 0 0 200% 200% / 80%;
}
</style>
-24
View File
@@ -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;
}
});
+20
View File
@@ -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;
}
});
+3 -4
View File
@@ -1,16 +1,15 @@
export default defineEventHandler(async (event) => {
const { public: { apiBase } } = useRuntimeConfig();
const token = getCookie(event, 'token');
const body = await readBody(event);
const query = getQuery(event);
try {
const data = await $fetch(`${apiBase}/ticket/${body.id}`, {
const data = await $fetch(`${apiBase}/ticket/${query.id}`, {
method: 'GET',
headers: {
'Accept': 'application/json',
'Authorization': `Bearer ${token}`
},
id: body.id
}
});
return data;
} catch (error) {