ソースを参照

添加退出登录

HOME\tianlin01 1 年間 前
コミット
ef510d65b3
1 ファイル変更14 行追加2 行削除
  1. 14 2
      inspur-ui/src/views/meeting_pad.vue

+ 14 - 2
inspur-ui/src/views/meeting_pad.vue

@@ -5,7 +5,7 @@
         <el-image :src="logo" fit="fit" class="icon-32" />
         <div class="title" style="margin-left:4px">灯塔智慧党建-控制端</div>
       </div>
-      <div class="logout">
+      <div class="logout" @click="logout">
         退出登录
       </div>
     </div>
@@ -184,7 +184,19 @@
           this.total = response.total;
           this.loading = false;
         });
-      }
+      },
+      async logout() {
+        this.$confirm('确定注销并退出系统吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$store.dispatch('LogOut').then(() => {
+            /*location.href = '/index';*/
+            this.$router.push("/login_pad")
+          })
+        }).catch(() => {});
+      },
     }
   };
 </script>