存档
This commit is contained in:
@@ -12,9 +12,17 @@
|
||||
</view>
|
||||
|
||||
<view class="menu-list">
|
||||
<view class="menu-item" @click="handleRecordClick">
|
||||
<text class="menu-text">答题记录</text>
|
||||
<text class="arrow">›</text>
|
||||
</view>
|
||||
<view class="menu-item" @click="handlePointRecordClick">
|
||||
<text class="menu-text">学识分记录</text>
|
||||
<text class="arrow">›</text>
|
||||
</view>
|
||||
<view class="menu-item">
|
||||
<text class="menu-text">关于我们</text>
|
||||
<text class="arrow">></text>
|
||||
<text class="arrow">›</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -60,28 +68,44 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
handleLogout() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要退出登录吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
storage.removeToken()
|
||||
storage.removeRefreshToken()
|
||||
storage.removeUserInfo()
|
||||
storage.removeQuestion()
|
||||
storage.clearAnsweredQuestions()
|
||||
|
||||
this.userInfo = {}
|
||||
|
||||
uni.showToast({
|
||||
title: '已退出登录',
|
||||
icon: 'success'
|
||||
})
|
||||
}
|
||||
handleRecordClick() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/records/records'
|
||||
})
|
||||
},
|
||||
|
||||
handlePointRecordClick() {
|
||||
try {
|
||||
uni.navigateTo({
|
||||
url: '/pages/point-record/point-record'
|
||||
})
|
||||
} catch (error) {
|
||||
console.error('跳转失败:', error)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
handleLogout() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要退出登录吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
storage.removeToken()
|
||||
storage.removeRefreshToken()
|
||||
storage.removeUserInfo()
|
||||
storage.removeQuestion()
|
||||
storage.clearAnsweredQuestions()
|
||||
|
||||
this.userInfo = {}
|
||||
|
||||
uni.showToast({
|
||||
title: '已退出登录',
|
||||
icon: 'success'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user