|
|
@ -55,7 +55,7 @@ |
|
|
|
我的消息 |
|
|
|
</el-dropdown-item> |
|
|
|
</router-link> |
|
|
|
<span style="display:block;" @click="logoutVisible=true"> |
|
|
|
<span style="display:block;" @click="open"> |
|
|
|
<el-dropdown-item> |
|
|
|
退出登录 |
|
|
|
</el-dropdown-item> |
|
|
@ -63,21 +63,6 @@ |
|
|
|
</el-dropdown-menu> |
|
|
|
</el-dropdown> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 退出登录 --> |
|
|
|
<el-dialog title="退出登录" :modal-append-to-body="false" :close-on-click-modal="false" :visible.sync="logoutVisible" :before-close="handleClose"> |
|
|
|
<span class="dialog-right-top" /> |
|
|
|
<span class="dialog-left-bottom" /> |
|
|
|
<div class="setting-dialog"> |
|
|
|
<div class="dialog-delt"> |
|
|
|
<p><span>确定注销并退出系统吗?</span></p> |
|
|
|
</div> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="logoutVisible = false">取消</el-button> |
|
|
|
<el-button type="primary" @click="logout">确定</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -108,7 +93,6 @@ export default { |
|
|
|
return { |
|
|
|
Avatar: Avatar, |
|
|
|
defaultImg: 'this.src="' + require('@/assets/images/avatar.png') + '"', |
|
|
|
logoutVisible: false, |
|
|
|
msgList: [], |
|
|
|
themeValue: localStorage.getItem('themeValue') ? localStorage.getItem('themeValue') : 'dark' |
|
|
|
} |
|
|
@ -210,15 +194,15 @@ export default { |
|
|
|
this.$router.push({ path: '/user/center', query: { activeIndex: 1 }}) |
|
|
|
this.$refs.messageDrop.hide() |
|
|
|
}, |
|
|
|
// open() { |
|
|
|
// this.$confirm('确定注销并退出系统吗?', '提示', { |
|
|
|
// confirmButtonText: '确定', |
|
|
|
// cancelButtonText: '取消', |
|
|
|
// type: 'warning' |
|
|
|
// }).then(() => { |
|
|
|
// this.logout() |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
open() { |
|
|
|
this.$confirm('确定注销并退出系统吗?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.logout() |
|
|
|
}) |
|
|
|
}, |
|
|
|
logout() { |
|
|
|
this.$store.dispatch('LogOut').then(() => { |
|
|
|
location.reload() |
|
|
|