diff --git a/src/pages/user/index.vue b/src/pages/user/index.vue
index cf2bc9c..c669f85 100644
--- a/src/pages/user/index.vue
+++ b/src/pages/user/index.vue
@@ -16,13 +16,13 @@
消息中心
-
+
- 退出登录
+ 退出登录
@@ -47,6 +47,27 @@ const toArchivesRoom = () => {
})
}
+// 退出登录
+const logout = () => {
+ uni.showModal({
+ title: '提示',
+ content: '确定退出登录吗?',
+ success: (res) => {
+ if (res.confirm) {
+ // 执行退出登录操作
+ uni.removeStorageSync('token')
+ uni.showToast({
+ title: '退出登录成功',
+ icon: 'success',
+ })
+ uni.reLaunch({
+ url: '/pages/login/index',
+ })
+ }
+ }
+ })
+}
+//