| | |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | <!-- 设置 --> |
| | | <!-- <div class="menu-right__item btn"> |
| | | <el-tooltip effect="dark" content="账户设置" placement="bottom-end" :hide-after="1000"> |
| | | <i class="el-icon-s-tools"></i> |
| | | </el-tooltip> |
| | | </div> --> |
| | | <!-- 退出登录 --> |
| | | <div class="menu-right__item btn" @click="loginout"> |
| | | <el-tooltip effect="dark" content="退出登录" placement="bottom-end" :hide-after="1000"> |
| | |
| | | }, |
| | | created() { |
| | | this.setLoginInfo() |
| | | console.log(this.user) |
| | | }, |
| | | methods: { |
| | | baseInfo() { |
| | |
| | | sessionStorage.clear(); |
| | | this.$router.push({ path: "/login" }) |
| | | }).catch(err => { |
| | | console.log(err); |
| | | }) |
| | | }, |
| | | // 改变选中状态 |
| | |
| | | async setLoginInfo() { |
| | | const info = JSON.parse(sessionStorage.getItem('user')); |
| | | if (info) { |
| | | console.log(info) |
| | | this.user = info; |
| | | } else { |
| | | this.user = await this.getLoginInfo(); |
| | | console.log(this.user) |
| | | } |
| | | this.show = true |
| | | }, |