master
lion 3 years ago
parent 8fe89c350d
commit 211e005a09

@ -6,13 +6,17 @@
<view class="toplogo justify-between align-center"> <view class="toplogo justify-between align-center">
<view> <view>
<view class="fs50"> <view class="fs50">
Hi ~ {{userName}} Hi ~ {{userName}}
</view> </view>
<view> <view>
{{userEmail}} {{userEmail}}
</view> </view>
</view>
<view @click='logout'>
<u--image :src="logo" width="164rpx" height="65rpx"></u--image>
<view class="logout" >退出</view>
</view> </view>
<u--image :src="logo" width="164rpx" height="65rpx"></u--image>
</view> </view>
<view class="search"> <view class="search">
<view class="justify-between align-center"> <view class="justify-between align-center">
@ -215,8 +219,17 @@
uni.showToast({ uni.showToast({
title: res, title: res,
duration: 2000, 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.select.page = 1
this.loadList() 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(){}, // scrolltolower(){},
} }
@ -290,7 +322,10 @@
text-align: center; text-align: center;
margin-top: 15rpx margin-top: 15rpx
} }
.logout{
text-align: right;
font-size: 30rpx;
}
/deep/ .u-empty { /deep/ .u-empty {
min-height: 30vh; min-height: 30vh;
} }

@ -100,7 +100,6 @@
}) })
}, },
utilFail: function(res) { utilFail: function(res) {
console.log("resss",res)
uni.showToast({ uni.showToast({
title: res, title: res,
duration: 2000, duration: 2000,

Loading…
Cancel
Save