modified: begushiybashkir/bbvue/src/views/Profile.vue
some fix?
This commit is contained in:
@@ -6,9 +6,7 @@
|
|||||||
|
|
||||||
<div v-else-if="user" class="profile-content">
|
<div v-else-if="user" class="profile-content">
|
||||||
<div class="profile-header">
|
<div class="profile-header">
|
||||||
<img :src="getImageUrl('dinamo.jpg')"
|
<img :src="getImageUrl('dinamo.jpg')" alt="Аватар" style="width: 100px; height: 100px; border-radius: 50%;">
|
||||||
alt="Аватар"
|
|
||||||
style="width: 100px; height: 100px; border-radius: 50%;">
|
|
||||||
<h2>{{ user.firstName }} {{ user.lastName }}</h2>
|
<h2>{{ user.firstName }} {{ user.lastName }}</h2>
|
||||||
<p>Участник с {{ joinDate }}</p>
|
<p>Участник с {{ joinDate }}</p>
|
||||||
<p class="user-email">{{ user.email }}</p>
|
<p class="user-email">{{ user.email }}</p>
|
||||||
@@ -191,19 +189,24 @@ export default {
|
|||||||
async loadStats() {
|
async loadStats() {
|
||||||
this.statsLoading = true
|
this.statsLoading = true
|
||||||
try {
|
try {
|
||||||
await Promise.all([
|
const [statsResult, achievementsResult] = await Promise.all([
|
||||||
this.userStore.fetchUserStats(),
|
this.userStore.fetchUserStats(),
|
||||||
this.userStore.fetchUserAchievements()
|
this.userStore.fetchUserAchievements()
|
||||||
])
|
])
|
||||||
|
|
||||||
|
// Проверяем результаты
|
||||||
|
if (!statsResult.success) {
|
||||||
|
console.error('Ошибка загрузки статистики:', statsResult.error)
|
||||||
|
}
|
||||||
|
if (!achievementsResult.success) {
|
||||||
|
console.error('Ошибка загрузки достижений:', achievementsResult.error)
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Ошибка загрузки статистики:', error)
|
console.error('Ошибка загрузки статистики:', error)
|
||||||
} finally {
|
} finally {
|
||||||
this.statsLoading = false
|
this.statsLoading = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async refreshStats() {
|
|
||||||
await this.loadStats()
|
|
||||||
},
|
|
||||||
async handleLogout() {
|
async handleLogout() {
|
||||||
await this.authStore.logout()
|
await this.authStore.logout()
|
||||||
this.$router.push('/login')
|
this.$router.push('/login')
|
||||||
@@ -259,7 +262,7 @@ export default {
|
|||||||
background: white;
|
background: white;
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
@@ -312,7 +315,7 @@ export default {
|
|||||||
background: white;
|
background: white;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border: 1px solid #e0e0e0;
|
border: 1px solid #e0e0e0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user