Browse Source

修改页面初始化

aaa 3 years ago
parent
commit
38f7f93340
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/views/home/index.vue

+ 3 - 1
src/views/home/index.vue

@@ -40,7 +40,7 @@ export default {
   components: { PageLearn, PageAnswer, PageExam, PagePerson },
   components: { PageLearn, PageAnswer, PageExam, PagePerson },
   data() {
   data() {
     return {
     return {
-      currentComponents: "pageLearn",
+      currentComponents: "",
       activeTabName: 0,
       activeTabName: 0,
       tabbars: [
       tabbars: [
         {
         {
@@ -159,6 +159,8 @@ export default {
       this.currentComponents = this.tabbars[this.activeTabName].pageName;
       this.currentComponents = this.tabbars[this.activeTabName].pageName;
     },
     },
     afterGetUserInfo() {
     afterGetUserInfo() {
+      // 初始化当前也
+      this.currentComponents = "pageLearn";
       // 获取所有收藏
       // 获取所有收藏
       this.getCollection();
       this.getCollection();
       // 获取所有考试历史
       // 获取所有考试历史