From 7b4fb1c7147d366b5d1fb8f32755181cc6fe1a9e Mon Sep 17 00:00:00 2001
From: cshenfu <men883234@gmail.com>
Date: 星期一, 29 五月 2023 10:16:38 +0800
Subject: [PATCH] change logout

---
 pages/mine/mine.vue |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/pages/mine/mine.vue b/pages/mine/mine.vue
index eef04b0..c2e2993 100755
--- a/pages/mine/mine.vue
+++ b/pages/mine/mine.vue
@@ -81,7 +81,6 @@
 				<view class="flex align-center justify-between solid-bottom margin-left-sm">
 					<view class="title">閫�鍑虹櫥褰�</view>
 					<view class="flex align-center">
-						<view class="desc">鎻愰棶鐨勮壓鏈�</view>
 						<u-icon name="error" color="#848B9E" size="16"></u-icon>
 					</view>
 				</view>
@@ -325,12 +324,23 @@
 				})
 			},
 			logout() {
-				uni.removeStorageSync('userInfo')
-				uni.removeStorageSync('token')
-				this.$store.commit('logout')
-				uni.navigateTo({
-					url: this.tabbar.list[0].pagePath
-				})
+				uni.showModal({
+					title: '鎻愮ず',
+					content: '纭畾閫�鍑虹櫥褰曞悧锛�',
+					success: function (res) {
+						if (res.confirm) {
+							uni.removeStorageSync('userInfo')
+							uni.removeStorageSync('token')
+							this.$store.commit('logout')
+							uni.navigateTo({
+								url: this.tabbar.list[0].pagePath
+							})
+						} else if (res.cancel) {
+							console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+						}
+					}.bind(this)//鍙鐞唘ni.shuowModal鐨勫紓姝ワ紙鍗虫嬁涓嶅埌data閲岄潰鏁版嵁鐨勮В鍐冲姙娉曪級
+				});
+				
 			}
 		},
 	};

--
Gitblit v1.9.1