fixed faq bugs
This commit is contained in:
@@ -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,24 +500,36 @@ 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",
|
||||
body: {
|
||||
id: route.query.episode,
|
||||
},
|
||||
});
|
||||
}
|
||||
await $fetch("/api/progressCounter", {
|
||||
method: "POST",
|
||||
body: {
|
||||
id: route.query.episode,
|
||||
},
|
||||
});
|
||||
}
|
||||
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: {
|
||||
|
||||
Reference in New Issue
Block a user