plg 2 сар өмнө
parent
commit
910dbc11a0

BIN
src/assets/cognize/Stroop.mp4


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 35 - 0
src/assets/cognize/Stroop.pdf


+ 31 - 3
src/views/Cognize.vue

@@ -62,12 +62,36 @@ const viewPDF = () => {
     centerDialogVisible.value = true
 }
 // vue3+vite   实现动态加载图片
-const requireImg = (name: string) => {
+const requireImg = () => {
     // return new URL(`${path}`, import.meta.url).href
     // ../assets/cognize/goNogo.pdf
+    //判断当前flag是多少
+    //如果是
+    //修改文本
+    let name = 'yd'
+    if (flag.value == 'EMOTION_STROOP') {
+        name = 'Stroop'
+    }
+
+
     return new URL(`../assets/cognize/${name}.pdf`, import.meta.url).href
 }
 
+const requireVideo = () => {
+    // return new URL(`${path}`, import.meta.url).href
+    // ../assets/cognize/goNogo.pdf
+    //判断当前flag是多少
+    //如果是
+    //修改文本
+    let name = 'Stroop'
+    if (flag.value == 'EMOTION_STROOP') {
+        name = 'Stroop'
+    }
+
+
+    return new URL(`../assets/cognize/${name}.mp4`, import.meta.url).href
+}
+
 const startCog = (val: number) => {
     // router.push(
     //     {
@@ -167,7 +191,11 @@ onUnmounted(() => {
                     <div class="cognize_video">
                         <!-- poster="../assets/cognize/bg_ty.png" -->
                         <video width="60%" height="100%" controls style="border-radius: 40px;">
-                            <source src="../assets/cognize/yd.mp4" type="video/mp4">
+                            <source src="../assets/cognize/yd.mp4" type="video/mp4" v-if="flag != 'EMOTION_STROOP'">
+                            <!-- <source src="../assets/cognize/Stroop.mp4" type="video/mp4"> -->
+                            <!-- <source :src="requireVideo" type="video/mp4"> -->
+                            <!-- <source src="../assets/cognize/Stroop.mp4" type="video/mp4"> -->
+                            <source src="../assets/cognize/Stroop.mp4" v-if="flag == 'EMOTION_STROOP'" type="video/mp4">
                             <!-- <source src="movie.ogg" type="video/ogg"> -->
                             您的浏览器不支持 video 标签。
                         </video>
@@ -218,7 +246,7 @@ onUnmounted(() => {
 
                 <!-- <embed width="100%" height=500px v-show="num == '3'" :src="pdf3">
                 </embed> -->
-                <embed width="100%" height=700px :src="requireImg('yd')">
+                <embed width="100%" height=700px :src="requireImg()">
                 </embed>
                 <!-- <embed width="100%" height=500px v-show="num == '4'" :src="pdf4">
                 </embed> -->

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно