1.18整合
This commit is contained in:
@@ -67,7 +67,7 @@
|
||||
<view class="lg text-gray cuIcon-right"></view>
|
||||
</view>
|
||||
</view>
|
||||
<button class=" bg-blue round margin-top-xl ">退出登录</button>
|
||||
<button class=" bg-blue round margin-top-xl " @click="handleLogout()">退出登录</button>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
@@ -98,6 +98,24 @@
|
||||
url:'/pages/personalcenter/account'
|
||||
})
|
||||
}
|
||||
//退出登录
|
||||
const handleLogout = () => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要退出登录吗?',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
console.log('用户点击确定');
|
||||
uni.clearStorageSync()
|
||||
uni.reLaunch({
|
||||
url:'/pages/login/login'
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user