zhongshujie
2025-07-23 b25a0073b805e82416934d0f123c10e9063e3c57
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",