跳转他人页
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '用户主页',
|
||||
navigationStyle: 'custom'
|
||||
})
|
||||
@@ -23,6 +23,7 @@
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
margin-bottom: 16px;
|
||||
margin-top: 98px;
|
||||
|
||||
// 基本信息
|
||||
.basic_info {
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user