From b25a0073b805e82416934d0f123c10e9063e3c57 Mon Sep 17 00:00:00 2001
From: zhongshujie <2862698242@qq.com>
Date: 星期三, 23 七月 2025 10:26:41 +0800
Subject: [PATCH] 婴幼儿运动安全替换

---
 src/books/aurturingAndEducationAged0to3/view/components/chapter001.vue |   91 ++++++++++++++++++++++++---------------------
 1 files changed, 48 insertions(+), 43 deletions(-)

diff --git a/src/books/aurturingAndEducationAged0to3/view/components/chapter001.vue b/src/books/aurturingAndEducationAged0to3/view/components/chapter001.vue
index 4eb8da5..de127d7 100644
--- a/src/books/aurturingAndEducationAged0to3/view/components/chapter001.vue
+++ b/src/books/aurturingAndEducationAged0to3/view/components/chapter001.vue
@@ -252,20 +252,20 @@
           <div class="img-rights-video w395">
             <div class="video-box">
               <p class="center text td-0">
-                <video :src="videoPathOne" webkit-playsinline="true" x-webkit-airplay="true" playsinline="true"
-                  x5-video-orientation="h5" x5-video-player-fullscreen="true" x5-playsinline="" controls
-                  controlslist="nodownload" class="w100 video"></video>
+                <video :src="chapter001.videoMd5[0].handleMd5" webkit-playsinline="true" x-webkit-airplay="true"
+                  playsinline="true" x5-video-orientation="h5" x5-video-player-fullscreen="true" x5-playsinline=""
+                  controls controlslist="nodownload" class="w100 video"></video>
               </p>
               <p class="center videoname">
-                <span>瑙嗛锛氬瓡鏈熷攼姘忕瓫鏌�</span>
-                <el-tooltip class="item" effect="dark" :content="chapterData.isCollectVideo ? '鐐瑰嚮鍙栨秷' : '鐐瑰嚮鏀惰棌'
-                  " placement="top-start">
+                <span>瑙嗛锛歿{ chapter001.videoMd5[0].name }}</span>
+                <el-tooltip class="item" effect="dark"
+                  :content="chapter001.videoMd5[0].isCollectVideo ? '鐐瑰嚮鍙栨秷' : '鐐瑰嚮鏀惰棌'" placement="top-start">
                   <img :src="collectResourceList.findIndex(
-                    (item) => item.id == 'd056878ebe8cb0dbf323afa4f50ce59e'
+                    (item) => item.id == chapter001.videoMd5[0].md5
                   ) > -1
                     ? collectCheck
                     : collectImg
-                    " alt="" class="collect-btn" @click="handleCollect('video-01')" />
+                    " alt="" class="collect-btn" @click="handleCollect(chapter001.videoMd5[0])" />
                 </el-tooltip>
               </p>
             </div>
@@ -380,20 +380,20 @@
           <div class="img-rights-video w395">
             <div class="video-box">
               <p class="center text td-0">
-                <video :src="videoPathTwo" webkit-playsinline="true" x-webkit-airplay="true" playsinline="true"
-                  x5-video-orientation="h5" x5-video-player-fullscreen="true" x5-playsinline="" controls
-                  controlslist="nodownload" class="w100 video"></video>
+                <video :src="chapter001.videoMd5[1].handleMd5" webkit-playsinline="true" x-webkit-airplay="true"
+                  playsinline="true" x5-video-orientation="h5" x5-video-player-fullscreen="true" x5-playsinline=""
+                  controls controlslist="nodownload" class="w100 video"></video>
               </p>
               <p class="center videoname">
-                <span>瑙嗛锛氬瓡鏈熷攼姘忕瓫鏌�</span>
-                <el-tooltip class="item" effect="dark" :content="chapterData.isCollectVideo01 ? '鐐瑰嚮鍙栨秷' : '鐐瑰嚮鏀惰棌'
-                  " placement="top-start">
+                <span>瑙嗛锛歿{ chapter001.videoMd5[1].name }}</span>
+                <el-tooltip class="item" effect="dark"
+                  :content="chapter001.videoMd5[1].isCollectVideo ? '鐐瑰嚮鍙栨秷' : '鐐瑰嚮鏀惰棌'" placement="top-start">
                   <img :src="collectResourceList.findIndex(
