From e27aa65d479626dfb6899b6934135e1db4faa13e Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期一, 28 八月 2023 15:49:55 +0800 Subject: [PATCH] modified: .env.development modified: src/layout/components/Navbar.vue modified: src/store/modules/user.js modified: src/views/login/index.vue --- src/layout/components/Navbar.vue | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 905c4ac..01ad010 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -24,7 +24,7 @@ </el-dropdown-item> </el-dropdown-menu> </el-dropdown> - <el-dialog title="淇敼瀵嗙爜" :visible.sync="dialogFormVisible" :append-to-body="true"> + <el-dialog title="淇敼瀵嗙爜" :visible.sync="dialogFormVisible" :append-to-body="true" width="40%"> <el-form :model="form"> <el-form-item label="鏃у瘑鐮�" :label-width="formLabelWidth"> <el-input v-model="form.oldPwd" autocomplete="off"></el-input> @@ -69,7 +69,11 @@ name: 'value' }, dialogFormVisible: false, - formLabelWidth: '120px' + formLabelWidth: '120px', + user: { + id: null, + name: 'value' + } } }, components: { @@ -103,7 +107,8 @@ }, async logout() { // await this.$store.dispatch('user/logout') - localStorage.removeItem("user") + sessionStorage.removeItem("user") + localStorage.removeItem("autoenter"); this.$router.push(`/login?redirect=${this.$route.fullPath}`) this.$router.replace({path: '/login'}); location.reload(); @@ -111,7 +116,7 @@ getUser(){ get(this.$url.info).then(res=>{ this.user = res.data - localStorage.setItem("user",JSON.stringify(res.data)) + sessionStorage.setItem("user",JSON.stringify(res.data)) }) } } -- Gitblit v1.9.3