2025-08-15 16:16:41 +08:00
|
|
|
|
import { Avatar } from "@arco-design/web-react";
|
2025-08-20 22:39:05 +08:00
|
|
|
|
import { useSelector } from "react-redux";
|
2025-08-15 16:16:41 +08:00
|
|
|
|
import "./index.css";
|
|
|
|
|
|
|
|
|
|
|
|
const ProfileCard = () => {
|
2025-08-20 22:39:05 +08:00
|
|
|
|
const studentInfo = useSelector((state) => state.student.studentInfo);
|
2025-08-15 16:16:41 +08:00
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
<div className="profile-card-wrapper">
|
|
|
|
|
|
<div className="profile-card-user-info">
|
|
|
|
|
|
<Avatar className="profile-card-user-avatar">
|
|
|
|
|
|
<img
|
|
|
|
|
|
alt="avatar"
|
|
|
|
|
|
src="//p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</Avatar>
|
|
|
|
|
|
<div className="profile-card-user-name">
|
2025-08-20 22:39:05 +08:00
|
|
|
|
<span className="profile-card-user-name-text">
|
|
|
|
|
|
{studentInfo?.realName || "-"}
|
|
|
|
|
|
</span>
|
2025-08-15 16:16:41 +08:00
|
|
|
|
<p className="profile-card-user-name-student-id">
|
2025-08-20 22:39:05 +08:00
|
|
|
|
学号: {studentInfo?.studentNo || "-"}
|
2025-08-15 16:16:41 +08:00
|
|
|
|
</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<ul className="profile-card-achievement-info">
|
|
|
|
|
|
<li className="profile-card-achievement-info-item">
|
|
|
|
|
|
<span className="profile-card-achievement-info-item-title">学分</span>
|
|
|
|
|
|
<span className="profile-card-achievement-info-item-text">
|
2025-08-22 10:32:57 +08:00
|
|
|
|
{studentInfo?.myRank?.score || "-"}
|
2025-08-15 16:16:41 +08:00
|
|
|
|
</span>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
<li className="profile-card-achievement-info-item">
|
|
|
|
|
|
<span className="profile-card-achievement-info-item-title">
|
|
|
|
|
|
班级排名
|
|
|
|
|
|
</span>
|
|
|
|
|
|
<span className="profile-card-achievement-info-item-text">
|
2025-08-22 10:32:57 +08:00
|
|
|
|
{studentInfo?.myRank?.rank || "-"}
|
2025-08-15 16:16:41 +08:00
|
|
|
|
</span>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
<li className="profile-card-achievement-info-item">
|
|
|
|
|
|
<span className="profile-card-achievement-info-item-title">MBTI</span>
|
|
|
|
|
|
<span className="profile-card-achievement-info-item-text">
|
2025-08-20 22:39:05 +08:00
|
|
|
|
{studentInfo?.mbtiType || "-"}
|
2025-08-15 16:16:41 +08:00
|
|
|
|
</span>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
<ul className="profile-card-class-info">
|
|
|
|
|
|
<li className="profile-card-class-info-item">
|
|
|
|
|
|
<i className="profile-card-class-info-item-icon icon-school" />
|
|
|
|
|
|
<span className="profile-card-class-info-item-title">学校</span>
|
|
|
|
|
|
<span className="profile-card-class-info-item-text">
|
2025-08-20 22:39:05 +08:00
|
|
|
|
{studentInfo?.school || "-"}
|
2025-08-15 16:16:41 +08:00
|
|
|
|
</span>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
<li className="profile-card-class-info-item">
|
|
|
|
|
|
<i className="profile-card-class-info-item-icon icon-major" />
|
|
|
|
|
|
<span className="profile-card-class-info-item-title">专业</span>
|
|
|
|
|
|
<span className="profile-card-class-info-item-text">
|
2025-08-20 22:39:05 +08:00
|
|
|
|
{studentInfo?.major || "-"}
|
2025-08-15 16:16:41 +08:00
|
|
|
|
</span>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
<li className="profile-card-class-info-item">
|
|
|
|
|
|
<i className="profile-card-class-info-item-icon icon-location" />
|
2025-08-20 22:39:05 +08:00
|
|
|
|
<span className="profile-card-class-info-item-title">班级</span>
|
2025-08-15 16:16:41 +08:00
|
|
|
|
<span className="profile-card-class-info-item-text">
|
2025-08-20 22:39:05 +08:00
|
|
|
|
{studentInfo?.className || "-"}
|
2025-08-15 16:16:41 +08:00
|
|
|
|
</span>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
<li className="profile-card-class-info-item">
|
|
|
|
|
|
<i className="profile-card-class-info-item-icon icon-course" />
|
2025-08-19 22:35:01 +08:00
|
|
|
|
<span className="profile-card-class-info-item-title">学习阶段</span>
|
2025-08-15 16:16:41 +08:00
|
|
|
|
<span className="profile-card-class-info-item-text">
|
2025-08-20 22:39:05 +08:00
|
|
|
|
{studentInfo?.stageName || "-"}
|
2025-08-15 16:16:41 +08:00
|
|
|
|
</span>
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export default ProfileCard;
|