wangcahngsheng vor 11 Monaten
Ursprung
Commit
dd28949a18
1 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen
  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})
             }