mirror of
https://github.com/PlayEdu/h5.git
synced 2025-07-23 07:23:20 +08:00
我的页面优化
This commit is contained in:
parent
fa47b63769
commit
b851789171
@ -15,8 +15,8 @@ const MemberPage = () => {
|
||||
const navigate = useNavigate();
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
const [currentDepartment, setCurrentDepartment] = useState<string>("");
|
||||
const [visible, setVisible] = useState(false);
|
||||
const [init, setInit] = useState(false);
|
||||
const [visible, setVisible] = useState<boolean>(false);
|
||||
const [init, setInit] = useState<boolean>(false);
|
||||
const [stats, setStats] = useState<any>({});
|
||||
const [fileList, setFileList] = useState<ImageUploadItem[]>([
|
||||
{
|
||||
@ -136,7 +136,7 @@ const MemberPage = () => {
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{init && user.name && (
|
||||
{init && (
|
||||
<>
|
||||
<Image
|
||||
width={100}
|
||||
@ -146,10 +146,10 @@ const MemberPage = () => {
|
||||
marginRight: 20,
|
||||
}}
|
||||
fit="cover"
|
||||
src={user.avatar}
|
||||
src={user?.avatar}
|
||||
/>
|
||||
<div className={styles["other-cont"]}>
|
||||
<div className={styles["name"]}>{user.name}</div>
|
||||
<div className={styles["name"]}>{user?.name}</div>
|
||||
<div className={styles["departments"]}>
|
||||
<div className={styles["department-name"]}>
|
||||
{currentDepartment}
|
||||
|
19
src/playedu.d.ts
vendored
19
src/playedu.d.ts
vendored
@ -53,6 +53,25 @@ declare global {
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
interface UserModel {
|
||||
id: number;
|
||||
name: string;
|
||||
avatar: string;
|
||||
credit1: number;
|
||||
email: string;
|
||||
create_city: string;
|
||||
create_ip: string;
|
||||
id_card: string;
|
||||
is_active: number;
|
||||
is_lock: number;
|
||||
is_set_password: number;
|
||||
is_verify: number;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
login_at: string | null;
|
||||
verify_at: string | null;
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
|
@ -8,7 +8,7 @@ import {
|
||||
} from "../../utils/index";
|
||||
|
||||
type UserStoreInterface = {
|
||||
user: null;
|
||||
user: UserModel | null;
|
||||
departments: string[];
|
||||
currentDepId: number;
|
||||
isLogin: boolean;
|
||||
|
Loading…
x
Reference in New Issue
Block a user