modified: begushiybashkir/bbvue/src/views/Profile.vue

add photo path and names into profile page
This commit is contained in:
2025-10-09 20:29:39 +05:00
parent 6656dfbc7c
commit affaa2679e
+11 -4
View File
@@ -3,7 +3,7 @@
<h1>👤 Личный кабинет</h1>
<div class="profile-header">
<img src="https://via.placeholder.com/100/2e8b57/ffffff?text=У"
<img :src="getImageUrl('dinamo.jpg')"
alt="Аватар"
style="width: 100px; height: 100px; border-radius: 50%;">
<h2>{{ user.firstName }} {{ user.lastName }}</h2>
@@ -69,9 +69,9 @@ export default {
data() {
return {
user: {
firstName: 'Иван',
lastName: 'Иванов',
email: 'ivan.ivanov@example.com',
firstName: 'Йүгерек',
lastName: 'Башҡортов',
email: 'йүгерекбашҡортов@bbclub.ru',
phone: '+7 (999) 123-45-67',
experience: 'intermediate',
goals: 'halfMarathon',
@@ -114,6 +114,13 @@ export default {
}
},
methods: {
getImageUrl(path) {
// В продакшене замените на правильный путь
const baseUrl = import.meta.env.BASE_URL
// Путь от корня public/
console.log(`${baseUrl}images/${path}`)
return `${baseUrl}images/${path}`
},
async loadUserData() {
try {
// TODO: Заменить на реальный API call