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>
 import { mapActions, mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: login } = createNamespacedHelpers('login');
 export default {
   name: 'top',
   props: {},
@@ -36,6 +37,7 @@ export default {
     ...mapState(['user']),
   },
   methods: {
+    ...login(['logout']),
     currentTime() {
       setInterval(this.getTime, 500);
     },
@@ -49,9 +51,12 @@ export default {
       _this.gettime = yy + '-' + mm + '-' + dd + ' ' + weekday[day];
     },
     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>