Kaynağa Gözat

修改阅读

aaa 4 yıl önce
ebeveyn
işleme
c3bd9ef025
1 değiştirilmiş dosya ile 6 ekleme ve 6 silme
  1. 6 6
      src/views/home/learn/page-learn-content.vue

+ 6 - 6
src/views/home/learn/page-learn-content.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="page-learn-content-box">
     <van-nav-bar title="学习" left-arrow @click-left="onClickLeft" />
-    <div v-if="isRead" class="learn-content-rest-time">已学完</div>
+    <div v-if="!isReadable" class="learn-content-rest-time">已学完</div>
     <div v-else class="learn-content-rest-time">
       剩余学习时间: {{ getTimeHoursMinuteSecondsFun(seconds) }}
     </div>
@@ -121,7 +121,7 @@ export default {
       commentList: [], // 评论列表内容
       commentValue: "", // 即将评论的内容
       startStudyInterval: null,
-      isRead: false
+      isReadable: true
     };
   },
   computed: {
@@ -190,8 +190,8 @@ export default {
           this.seconds--;
         } else {
           Toast("学习完成");
-          if (!this.isRead) {
-            this.isRead = true;
+          if (this.isReadable) {
+            this.isReadable = false;
             this.ReadMaterial();
           }
           clearInterval(this.startStudyInterval);
@@ -301,8 +301,8 @@ export default {
           params
         })
         .then(res => {
-          this.isRead = res;
-          console.log(this.isRead);
+          this.isReadable = res;
+          console.log(this.isReadable);
         })
         .catch(() => {
           this.$store.commit("toggleLoading", false);