浏览代码

修复360浏览器无法退出登录

tianyabing 2 年之前
父节点
当前提交
2d37b72cd8
共有 2 个文件被更改,包括 10 次插入2 次删除
  1. 2 2
      src/components/home/HomeIndex.vue
  2. 8 0
      src/views/HomeView.vue

+ 2 - 2
src/components/home/HomeIndex.vue

@@ -66,7 +66,6 @@
         </el-card>
       </el-col>
       <el-col :span="24"><br/></el-col>
-      <el-col :span="24"><br/></el-col>
       <el-col :span="12">
         <el-card class="box-card" :style="cardStyle">
           <template #header>
@@ -127,7 +126,8 @@ export default {
     return {
       platformIcon,introduceIcon,systemInfoIcon,dataDetail,
       cardStyle: {
-        height: 200+'px'
+        height: 200+'px',
+        'padding-bottom': '15px'
       },
       cardBodyStyle: {
         height: ''

+ 8 - 0
src/views/HomeView.vue

@@ -146,6 +146,14 @@ export default {
     },
     logout() {
       this.$util.loading.handleLoading(true);
+      this.$store.state.token = '';
+      this.$store.state.userInfo = {};
+      this.loginForm = {
+        userName: '',
+        password: '',
+        clientId: this.$constant.serviceId,
+      };
+      localStorage.clear();
       this.$store.commit('resetState', {});
       this.$util.loading.handleLoading(false);
       this.judgeLogin();