From fe02206b64c4997094fd8371f6b5d439c3f2688f Mon Sep 17 00:00:00 2001
From: unknown <qq1940665526@163.com>
Date: 星期四, 06 六月 2024 11:56:44 +0800
Subject: [PATCH] 优化

---
 src/books/lifeCare/view/chapter004.vue |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/books/lifeCare/view/chapter004.vue b/src/books/lifeCare/view/chapter004.vue
index 5cc5642..b904467 100644
--- a/src/books/lifeCare/view/chapter004.vue
+++ b/src/books/lifeCare/view/chapter004.vue
@@ -1355,7 +1355,7 @@
   </div>
 </template>
 <script>
-import getResourcePath from "@/assets/methods/resources.js";
+import {getResourcePath} from "@/assets/methods/resources.js";
 import examinations from "@/components/examinations/index.vue";
 import drawflow from "@/components/drawflow";
 export default {
@@ -1367,6 +1367,10 @@
     },
     questionData: {
       type: Object,
+    },
+    isSearch: {
+      type: Boolean,
+      default: false,
     },
   },
   components: {
@@ -1446,25 +1450,21 @@
     };
   },
   async created() {
-    const localData = JSON.parse(localStorage.getItem("chapter004"));
+    if(!this.isSearch){
+      const localData = JSON.parse(localStorage.getItem("chapter004"));
     if (localData) {
       this.chapter004 = { ...Object.assign(this.chapter004, localData) };
     }
-    this.chapter004.videOneUrl = getResourcePath(
+    this.chapter004.videOneUrl = await getResourcePath(
       "c276be12bae3b1df0b3ce4aa01b14e1e"
     );
-    this.chapter004.videoTwoUrl = getResourcePath(
+    this.chapter004.videoTwoUrl = await getResourcePath(
       "7eb7fe2e3c13885a96143110ca4f5654"
     );
-    this.chapter004.videoFourUrl = getResourcePath(
+    this.chapter004.videoFourUrl = await getResourcePath(
       "1b04691b60e5b5b207b3a4967c495d29"
     );
-    // this.chapter004.videOneUrl =
-    //   "https://jsek.bnuic.com/file/api/ApiDownload?md5=c276be12bae3b1df0b3ce4aa01b14e1e";
-    // this.chapter004.videoTwoUrl =
-    //   "https://jsek.bnuic.com/file/api/ApiDownload?md5=7eb7fe2e3c13885a96143110ca4f5654";
-    // this.chapter004.videoFourUrl =
-    //   "https://jsek.bnuic.com/file/api/ApiDownload?md5=1b04691b60e5b5b207b3a4967c495d29";
+    }
   },
   methods: {
     activityOne() {

--
Gitblit v1.9.1