跳转他人页

This commit is contained in:
2025-09-14 23:29:37 +08:00
parent 9860e2baa0
commit 997c5a6e28
6 changed files with 26 additions and 11 deletions

View File

@@ -1,4 +1,3 @@
export default definePageConfig({
navigationBarTitleText: '用户主页',
navigationStyle: 'custom'
})

View File

@@ -23,6 +23,7 @@
flex-direction: column;
gap: 16px;
margin-bottom: 16px;
margin-top: 98px;
// 基本信息
.basic_info {

View File

@@ -11,6 +11,7 @@ import {
GameRecord,
} from "@/components/UserInfo";
import { UserService } from "@/services/userService";
import * as LoginService from "@/services/loginService";
const OtherUserPage: React.FC = () => {
// 获取页面参数
@@ -34,6 +35,9 @@ const OtherUserPage: React.FC = () => {
location: "北京朝阳",
occupation: "金融从业者",
ntrp_level: "NTRP 3.5",
is_following: false,
ongoing_games: [],
personal_profile: '',
});
// 模拟球局数据
@@ -52,8 +56,9 @@ const OtherUserPage: React.FC = () => {
const load_user_data = async () => {
if (user_id) {
try {
const user_data = await UserService.get_user_info(user_id);
setUserInfo(user_data);
// const user_data = await UserService.get_user_info(user_id);
const res = await LoginService.getUserInfoById(user_id);
setUserInfo(res.data as UserInfo);
const games_data = await UserService.get_user_games(
user_id,
@@ -151,7 +156,7 @@ const OtherUserPage: React.FC = () => {
</View>
</View>
</View>
<GuideBar currentPage="personal" />
{/* <GuideBar currentPage="personal" /> */}
</View>
);
};