Просмотр исходного кода

Merge branch 'master' of http://git.izouma.com/xiongzhu/9th

xuqiang 4 лет назад
Родитель
Сommit
2396d810c5
1 измененных файлов с 18 добавлено и 16 удалено
  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() {
         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: {
         copy() {