提交 28d362de 作者: 翁进城

模拟用户登录

上级 e7ed9a38
...@@ -93,7 +93,11 @@ export default function NavHeader() { ...@@ -93,7 +93,11 @@ export default function NavHeader() {
</Space> </Space>
{user ? ( {user ? (
<div className={styles.haedImg}> <div className={styles.haedImg}>
<Avatar size={36} style={{ background: "#bdbdbd" }}></Avatar> <Avatar
size={36}
style={{ background: "#bdbdbd" }}
src={user.userImg}
></Avatar>
</div> </div>
) : ( ) : (
<Button <Button
......
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { AutoComplete, Modal } from "antd"; import { AutoComplete, Modal } from "antd";
import Image from "next/image"; import Image from "next/image";
import api from "~/api";
type Props = { type Props = {
open: boolean; open: boolean;
...@@ -20,6 +21,8 @@ export default function LoginModal(props: Props) { ...@@ -20,6 +21,8 @@ export default function LoginModal(props: Props) {
style: "", style: "",
href: "", href: "",
}); });
window.setUserId(1);
} }
}, [props.open]); }, [props.open]);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论