feat: 裁判端添加退出登录按钮
- 在评分列表页导航栏添加退出按钮 - 点击后弹出确认框,确认后清除登录信息并返回登录页 Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<view class="nav-bar">
|
||||
<view class="nav-title">评分系统</view>
|
||||
<view class="nav-right">
|
||||
<view class="logout-btn" @click="handleLogout">退出</view>
|
||||
<view class="nav-dots">···</view>
|
||||
<view class="nav-circle">◎</view>
|
||||
</view>
|
||||
@@ -294,6 +295,20 @@ export default {
|
||||
return scored + '/' + total
|
||||
},
|
||||
|
||||
handleLogout() {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "确定要退出登录吗?",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.removeStorageSync("judgeInfo")
|
||||
uni.removeStorageSync("token")
|
||||
uni.reLaunch({ url: "/pages/login/login" })
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
async handleRefresh() {
|
||||
if (this.isLoading) return
|
||||
uni.showToast({ title: '刷新中...', icon: 'loading', duration: 1000 })
|
||||
@@ -437,6 +452,15 @@ export default {
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.logout-btn {
|
||||
font-size: 26rpx;
|
||||
color: #FFFFFF;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
padding: 8rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.nav-dots, .nav-circle {
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
|
||||
Reference in New Issue
Block a user