dusenyao 3 years ago
parent
commit
8da0060ff3
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/views/main/index.vue

+ 5 - 1
src/views/main/index.vue

@@ -35,9 +35,13 @@ export default {
   data() {
     let popedom_code_list = this.$store.state.user.popedom_code_list;
     let isStudent = this.$store.state.user.user_type === 'STUDENT';
+    function curTab() {
+      return isStudent || popedom_code_list.includes(2000001) ? 'TaskList' : 'TemplateList';
+    }
+    let currentTab = this.$route.query.tab || curTab();
 
     return {
-      currentTab: this.$route.query.tab || 'TaskList',
+      currentTab,
       popedom_code_list,
       menuList: [
         {