refactor: 登陆逻辑优化

This commit is contained in:
Burt
2024-01-16 17:09:14 +08:00
parent bd67776dcf
commit 006bf537f8
3 changed files with 11 additions and 27 deletions

View File

@@ -11,10 +11,10 @@
<view class="ml-2">{{ userStore.userInfo?.nickname }}</view>
</view>
<view class="flex items-center leading-6" v-else @click="show = true">
<fly-login v-if="show" />
<view class="i-carbon-user-avatar"></view>
<view class="ml-2">点击显示微信头像</view>
</view>
<fly-login v-model="show" />
<fly-content :line="10" />
<button v-if="hasLogin" class="mt-2" @click="logout">退出登录</button>
</view>
@@ -31,7 +31,6 @@ const logout = () => {
title: '确认退出当前账号?',
success: (res) => {
if (res.confirm) {
show.value = false
userStore.clearUserInfo()
}
},