From 3a122cbf7b5932cbff17ecfd1d77093a5ffef5ee Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期五, 14 六月 2024 19:18:39 +0800
Subject: [PATCH] 跳转页码关闭

---
 src/components/examinations/index.vue |   22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/src/components/examinations/index.vue b/src/components/examinations/index.vue
index 4ec8d90..5986ef3 100644
--- a/src/components/examinations/index.vue
+++ b/src/components/examinations/index.vue
@@ -91,7 +91,7 @@
                 v-cloak
               ></p>
             </div>
-            <img :src="value.isCollect ? isCollect : collect" alt="" class="collect-png" @click="handleCollect(nindex,index)" >
+            <img :src="value.isCollect ? isHeart : heart" alt="" class="collect-png" @click="handleCollect(nindex,index)" >
             <!-- 鏀惰棌 -->
           </div>
           <div class="questionContent">
@@ -474,6 +474,7 @@
 </template>
 
 <script>
+import { Message } from 'element-ui';
 export default {
   name: "examination-option",
   props: {
@@ -501,14 +502,13 @@
       loading: false,
       cardData: [],
       loading: true,
-      collect:require("@/assets/images/collect.png"),
-      isCollect:require("@/assets/images/isCollect.png")
+      heart:require("@/assets/images/heart.png"),
+      isHeart:require("@/assets/images/heart-check.png"),
     };
   },
   watch: {
     cardList: {
       handler(newVal) {
-        console.log("11", newVal);
         this.cardData = this.cardList;
         if (newVal && newVal.length) {
           this.loading = false;
@@ -638,13 +638,10 @@
       }
     },
     // 淇濆瓨鎸夐挳
-    saveAnswer() {
-      const element = (
-        this.container ? this.container : document
-      ).querySelector(".examination");
-      if (element) {
+    saveAnswer(e) {
+      if (e.srcElement) {
         const pageNum = this.getParentWithClass(
-          element,
+          e.srcElement,
           "page-box"
         ).getAttribute("page");
         const oldAnswerData = localStorage.getItem(
@@ -675,6 +672,7 @@
           this.config.activeBook.name + "oldAnswerData",
           JSON.stringify(oldData)
         );
+        Message.success('淇濆瓨鎴愬姛')
       }
 
       // if(oldData[this.chapter]) {
@@ -695,8 +693,6 @@
 
 <style lang="less" scoped>
 .catalogName {
-  // color: #00aeef;
-  // color: #ff6c00;
   text-indent: 1em !important;
   font-size: 16px;
 }
@@ -1213,7 +1209,7 @@
 }
 .collect-png {
   cursor: pointer;
-  width: 25px;
+  width: 18px;
   object-fit: contain;
 }
 </style>

--
Gitblit v1.9.1