Browse Source

问题修改

wangcahngsheng 11 months atrás
parent
commit
dd28949a18
1 changed files with 6 additions and 6 deletions
  1. 6 6
      src/views/homePage.vue

+ 6 - 6
src/views/homePage.vue

@@ -75,8 +75,13 @@
             }
         },
         created() {
+            this.getMenuData()
+            if (window.sessionStorage.getItem('user')) {
+                let obj = JSON.parse(window.sessionStorage.getItem('user'))
+                this.userName = obj.name
+                this.getPersonMsg(obj.id)
+            }
             if (!this.$route?.query?.taskInfo) {
-                this.getMenuData()
                 if (window.sessionStorage.getItem('routeTags')) {
                     this.routeTags = JSON.parse(window.sessionStorage.getItem('routeTags'))
                     if (this.$route?.path === '/') {
@@ -94,11 +99,6 @@
                     })
                     window.sessionStorage.setItem('routeTags', JSON.stringify(this.routeTags))
                 }
-                if (window.sessionStorage.getItem('user')) {
-                    let obj = JSON.parse(window.sessionStorage.getItem('user'))
-                    this.userName = obj.name
-                    this.getPersonMsg(obj.id)
-                }
             } else {
                 this.$router.push({ path: "/taskCenter", query: this.$route.query})
             }