用户生日、性别、职业、地址、ntrp水平 Picker编辑

This commit is contained in:
2025-09-17 23:25:32 +08:00
parent bb2b31af67
commit 7958e4ee3e
6 changed files with 208 additions and 142 deletions

View File

@@ -31,6 +31,7 @@ interface UserDetailData {
personal_profile: string;
occupation: string;
birthday: string;
ntrp_level: string,
stats: {
followers_count: number;
following_count: number;
@@ -161,6 +162,7 @@ export class UserService {
id: game.id,
title: game.title || '未命名球局',
start_time: date_time,
original_start_time: game.start_time,
end_time: game.end_time || '',
location: location,
distance_km: parseFloat(distance.replace('km', '')) || 0,
@@ -247,12 +249,14 @@ export class UserService {
},
personal_profile: userData.personal_profile || '',
location: userData.city + userData.district || '',
occupation: userData.occupation || '',
ntrp_level: '',
ntrp_level: userData.ntrp_level || '',
phone: userData.phone || '',
gender: userData.gender || '',
birthday: userData.birthday || '',
country: userData.country || '',
province: userData.province || '',
city: userData.city || '',
};
} else {
throw new Error(response.message || '获取用户信息失败');
@@ -281,7 +285,6 @@ export class UserService {
}
}
});
// 如果没有需要更新的字段,直接返回
if (Object.keys(filtered_data).length === 0) {
console.log('没有需要更新的字段');