diff --git a/ebike-maintenance/pages/user/mine/MePage.vue b/ebike-maintenance/pages/user/mine/MePage.vue
index b8a71f4..c73808e 100644
--- a/ebike-maintenance/pages/user/mine/MePage.vue
+++ b/ebike-maintenance/pages/user/mine/MePage.vue
@@ -3,7 +3,7 @@
-
+
昵称
@@ -22,7 +22,8 @@
-
+
@@ -34,7 +35,7 @@
} from 'vue';
import config from '@/utils/config';
const imgPath = config.imgPath;
-
+
const menuItems = ref([{
@@ -78,6 +79,32 @@
link: '/pages/user/login/userLogout'
}
]);
+ // 退出登录的方法
+ const logout = () => {
+ uni.showModal({
+ title: '退出登录',
+ content: '是否确认退出并清除缓存?',
+ success: function(res) {
+ if (res.confirm) {
+ // 清除缓存
+ uni.clearStorage("wechat_user");
+
+ // 弹出成功提示
+ uni.showToast({
+ title: '退出成功', // 提示内容
+ icon: 'success', // 图标类型
+ duration: 2000 // 持续时间(单位:毫秒)
+ });
+
+ } else if (res.cancel) {
+ // 用户取消退出,做相应处理(可选)
+ console.log('用户取消退出');
+ }
+ }
+ });
+ }
+
+
const navigateTo = (link) => {