1
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
@use '../../../scss/common.scss' as *;
|
||||
|
||||
// 个人页面样式
|
||||
.myself_page {
|
||||
min-height: 100vh;
|
||||
@@ -23,59 +25,14 @@
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
margin-bottom: 16px;
|
||||
margin-top: 98px;
|
||||
|
||||
// 基本信息
|
||||
.basic_info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
|
||||
.avatar_container {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.12), 0px 0px 1px 0px rgba(0, 0, 0, 0.2);
|
||||
|
||||
.avatar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
.info_container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
|
||||
.nickname {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 600;
|
||||
font-size: 20px;
|
||||
line-height: 1.4em;
|
||||
letter-spacing: 1.9%;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.join_date {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 1.4em;
|
||||
letter-spacing: 2.7%;
|
||||
color: rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 统计数据
|
||||
.stats_section {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
|
||||
.stats_container {
|
||||
display: flex;
|
||||
@@ -88,127 +45,11 @@
|
||||
align-items: center;
|
||||
|
||||
.stat_number {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
line-height: 1.4em;
|
||||
letter-spacing: 2.1%;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
@include text-medium;
|
||||
}
|
||||
|
||||
.stat_label {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 500;
|
||||
font-size: 12px;
|
||||
line-height: 1.4em;
|
||||
letter-spacing: 3.2%;
|
||||
color: rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.action_buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
|
||||
|
||||
|
||||
.follow_button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 12px 16px 12px 12px;
|
||||
height: 40px;
|
||||
background: #000000;
|
||||
border: 0.5px solid rgba(0, 0, 0, 0.06);
|
||||
border-radius: 999px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&.following {
|
||||
background: #FFFFFF;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.button_icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.button_text {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
line-height: 1.4em;
|
||||
color: #FFFFFF;
|
||||
|
||||
.following & {
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.message_button {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: #FFFFFF;
|
||||
border: 0.5px solid rgba(0, 0, 0, 0.12);
|
||||
border-radius: 999px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
.button_icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
.edit_button {
|
||||
min-width: 60px;
|
||||
height: 40px;
|
||||
background: #FFFFFF;
|
||||
border: 0.5px solid rgba(0, 0, 0, 0.12);
|
||||
border-radius: 999px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
padding: 0 12px;
|
||||
|
||||
.button_text {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
line-height: 1.4em;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
.share_button {
|
||||
min-width: 60px;
|
||||
height: 40px;
|
||||
background: #FFFFFF;
|
||||
border: 0.5px solid rgba(0, 0, 0, 0.12);
|
||||
border-radius: 999px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
padding: 0 12px;
|
||||
margin: 0px !important;
|
||||
|
||||
.button_text {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
line-height: 1.4em;
|
||||
color: #000000;
|
||||
@include text-small;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -226,14 +67,7 @@
|
||||
flex-wrap: wrap;
|
||||
|
||||
.tag_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 6px 8px;
|
||||
height: 20px;
|
||||
background: #FFFFFF;
|
||||
border: 0.5px solid rgba(0, 0, 0, 0.16);
|
||||
border-radius: 999px;
|
||||
@include tag-base;
|
||||
|
||||
.tag_icon {
|
||||
width: 12px;
|
||||
@@ -241,22 +75,13 @@
|
||||
}
|
||||
|
||||
.tag_text {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 500;
|
||||
font-size: 11px;
|
||||
line-height: 1.8em;
|
||||
letter-spacing: -2.1%;
|
||||
color: #000000;
|
||||
@include text-tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bio_text {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 1.571em;
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
@include text-body;
|
||||
white-space: pre-line;
|
||||
}
|
||||
}
|
||||
@@ -266,18 +91,15 @@
|
||||
margin-bottom: 16px;
|
||||
|
||||
.action_card {
|
||||
@include card-base;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #FFFFFF;
|
||||
border: 1px solid rgba(0, 0, 0, 0.06);
|
||||
border-radius: 12px;
|
||||
box-shadow: 0px 4px 36px 0px rgba(0, 0, 0, 0.06);
|
||||
overflow: hidden;
|
||||
|
||||
.action_content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
@@ -295,18 +117,15 @@
|
||||
}
|
||||
|
||||
.action_text {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 600;
|
||||
font-size: 15px;
|
||||
line-height: 1.4em;
|
||||
color: #000000;
|
||||
@include text-style(15px, 600, 1.4em);
|
||||
color: $color-primary;
|
||||
}
|
||||
}
|
||||
|
||||
.action_divider {
|
||||
width: 1px;
|
||||
height: 16px;
|
||||
background: rgba(0, 0, 0, 0.06);
|
||||
background: $color-primary-lightest-5;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -327,24 +146,19 @@
|
||||
transition: all 0.3s ease;
|
||||
|
||||
.tab_text {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 600;
|
||||
font-size: 20px;
|
||||
line-height: 1.4em;
|
||||
letter-spacing: 1.9%;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
@include text-primary;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
&.active {
|
||||
.tab_text {
|
||||
color: #000000;
|
||||
color: $color-primary;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(.active) {
|
||||
.tab_text {
|
||||
color: rgba(0, 0, 0, 0.2);
|
||||
color: $color-primary-lightest-2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -361,30 +175,18 @@
|
||||
margin-bottom: 16px;
|
||||
|
||||
.date_text {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
line-height: 1.4em;
|
||||
letter-spacing: 2.71%;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
@include text-style(14px, 600, 1.4em, 2.71%);
|
||||
color: $color-primary-light;
|
||||
}
|
||||
|
||||
.separator {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
line-height: 1.4em;
|
||||
letter-spacing: 2.11%;
|
||||
color: rgba(0, 0, 0, 0.35);
|
||||
@include text-style(18px, 400, 1.4em, 2.11%);
|
||||
color: $color-primary-lightest;
|
||||
}
|
||||
|
||||
.weekday_text {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
line-height: 1.4em;
|
||||
letter-spacing: 2.71%;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
@include text-style(14px, 600, 1.4em, 2.71%);
|
||||
color: $color-primary-light;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,11 +198,8 @@
|
||||
padding: 0 5px 15px;
|
||||
|
||||
.game_card {
|
||||
background: #FFFFFF;
|
||||
border: 0.5px solid rgba(0, 0, 0, 0.08);
|
||||
border-radius: 20px;
|
||||
@include card-base;
|
||||
padding: 0 0 12px;
|
||||
box-shadow: 0px 4px 36px 0px rgba(0, 0, 0, 0.06);
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
position: relative;
|
||||
@@ -417,11 +216,8 @@
|
||||
padding: 12px 15px 0;
|
||||
|
||||
.game_title {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
line-height: 1.5em;
|
||||
color: #000000;
|
||||
@include text-style(16px, 600, 1.5em);
|
||||
color: $color-primary;
|
||||
}
|
||||
|
||||
.game_type_icon {
|
||||
@@ -440,11 +236,7 @@
|
||||
padding: 6px 15px 0;
|
||||
|
||||
.time_text {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
line-height: 1.5em;
|
||||
color: rgba(60, 60, 67, 0.6);
|
||||
@include text-caption;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -458,19 +250,12 @@
|
||||
.location_text,
|
||||
.type_text,
|
||||
.distance_text {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
line-height: 1.5em;
|
||||
color: rgba(60, 60, 67, 0.6);
|
||||
@include text-caption;
|
||||
}
|
||||
|
||||
.separator {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
line-height: 1.3em;
|
||||
color: rgba(60, 60, 67, 0.3);
|
||||
@include text-style(14px, 400, 1.3em);
|
||||
color: $color-text-tertiary;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -488,7 +273,7 @@
|
||||
width: 56.44px;
|
||||
height: 56.44px;
|
||||
border-radius: 9px;
|
||||
border: 1.5px solid #FFFFFF;
|
||||
border: 1.5px solid $color-white;
|
||||
|
||||
&:nth-child(1) {
|
||||
top: 4.18px;
|
||||
@@ -528,30 +313,17 @@
|
||||
gap: -8px;
|
||||
|
||||
.participant_avatar {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
border: 1px solid #FFFFFF;
|
||||
@include avatar-base(20px);
|
||||
border: 1px solid $color-white;
|
||||
}
|
||||
}
|
||||
|
||||
.participants_count {
|
||||
background: #FFFFFF;
|
||||
border: 0.5px solid rgba(0, 0, 0, 0.16);
|
||||
border-radius: 999px;
|
||||
@include tag-base;
|
||||
padding: 6px;
|
||||
height: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.count_text {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 500;
|
||||
font-size: 11px;
|
||||
line-height: 1.8em;
|
||||
letter-spacing: -2.1%;
|
||||
color: #000000;
|
||||
@include text-tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -561,22 +333,10 @@
|
||||
gap: 4px;
|
||||
|
||||
.info_tag {
|
||||
background: #FFFFFF;
|
||||
border: 0.5px solid rgba(0, 0, 0, 0.16);
|
||||
border-radius: 999px;
|
||||
padding: 6px 8px;
|
||||
height: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@include tag-base;
|
||||
|
||||
.tag_text {
|
||||
font-family: 'PingFang SC';
|
||||
font-weight: 500;
|
||||
font-size: 11px;
|
||||
line-height: 1.8em;
|
||||
letter-spacing: -2.1%;
|
||||
color: #000000;
|
||||
@include text-tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -594,7 +354,7 @@
|
||||
transform: translateX(-50%);
|
||||
width: 140px;
|
||||
height: 5px;
|
||||
background: #000000;
|
||||
background: $color-primary;
|
||||
border-radius: 2.5px;
|
||||
z-index: 10;
|
||||
}
|
||||
@@ -1,47 +1,11 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { View, Text, Image, ScrollView, Button } from '@tarojs/components';
|
||||
import { View, Text, Image, ScrollView } from '@tarojs/components';
|
||||
import Taro from '@tarojs/taro';
|
||||
import './index.scss';
|
||||
import GuideBar from '@/components/GuideBar'
|
||||
// 用户信息接口
|
||||
interface UserInfo {
|
||||
id: string;
|
||||
nickname: string;
|
||||
avatar: string;
|
||||
join_date: string;
|
||||
stats: {
|
||||
following: number;
|
||||
friends: number;
|
||||
hosted: number;
|
||||
participated: number;
|
||||
};
|
||||
tags: string[];
|
||||
bio: string;
|
||||
location: string;
|
||||
occupation: string;
|
||||
ntrp_level: string;
|
||||
}
|
||||
import { UserInfoCard, UserInfo, GameRecord } from '@/components/UserInfo/index'
|
||||
import { UserService } from '@/services/userService'
|
||||
|
||||
// 球局记录接口
|
||||
interface GameRecord {
|
||||
id: string;
|
||||
title: string;
|
||||
date: string;
|
||||
time: string;
|
||||
duration: string;
|
||||
location: string;
|
||||
type: string;
|
||||
distance: string;
|
||||
participants: {
|
||||
avatar: string;
|
||||
nickname: string;
|
||||
}[];
|
||||
max_participants: number;
|
||||
current_participants: number;
|
||||
level_range: string;
|
||||
game_type: string;
|
||||
images: string[];
|
||||
}
|
||||
|
||||
const MyselfPage: React.FC = () => {
|
||||
// 获取页面参数
|
||||
@@ -51,51 +15,28 @@ const MyselfPage: React.FC = () => {
|
||||
// 判断是否为当前用户
|
||||
const is_current_user = !user_id;
|
||||
|
||||
// 模拟用户数据
|
||||
const [user_info] = useState<UserInfo>({
|
||||
// 用户信息状态
|
||||
const [user_info, set_user_info] = useState<UserInfo>({
|
||||
id: '1',
|
||||
nickname: '188的王晨',
|
||||
nickname: '加载中...',
|
||||
avatar: require('../../../static/userInfo/default_avatar.svg'),
|
||||
join_date: '2025年9月加入',
|
||||
join_date: '加载中...',
|
||||
stats: {
|
||||
following: 124,
|
||||
friends: 24,
|
||||
hosted: 7,
|
||||
participated: 24
|
||||
following: 0,
|
||||
friends: 0,
|
||||
hosted: 0,
|
||||
participated: 0
|
||||
},
|
||||
tags: ['上海黄浦', '互联网从业者', 'NTRP 4.0'],
|
||||
bio: '网球入坑两年,偏好双打,正手进攻型选手\n平时在张江、世纪公园附近活动,欢迎约球!\n不卷分数,但认真对待每一拍,每一场球都想打得开心。有时候也会带相机来拍点照片📸',
|
||||
location: '上海黄浦',
|
||||
occupation: '互联网从业者',
|
||||
ntrp_level: 'NTRP 4.0'
|
||||
tags: ['加载中...'],
|
||||
bio: '加载中...',
|
||||
location: '加载中...',
|
||||
occupation: '加载中...',
|
||||
ntrp_level: 'NTRP 3.0'
|
||||
});
|
||||
|
||||
// 模拟球局数据
|
||||
const [game_records] = useState<GameRecord[]>([
|
||||
{
|
||||
id: '1',
|
||||
title: '女生轻松双打',
|
||||
date: '明天(周五)',
|
||||
time: '下午5点',
|
||||
duration: '2小时',
|
||||
location: '仁恒河滨花园网球场',
|
||||
type: '室外',
|
||||
distance: '3.5km',
|
||||
participants: [
|
||||
{ avatar: require('../../../static/userInfo/user1.svg'), nickname: '用户1' },
|
||||
{ avatar: require('../../../static/userInfo/user2.svg'), nickname: '用户2' }
|
||||
],
|
||||
max_participants: 4,
|
||||
current_participants: 2,
|
||||
level_range: '2.0 至 2.5',
|
||||
game_type: '双打',
|
||||
images: [
|
||||
require('../../../static/userInfo/game1.svg'),
|
||||
require('../../../static/userInfo/game2.svg'),
|
||||
require('../../../static/userInfo/game3.svg')
|
||||
]
|
||||
}
|
||||
]);
|
||||
// 球局记录状态
|
||||
const [game_records, set_game_records] = useState<GameRecord[]>([]);
|
||||
const [loading, set_loading] = useState(true);
|
||||
|
||||
// 关注状态
|
||||
const [is_following, setIsFollowing] = useState(false);
|
||||
@@ -113,24 +54,6 @@ const MyselfPage: React.FC = () => {
|
||||
});
|
||||
};
|
||||
|
||||
// 处理分享
|
||||
const handle_share = () => {
|
||||
Taro.showShareMenu({
|
||||
withShareTicket: true
|
||||
});
|
||||
};
|
||||
|
||||
// 处理返回
|
||||
const handle_back = () => {
|
||||
Taro.navigateBack();
|
||||
};
|
||||
|
||||
// 处理编辑资料
|
||||
const handle_edit_profile = () => {
|
||||
Taro.navigateTo({
|
||||
url: '/pages/userInfo/edit/index'
|
||||
});
|
||||
};
|
||||
|
||||
// 处理球局详情
|
||||
const handle_game_detail = (game_id: string) => {
|
||||
@@ -156,115 +79,30 @@ const MyselfPage: React.FC = () => {
|
||||
return (
|
||||
<View className="myself_page">
|
||||
{/* 主要内容 */}
|
||||
<ScrollView className="main_content" scrollY>
|
||||
<View className='main_content'>
|
||||
{/* 用户信息区域 */}
|
||||
<View className="user_info_section">
|
||||
{/* 头像和基本信息 */}
|
||||
<View className="basic_info">
|
||||
<View className="avatar_container">
|
||||
<Image className="avatar" src={user_info.avatar} />
|
||||
</View>
|
||||
<View className="info_container">
|
||||
<Text className="nickname">{user_info.nickname}</Text>
|
||||
<Text className="join_date">{user_info.join_date}</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
{/* 统计数据 */}
|
||||
<View className="stats_section">
|
||||
<View className="stats_container">
|
||||
<View className="stat_item">
|
||||
<Text className="stat_number">{user_info.stats.following}</Text>
|
||||
<Text className="stat_label">关注</Text>
|
||||
</View>
|
||||
<View className="stat_item">
|
||||
<Text className="stat_number">{user_info.stats.friends}</Text>
|
||||
<Text className="stat_label">球友</Text>
|
||||
</View>
|
||||
<View className="stat_item">
|
||||
<Text className="stat_number">{user_info.stats.hosted}</Text>
|
||||
<Text className="stat_label">主办</Text>
|
||||
</View>
|
||||
<View className="stat_item">
|
||||
<Text className="stat_number">{user_info.stats.participated}</Text>
|
||||
<Text className="stat_label">参加</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View className="action_buttons">
|
||||
{/* 只有非当前用户才显示关注按钮 */}
|
||||
{!is_current_user && (
|
||||
<Button
|
||||
className={`follow_button ${is_following ? 'following' : ''}`}
|
||||
onClick={handle_follow}
|
||||
>
|
||||
<Image
|
||||
className="button_icon"
|
||||
src={require('../../../static/userInfo/plus.svg')}
|
||||
/>
|
||||
<Text className="button_text">
|
||||
{is_following ? '已关注' : '关注'}
|
||||
</Text>
|
||||
</Button>
|
||||
)}
|
||||
{/* 只有非当前用户才显示消息按钮 */}
|
||||
{!is_current_user && (
|
||||
<Button className="message_button">
|
||||
<Image
|
||||
className="button_icon"
|
||||
src={require('../../../static/userInfo/message.svg')}
|
||||
/>
|
||||
</Button>
|
||||
)}
|
||||
{/* 只有当前用户才显示编辑按钮 */}
|
||||
{is_current_user && (
|
||||
<Button className="edit_button" onClick={handle_edit_profile}>
|
||||
<Text className="button_text">编辑</Text>
|
||||
</Button>
|
||||
)}
|
||||
{/* 只有当前用户才显示分享按钮 */}
|
||||
{is_current_user && (
|
||||
<Button className="share_button" onClick={handle_share}>
|
||||
<Text className="button_text">分享</Text>
|
||||
</Button>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
|
||||
{/* 标签和简介 */}
|
||||
<View className="tags_bio_section">
|
||||
<View className="tags_container">
|
||||
<View className="tag_item">
|
||||
<Image
|
||||
className="tag_icon"
|
||||
src={require('../../../static/userInfo/location.svg')}
|
||||
/>
|
||||
<Text className="tag_text">{user_info.location}</Text>
|
||||
</View>
|
||||
<View className="tag_item">
|
||||
<Text className="tag_text">{user_info.occupation}</Text>
|
||||
</View>
|
||||
<View className="tag_item">
|
||||
<Text className="tag_text">{user_info.ntrp_level}</Text>
|
||||
</View>
|
||||
</View>
|
||||
<Text className="bio_text">{user_info.bio}</Text>
|
||||
</View>
|
||||
|
||||
<UserInfoCard user_info={user_info}
|
||||
is_current_user={false}
|
||||
is_following={is_following}
|
||||
on_follow={handle_follow}
|
||||
></UserInfoCard>
|
||||
{/* 球局订单和收藏功能 */}
|
||||
<View className="quick_actions_section">
|
||||
<View className="action_card">
|
||||
<View className="action_content" onClick={handle_game_orders}>
|
||||
<Image
|
||||
className="action_icon"
|
||||
src={require('../../../static/userInfo/tennis.svg')}
|
||||
src={require('../../../static/userInfo/order_btn.svg')}
|
||||
/>
|
||||
<Text className="action_text">球局订单</Text>
|
||||
<Text className="action_text">我的订单</Text>
|
||||
</View>
|
||||
<View className="action_divider"></View>
|
||||
<View className="action_content" onClick={handle_favorites}>
|
||||
<Image
|
||||
className="action_icon"
|
||||
src={require('../../../static/userInfo/tennis.svg')}
|
||||
src={require('../../../static/userInfo/sc.svg')}
|
||||
/>
|
||||
<Text className="action_text">收藏</Text>
|
||||
</View>
|
||||
@@ -291,85 +129,86 @@ const MyselfPage: React.FC = () => {
|
||||
<Text className="separator">/</Text>
|
||||
<Text className="weekday_text">星期三</Text>
|
||||
</View>
|
||||
|
||||
{/* 球局卡片 */}
|
||||
<View className="game_cards">
|
||||
{game_records.map((game) => (
|
||||
<View
|
||||
key={game.id}
|
||||
className="game_card"
|
||||
onClick={() => handle_game_detail(game.id)}
|
||||
>
|
||||
{/* 球局标题和类型 */}
|
||||
<View className="game_header">
|
||||
<Text className="game_title">{game.title}</Text>
|
||||
<View className="game_type_icon">
|
||||
<Image
|
||||
className="type_icon"
|
||||
src={require('../../../static/userInfo/tennis.svg')}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
{/* 球局时间 */}
|
||||
<View className="game_time">
|
||||
<Text className="time_text">
|
||||
{game.date} {game.time} {game.duration}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
{/* 球局地点和类型 */}
|
||||
<View className="game_location">
|
||||
<Text className="location_text">{game.location}</Text>
|
||||
<Text className="separator">·</Text>
|
||||
<Text className="type_text">{game.type}</Text>
|
||||
<Text className="separator">·</Text>
|
||||
<Text className="distance_text">{game.distance}</Text>
|
||||
</View>
|
||||
|
||||
{/* 球局图片 */}
|
||||
<View className="game_images">
|
||||
{game.images.map((image, index) => (
|
||||
<Image
|
||||
key={index}
|
||||
className="game_image"
|
||||
src={image}
|
||||
/>
|
||||
))}
|
||||
</View>
|
||||
|
||||
{/* 球局信息标签 */}
|
||||
<View className="game_tags">
|
||||
<View className="participants_info">
|
||||
<View className="avatars">
|
||||
{game.participants.map((participant, index) => (
|
||||
<Image
|
||||
key={index}
|
||||
className="participant_avatar"
|
||||
src={participant.avatar}
|
||||
/>
|
||||
))}
|
||||
</View>
|
||||
<View className="participants_count">
|
||||
<Text className="count_text">
|
||||
报名人数 {game.current_participants}/{game.max_participants}
|
||||
</Text>
|
||||
<ScrollView scrollY>
|
||||
{/* 球局卡片 */}
|
||||
<View className="game_cards">
|
||||
{game_records.map((game) => (
|
||||
<View
|
||||
key={game.id}
|
||||
className="game_card"
|
||||
onClick={() => handle_game_detail(game.id)}
|
||||
>
|
||||
{/* 球局标题和类型 */}
|
||||
<View className="game_header">
|
||||
<Text className="game_title">{game.title}</Text>
|
||||
<View className="game_type_icon">
|
||||
<Image
|
||||
className="type_icon"
|
||||
src={require('../../../static/userInfo/tennis.svg')}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
<View className="game_info_tags">
|
||||
<View className="info_tag">
|
||||
<Text className="tag_text">{game.level_range}</Text>
|
||||
|
||||
{/* 球局时间 */}
|
||||
<View className="game_time">
|
||||
<Text className="time_text">
|
||||
{game.date} {game.time} {game.duration}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
{/* 球局地点和类型 */}
|
||||
<View className="game_location">
|
||||
<Text className="location_text">{game.location}</Text>
|
||||
<Text className="separator">·</Text>
|
||||
<Text className="type_text">{game.type}</Text>
|
||||
<Text className="separator">·</Text>
|
||||
<Text className="distance_text">{game.distance}</Text>
|
||||
</View>
|
||||
|
||||
{/* 球局图片 */}
|
||||
<View className="game_images">
|
||||
{game.images.map((image, index) => (
|
||||
<Image
|
||||
key={index}
|
||||
className="game_image"
|
||||
src={image}
|
||||
/>
|
||||
))}
|
||||
</View>
|
||||
|
||||
{/* 球局信息标签 */}
|
||||
<View className="game_tags">
|
||||
<View className="participants_info">
|
||||
<View className="avatars">
|
||||
{game.participants.map((participant, index) => (
|
||||
<Image
|
||||
key={index}
|
||||
className="participant_avatar"
|
||||
src={participant.avatar}
|
||||
/>
|
||||
))}
|
||||
</View>
|
||||
<View className="participants_count">
|
||||
<Text className="count_text">
|
||||
报名人数 {game.current_participants}/{game.max_participants}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View className="info_tag">
|
||||
<Text className="tag_text">{game.game_type}</Text>
|
||||
<View className="game_info_tags">
|
||||
<View className="info_tag">
|
||||
<Text className="tag_text">{game.level_range}</Text>
|
||||
</View>
|
||||
<View className="info_tag">
|
||||
<Text className="tag_text">{game.game_type}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
))}
|
||||
</View>
|
||||
))}
|
||||
</View>
|
||||
</ScrollView>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</View>
|
||||
<GuideBar currentPage='personal' />
|
||||
</View>
|
||||
);
|
||||
|
||||
@@ -46,7 +46,7 @@ const OtherUserPage: React.FC = () => {
|
||||
try {
|
||||
const user_data = await UserService.get_user_info(user_id);
|
||||
setUserInfo(user_data);
|
||||
|
||||
|
||||
const games_data = await UserService.get_user_games(user_id, active_tab);
|
||||
setGameRecords(games_data);
|
||||
} catch (error) {
|
||||
@@ -99,7 +99,7 @@ const OtherUserPage: React.FC = () => {
|
||||
return (
|
||||
<View className="other_user_page">
|
||||
{/* 主要内容 */}
|
||||
<ScrollView className="main_content" scrollY>
|
||||
<View className="main_content" >
|
||||
{/* 用户信息区域 */}
|
||||
<View className="user_info_section">
|
||||
<UserInfoCard
|
||||
@@ -137,7 +137,7 @@ const OtherUserPage: React.FC = () => {
|
||||
))}
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</View>
|
||||
<GuideBar currentPage='personal' />
|
||||
</View>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user