他人页
This commit is contained in:
@@ -58,13 +58,14 @@ const MyselfPage: React.FC = () => {
|
||||
set_user_info(user_data);
|
||||
|
||||
// 获取球局记录
|
||||
let games_data;
|
||||
if (active_tab === "hosted") {
|
||||
games_data = await UserService.get_hosted_games(user_id);
|
||||
} else {
|
||||
games_data = await UserService.get_participated_games(user_id);
|
||||
}
|
||||
set_game_records(games_data);
|
||||
load_game_data();
|
||||
// let games_data;
|
||||
// if (active_tab === "hosted") {
|
||||
// games_data = await UserService.get_hosted_games(user_id);
|
||||
// } else {
|
||||
// games_data = await UserService.get_participated_games(user_id);
|
||||
// }
|
||||
// set_game_records(games_data);
|
||||
} catch (error) {
|
||||
console.error("加载用户数据失败:", error);
|
||||
Taro.showToast({
|
||||
@@ -98,9 +99,9 @@ const MyselfPage: React.FC = () => {
|
||||
try {
|
||||
let games_data;
|
||||
if (active_tab === "hosted") {
|
||||
games_data = await UserService.get_hosted_games(user_id);
|
||||
games_data = await UserService.get_hosted_games(user_info.id);
|
||||
} else {
|
||||
games_data = await UserService.get_participated_games(user_id);
|
||||
games_data = await UserService.get_participated_games(user_info.id);
|
||||
}
|
||||
set_game_records(games_data);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user