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 @@ @@ -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,