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