-                    (item) => item.id == 'be2714f3c8679bbe0ff150b5443321a9'
+                    (item) => item.id == chapter001.videoMd5[1].md5
                   ) > -1
                     ? collectCheck
                     : collectImg
-                    " alt="" class="collect-btn" @click="handleCollect('video-02')" />
+                    " alt="" class="collect-btn" @click="handleCollect(chapter001.videoMd5[1])" />
                 </el-tooltip>
               </p>
             </div>
@@ -851,20 +851,33 @@
     showPageList: {
       type: Array,
     },
+    resourceList: {
+      type: Object,
+    },
   },
   data() {
     return {
       collectImg: require("../../assets/images/icon/heart.png"),
       collectCheck: require("../../assets/images/icon/heart-check.png"),
-      videoPathOne: "",
-      videoPathTwo: "",
       collectResourceList: [],
-      chapterData: {
-        isCollectVideo: false,
-        isCollectVideo01: false,
-      },
       unitQuestion: {
         isShowAnswer: false,
+      },
+      chapter001: {
+        videoMd5: [
+          {
+            isCollectVideo: false,
+            md5: this.resourceList[13],
+            handleMd5: "",
+            name: "瀛曟湡鍞愭皬绛涙煡",
+          },
+          {
+            isCollectVideo: false,
+            md5: this.resourceList[14],
+            handleMd5: "",
+            name: "瀛曟湡淇濆仴",
+          },
+        ],
       },
       questionData: {
         one: "",
@@ -909,13 +922,14 @@
   },
   methods: {
     async getVidoePath() {
-      this.videoPathOne = await getResourcePath(
-        "d056878ebe8cb0dbf323afa4f50ce59e"
-      );
-      this.videoPathTwo = await getResourcePath(
-        "be2714f3c8679bbe0ff150b5443321a9"
-      );
+      for (let index = 0; index < this.chapter001.videoMd5.length; index++) {
+        const item = this.chapter001.videoMd5[index];
+        if (item.md5 && !item.md5.includes("https:")) {
+          item.handleMd5 = await getResourcePath(item.md5);
+        }
+      }
     },
+
     setBookQuestion() {
       localStorage.setItem(
         "aurturingAndEducation-book-chapter01-questionData",
@@ -942,29 +956,20 @@
       this.unitQuestion.isShowAnswer = false;
     },
     handleCollect(e) {
-      if (e == "video-01") {
+      if (e) {
         this.handleCollectResource(
-          "d056878ebe8cb0dbf323afa4f50ce59e",
-          "d056878ebe8cb0dbf323afa4f50ce59e",
+          e.md5,
+          e.md5,
           "",
           "瑙嗛",
           "bits",
-          "瑙嗛锛氬瓡鏈熷攼姘忕瓫鏌�"
+          "瑙嗛锛�" + e.md5,
         );
-        this.chapterData.isCollectVideo = !this.chapterData.isCollectVideo;
-      } else if (e == "video-02") {
-        this.handleCollectResource(
-          "be2714f3c8679bbe0ff150b5443321a9",
-          "be2714f3c8679bbe0ff150b5443321a9",
-          "",
-          "瑙嗛",
-          "bits",
-          "瑙嗛锛氬瓡鏈熶繚鍋�"
-        );
-        this.chapterData.isCollectVideo01 = !this.chapterData.isCollectVideo01;
+        e.isCollectVideo = !e.isCollectVideo;
       }
       this.handleChapterData();
     },
+
     handleChapterData() {
       localStorage.setItem(
         "aurturingAndEducation-book-chapter01-Data",

--
Gitblit v1.9.1