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