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