From 61e524a689daed30770eefd55a49e2c5fdcbfce2 Mon Sep 17 00:00:00 2001 From: liuye Date: Thu, 11 May 2023 09:31:26 +0800 Subject: [PATCH] logout --- src/project/wuxi/AppMine/AppMine.vue | 35 +++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/project/wuxi/AppMine/AppMine.vue b/src/project/wuxi/AppMine/AppMine.vue index 1f09fb2..89a3ac6 100644 --- a/src/project/wuxi/AppMine/AppMine.vue +++ b/src/project/wuxi/AppMine/AppMine.vue @@ -46,6 +46,9 @@ +
+ +
@@ -150,7 +153,22 @@ export default { this.$nextTick(() => { this.token && this.getUserInfo() }) - } + }, + onLogout() { + uni.showModal({ + title: '提示', + content: "是否要退出登录", + success: res => { + if (res.confirm) { + this.$store.commit('logout') + this.$toast('退出成功'); + setTimeout(() => { + this.getAuth(); + }, 500) + } + } + }) + }, }, onShow() { this.getAuth(); @@ -348,5 +366,20 @@ export default { } } + .logout { + width: 100%; + height: 96px; + padding: 0 32px; + box-sizing: border-box; + line-height: 96px; + text-align: center; + .login-out { + background: #FFF; + border-radius: 16px; + font-size: 34px; + font-weight: 500; + color: #4181FF; + } + } }