feat: api
This commit is contained in:
@@ -41,14 +41,14 @@
|
||||
<v-list-item v-if="store.isLoggedIn" class="py-4 bg-primary text-white">
|
||||
<template #prepend>
|
||||
<v-avatar color="accent" size="48">
|
||||
<span class="text-white font-weight-bold text-h6">{{
|
||||
store.userProfile.name.substring(1)
|
||||
}}</span>
|
||||
<span class="text-white font-weight-bold text-h6">
|
||||
{{ (store.userProfile.name || "市民").substring(0, 1) }}
|
||||
</span>
|
||||
</v-avatar>
|
||||
</template>
|
||||
|
||||
<v-list-item-title class="font-weight-bold">
|
||||
{{ store.userProfile.name }} 先生
|
||||
{{ store.userProfile.name || "市民" }} 先生
|
||||
</v-list-item-title>
|
||||
|
||||
<v-list-item-subtitle class="text-white-50">{{
|
||||
@@ -353,9 +353,9 @@ function getBottomNavIconColor(value: string) {
|
||||
return activeTab.value === value ? "secondary" : "secondary-darken-1";
|
||||
}
|
||||
|
||||
function handleLogout() {
|
||||
store.logout();
|
||||
router.push("/login");
|
||||
async function handleLogout() {
|
||||
await store.logout();
|
||||
await router.push("/login");
|
||||
drawer.value = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user