|
|
@@ -102,8 +102,23 @@
|
|
|
},
|
|
|
// 退出登录
|
|
|
async logout() {
|
|
|
- await this.$store.dispatch('user/logout')
|
|
|
- this.$router.push(`/login?redirect=${this.$route.fullPath}`)
|
|
|
+ await this.$confirm('即将退出登录, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.$store.dispatch('user/logout')
|
|
|
+ this.$router.push(`/login?redirect=${this.$route.fullPath}`)
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '已退出成功!'
|
|
|
+ });
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: '已取消退出!'
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
// 获取当前日期时间星期
|
|
|
get_datetime() {
|