Sfoglia il codice sorgente

fix: 修正通过链接进入页面时不获取身份信息的bug

ChenYangfan 6 anni fa
parent
commit
45017cb5d4

+ 3 - 0
src/App.vue

@@ -82,6 +82,9 @@ export default {
     }
     handler()
     this.$watch('$route.query', handler)
+    getUserInfo().then(res => {
+      this.$store.commit(SET_USER_INFO, { userInfo: res })
+    })
   },
   methods: {
     fetchUserInfo () {

+ 0 - 1
src/components/Discussion/CommentToolBar.vue

@@ -3,7 +3,6 @@
     <div>
       <c-button v-if="isTeacher && !topNumber" @click="handleToTop" theme="green" text icon="publish">置顶</c-button>
       <c-button v-if="isTeacher && topNumber" @click="handleCancelToTop" theme="green" text icon="close">取消置顶</c-button>
-
       <c-button v-if="isOwn" @click="handleChangeShow" theme="orange" text :icon="personal ? 'lock_open' : 'lock'">
         {{personal ? '公开' : '设为私有'}}
       </c-button>

+ 1 - 1
src/views/reader/PdfReader.vue

@@ -49,7 +49,7 @@ export default {
       slide: {}
     }
   },
-  created () {
+  mounted () {
     this.$store.commit(RESET)
     let { page } = this.$route.params
     if (page) {