This commit is contained in:
张成
2025-09-07 20:12:54 +08:00
parent 45f85a8572
commit fa0dc5bbd7
5 changed files with 217 additions and 75 deletions

View File

@@ -265,7 +265,7 @@ export class UserService {
participated: userData.stats?.participated_games_count || 0
},
bio: '',
personal_profile: '',
location:userData.province + userData.city || '',
occupation: '',
ntrp_level: '',
@@ -282,6 +282,22 @@ export class UserService {
}
}
// 更新用户信息
static async update_user_info(update_data: Partial<UserInfo>): Promise<void> {
try {
const response = await httpService.post(API_CONFIG.USER.UPDATE, update_data, {
showLoading: true
});
if (response.code !== 0) {
throw new Error(response.message || '更新用户信息失败');
}
} catch (error) {
console.error('更新用户信息失败:', error);
throw error;
}
}
// 获取用户主办的球局
static async get_hosted_games(user_id: string): Promise<any[]> {
try {