Browse Source

后台退出登录跳转

zhanghao 2 tháng trước cách đây
mục cha
commit
390d33f837
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      src/layout/components/Navbar.vue

+ 3 - 1
src/layout/components/Navbar.vue

@@ -98,7 +98,9 @@ export default {
         type: 'warning'
       }).then(() => {
         this.$store.dispatch('LogOut').then(() => {
-          location.href = '/login';
+          this.$router.push({
+            path: '/login' // 将路径完全替换为 /index
+          });
         })
       }).catch(() => {});
     }