lrf402788946 5 年 前
コミット
f3349f1bff
1 ファイル変更7 行追加2 行削除
  1. 7 2
      src/layout/index/top.vue

+ 7 - 2
src/layout/index/top.vue

@@ -22,6 +22,7 @@
 
 
 <script>
 <script>
 import { mapActions, mapState, createNamespacedHelpers } from 'vuex';
 import { mapActions, mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: login } = createNamespacedHelpers('login');
 export default {
 export default {
   name: 'top',
   name: 'top',
   props: {},
   props: {},
@@ -36,6 +37,7 @@ export default {
     ...mapState(['user']),
     ...mapState(['user']),
   },
   },
   methods: {
   methods: {
+    ...login(['logout']),
     currentTime() {
     currentTime() {
       setInterval(this.getTime, 500);
       setInterval(this.getTime, 500);
     },
     },
@@ -49,9 +51,12 @@ export default {
       _this.gettime = yy + '-' + mm + '-' + dd + ' ' + weekday[day];
       _this.gettime = yy + '-' + mm + '-' + dd + ' ' + weekday[day];
     },
     },
     loginBtn() {
     loginBtn() {
-      this.$router.push({ path: '/login' });
+      window.location.href = 'http://free.liaoningdoupo.com/platlogin/';
+    },
+    toLogOut() {
+      this.logout();
+      window.location.href = 'http://free.liaoningdoupo.com/platlogin/';
     },
     },
-    toLogOut() {},
   },
   },
 };
 };
 </script>
 </script>