panhui há 4 anos atrás
pai
commit
b7ac08ba66
1 ficheiros alterados com 18 adições e 16 exclusões
  1. 18 16
      src/main/nine-space/src/views/Mine.vue

+ 18 - 16
src/main/nine-space/src/views/Mine.vue

@@ -181,23 +181,25 @@ export default {
     },
     },
     mounted() {
     mounted() {
         this.$store.dispatch('getUserInfo');
         this.$store.dispatch('getUserInfo');
-        this.$http
-            .post(
-                '/identityAuth/all',
-                {
-                    query: {
-                        userId: this.$store.state.userInfo.id
+        if (this.isLogin) {
+            this.$http
+                .post(
+                    '/identityAuth/all',
+                    {
+                        query: {
+                            userId: this.$store.state.userInfo.id
+                        }
+                    },
+                    { body: 'json' }
+                )
+                .then(res => {
+                    if (!res.empty) {
+                        this.form = res.content[0];
+                        this.org = this.form.org;
+                        console.log(this.org);
                     }
                     }
-                },
-                { body: 'json' }
-            )
-            .then(res => {
-                if (!res.empty) {
-                    this.form = res.content[0];
-                    this.org = this.form.org;
-                    console.log(this.org);
-                }
-            });
+                });
+        }
     },
     },
     methods: {
     methods: {
         copy() {
         copy() {