Browse Source

完成退出功能页面开发

Administrator 8 years ago
parent
commit
e64e1fbb4b
1 changed files with 24 additions and 9 deletions
  1. 24 9
      pages/logquit/index.vue

+ 24 - 9
pages/logquit/index.vue

@@ -1,11 +1,7 @@
 <template>
   <div class="logout">
-    <template v-if="isMobile">
-
-    </template>
-    <template>
-      <loading/>
-    </template>
+    <loading/>
+    <p>退出中,请稍后...</p>
   </div>
 </template>
 
@@ -17,10 +13,29 @@
     components: {
       Loading
     },
-    computed: {
-      isMobile () {
-        return this.$store.state.option.isMobile
+    mounted () {
+      this.$nextTick(() => {
+        this.logquit()
+      })
+    },
+    methods: {
+      logquit () {
+        this.$store.dispatch('logout')
       }
     }
   }
 </script>
+<style type="text/scss" lang="scss" scoped>
+  .logout{
+    p{
+      position: fixed;
+      left: 0;
+      right:0;
+      top: 54%;
+      z-index: 1000;
+      text-align: center;
+      font-size: 14px;
+      color:#333;
+    }
+  }
+</style>