1
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user