natasha 1 tahun lalu
induk
melakukan
17a1f23d95
2 mengubah file dengan 12 tambahan dan 6 penghapusan
  1. 5 5
      src/views/bookShelf/components/PhraseCard.vue
  2. 7 1
      src/views/login.vue

+ 5 - 5
src/views/bookShelf/components/PhraseCard.vue

@@ -1,15 +1,15 @@
 <template>
   <div class="word-card" v-loading="loading">
     <div class="word-card-top">
-        <span class="progress" v-if="wordList&&wordList.length>0">{{(activeObjIndex+1)+' / '+wordList.length}}</span>
+        <span class="progress" v-if="wordList&&wordList.length>0">{{(phraseActiveIndex+1)+' / '+wordList.length}}</span>
         <template v-else>
             <ul>
                 <li class="active">本文释义</li>
             </ul>
         </template>
         <div class="btn-box">
-            <svg-icon icon-class="arrow-left-line" :class="[activeObjIndex===0?'not-allow':'']" v-if="wordList&&wordList.length>0" @click="changeIndex('-')"></svg-icon>
-            <svg-icon icon-class="arrow-right-line" :class="[activeObjIndex===wordList.length-1?'not-allow':'']" v-if="wordList&&wordList.length>0" @click="changeIndex('+')"></svg-icon>
+            <svg-icon icon-class="arrow-left-line" :class="[phraseActiveIndex===0?'not-allow':'']" v-if="wordList&&wordList.length>0" @click="changeIndex('-')"></svg-icon>
+            <svg-icon icon-class="arrow-right-line" :class="[phraseActiveIndex===wordList.length-1?'not-allow':'']" v-if="wordList&&wordList.length>0" @click="changeIndex('+')"></svg-icon>
             <svg-icon icon-class="like-line" className="icon-like" v-if="!data.collect" @click="handleCollect(data)"></svg-icon>
             <svg-icon icon-class="like" className="icon-like active" v-else @click="handleCollect(data)"></svg-icon>
             <i class="el-icon-close" @click="closeWord"></i>
@@ -246,14 +246,14 @@ export default {
         if(type==='-'){
             if(this.phraseActiveIndex>0){
                 this.phraseActiveIndex--
-                
+                this.data = this.wordList[this.phraseActiveIndex]
             }else{
                 return
             }
         }else{
             if(this.phraseActiveIndex<this.wordList.length-1){
                 this.phraseActiveIndex++
-                this.mageazineDetailIndex = null
+                this.data = this.wordList[this.phraseActiveIndex]
             }else{
                 return
             }

+ 7 - 1
src/views/login.vue

@@ -183,7 +183,13 @@ export default {
                         });
                     }
                 }else{
-                    window.location.reload()
+                    if(this.$route.path!=='/register'){
+                        window.location.reload()
+                    }else{
+                        this.$router.push({
+                            path: '/',
+                        });
+                    }
                 }
             })
             .catch(() => {