他人页
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user