From 211e005a096ee03c429e25102c3d6fb51b356bb5 Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Tue, 11 Apr 2023 18:26:22 +0800
Subject: [PATCH] =?UTF-8?q?=E9=80=80=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/bd/mine.vue | 43 +++++++++++++++++++++++++++++++++++++++----
pages/index/login.vue | 1 -
2 files changed, 39 insertions(+), 5 deletions(-)
diff --git a/pages/bd/mine.vue b/pages/bd/mine.vue
index 4d9d1ae..7b7187f 100644
--- a/pages/bd/mine.vue
+++ b/pages/bd/mine.vue
@@ -6,13 +6,17 @@
- Hi ~ {{userName}}
+ Hi ~ {{userName}}
{{userEmail}}
+
+
+
+ 退出
-
+
@@ -215,8 +219,17 @@
uni.showToast({
title: res,
duration: 2000,
- icon: 'none'
+ icon: 'none',
+
})
+ setTimeout(function() {
+ uni.removeStorageSync('userInfo_BD_token')
+ uni.removeStorageSync('userInfo_Bd')
+ uni.redirectTo({
+ url: '/pages/index/index'
+ })
+ }, 2000)
+
}
})
},
@@ -225,6 +238,25 @@
this.select.page = 1
this.loadList()
},
+ logout() {
+ uni.showModal({
+ title: '提示',
+ content: '确认退出账号?',
+ success: function(res) {
+ if (res.confirm) {
+ uni.removeStorageSync('userInfo_BD_token')
+ uni.removeStorageSync('userInfo_Bd')
+ uni.redirectTo({
+ url: '/pages/index/index'
+ })
+ } else if (res.cancel) {
+
+ }
+ }
+ });
+
+
+ }
// scrolltolower(){},
}
@@ -290,7 +322,10 @@
text-align: center;
margin-top: 15rpx
}
-
+ .logout{
+ text-align: right;
+ font-size: 30rpx;
+ }
/deep/ .u-empty {
min-height: 30vh;
}
diff --git a/pages/index/login.vue b/pages/index/login.vue
index 81f0c54..3545932 100644
--- a/pages/index/login.vue
+++ b/pages/index/login.vue
@@ -100,7 +100,6 @@
})
},
utilFail: function(res) {
- console.log("resss",res)
uni.showToast({
title: res,
duration: 2000,