This commit is contained in:
Professional 2025-05-24 02:16:15 +07:00
parent 7c06cf85a5
commit 19a041266d

View File

@ -222,7 +222,7 @@ const userAge = computed(() => {
// Methods
const loadUser = async () => {
if (!route.params.id) {
if (!route.params.userId) {
error.value = 'ID пользователя не указан';
loading.value = false;
return;
@ -232,13 +232,13 @@ const loadUser = async () => {
error.value = '';
try {
console.log('[UserProfileView] Загрузка пользователя:', route.params.id);
const response = await api.getUserById(route.params.id);
console.log('[UserProfileView] Загрузка пользователя:', route.params.userId);
const response = await api.getUserById(route.params.userId);
user.value = response.data;
// Записываем просмотр профиля
try {
await api.recordProfileView(route.params.id, 'profile_link');
await api.recordProfileView(route.params.userId, 'profile_link');
console.log('[UserProfileView] Просмотр профиля записан');
} catch (viewError) {
console.warn('[UserProfileView] Не удалось записать просмотр профиля:', viewError);