他人页

This commit is contained in:
2025-09-15 17:30:48 +08:00
parent 91636855aa
commit 7a0bc71f9f
10 changed files with 227 additions and 167 deletions

View File

@@ -252,7 +252,7 @@ export class UserService {
try {
// 过滤掉空字段
const filtered_data: Record<string, any> = {};
Object.keys(update_data).forEach(key => {
const value = update_data[key as keyof UserInfo];
// 只添加非空且非空字符串的字段
@@ -285,10 +285,10 @@ export class UserService {
}
// 获取用户主办的球局
static async get_hosted_games(user_id: string): Promise<any[]> {
static async get_hosted_games(userId: string): Promise<any[]> {
try {
const response = await httpService.post<any>(API_CONFIG.USER.HOSTED_GAMES, {
user_id
userId
}, {
showLoading: false
@@ -308,10 +308,10 @@ export class UserService {
}
// 获取用户参与的球局
static async get_participated_games(user_id: string): Promise<any[]> {
static async get_participated_games(userId: string): Promise<any[]> {
try {
const response = await httpService.post<any>(API_CONFIG.USER.PARTICIPATED_GAMES, {
user_id
userId
}, {
showLoading: false
@@ -522,4 +522,4 @@ export const get_user_info = (): any | null => {
} catch (error) {
return null;
}
};
};