From 58a1f8c0fe7c46f21382f6359be02a8e375ece04 Mon Sep 17 00:00:00 2001
From: unknown <qq1940665526@163.com>
Date: 星期三, 05 六月 2024 17:59:48 +0800
Subject: [PATCH] 体育与健康样章

---
 src/books/lifeCare/view/chapter001.vue |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/src/books/lifeCare/view/chapter001.vue b/src/books/lifeCare/view/chapter001.vue
index b516cbb..6a299d3 100644
--- a/src/books/lifeCare/view/chapter001.vue
+++ b/src/books/lifeCare/view/chapter001.vue
@@ -1403,7 +1403,7 @@
 </template>
 
 <script>
-import {getResourcePath} from "@/assets/methods/resources.js";
+import { getResourcePath } from "@/assets/methods/resources.js";
 import examinations from "@/components/examinations/index.vue";
 
 export default {
@@ -1415,6 +1415,10 @@
     },
     questionData: {
       type: Object,
+    },
+    isSearch: {
+      type: Boolean,
+      default: false,
     },
   },
   data() {
@@ -1440,13 +1444,15 @@
     examinations,
   },
   async created() {
-    const localData = JSON.parse(localStorage.getItem("chapter001"));
-    if (localData) {
-      this.chapter001 = { ...Object.assign(this.chapter001, localData) };
+    if (!this.isSearch) {
+      const localData = JSON.parse(localStorage.getItem("chapter001"));
+      if (localData) {
+        this.chapter001 = { ...Object.assign(this.chapter001, localData) };
+      }
+      this.chapter001.videOneUrl = await getResourcePath(
+        "68ebd5c05bcb742999a9ebdce4b4bd53"
+      );
     }
-    this.chapter001.videOneUrl = await getResourcePath(
-      "68ebd5c05bcb742999a9ebdce4b4bd53"
-    );
   },
   methods: {
     activityOne() {

--
Gitblit v1.9.1