feat: 联调
This commit is contained in:
@@ -1,64 +1,68 @@
|
||||
import { Input, Dropdown, message } from 'antd';
|
||||
import Logo from '@/imgs/logo.jpg'
|
||||
import Head from '@/imgs/head.jpg'
|
||||
import Logo from '@/imgs/logo.jpg'
|
||||
import { HeartOutlined, LikeOutlined, LoginOutlined, UserOutlined } from '@ant-design/icons'
|
||||
import TopMenu from '@components/top-menu'
|
||||
import { UserOutlined, HeartOutlined, LikeOutlined, LoginOutlined } from '@ant-design/icons'
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { Dropdown, Input, message } from 'antd'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
|
||||
const { Search } = Input;
|
||||
const { Search } = Input
|
||||
|
||||
const menuItems = [
|
||||
{
|
||||
label: '个人中心',
|
||||
key: 1,
|
||||
icon: <UserOutlined style={{ fontSize: '16px' }} />
|
||||
},
|
||||
{
|
||||
label: '我的收藏',
|
||||
key: 2,
|
||||
icon: <HeartOutlined style={{ fontSize: '16px' }} />
|
||||
}, {
|
||||
label: '我的点赞',
|
||||
key: 3,
|
||||
icon: <LikeOutlined style={{ fontSize: '16px' }} />
|
||||
},
|
||||
{
|
||||
type: 'divider',
|
||||
},
|
||||
{
|
||||
label: '退出',
|
||||
key: 4,
|
||||
icon: <LoginOutlined style={{ fontSize: '16px' }} />
|
||||
}
|
||||
{
|
||||
label: '个人中心',
|
||||
key: 1,
|
||||
icon: <UserOutlined style={{ fontSize: '16px' }} />
|
||||
},
|
||||
{
|
||||
label: '我的收藏',
|
||||
key: 2,
|
||||
icon: <HeartOutlined style={{ fontSize: '16px' }} />
|
||||
},
|
||||
{
|
||||
label: '我的点赞',
|
||||
key: 3,
|
||||
icon: <LikeOutlined style={{ fontSize: '16px' }} />
|
||||
},
|
||||
{
|
||||
type: 'divider'
|
||||
},
|
||||
{
|
||||
label: '退出',
|
||||
key: 4,
|
||||
icon: <LoginOutlined style={{ fontSize: '16px' }} />
|
||||
}
|
||||
]
|
||||
|
||||
const Header = () => {
|
||||
const { pathname } = window.location;
|
||||
const navigate = useNavigate()
|
||||
const { pathname } = window.location
|
||||
const navigate = useNavigate()
|
||||
|
||||
const handleMenuClick = e => {
|
||||
if (e.key != 1) {
|
||||
return message.info('敬请期待')
|
||||
}
|
||||
navigate('/user-info')
|
||||
}
|
||||
const handleMenuClick = e => {
|
||||
const userInfoStorage = localStorage.getItem('userInfo')
|
||||
if (!userInfoStorage) {
|
||||
return message.info('请登录')
|
||||
}
|
||||
if (e.key != 1) {
|
||||
return message.info('敬请期待')
|
||||
}
|
||||
navigate('/user-info')
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="head-navigator-box">
|
||||
<div className="head-navigator">
|
||||
<div className="head-navigator-left">
|
||||
<div
|
||||
className="head-navigator-logo"
|
||||
onClick={() =>
|
||||
(window.location.href = '/question-bank')
|
||||
}>
|
||||
<img src={Logo} style={{ height: 50 }} />
|
||||
</div>
|
||||
<TopMenu />
|
||||
</div>
|
||||
<div className="head-navigator-user-box">
|
||||
<div className="time-box"></div>
|
||||
{/* {'/question-bank' == pathname && (
|
||||
return (
|
||||
<div className='head-navigator-box'>
|
||||
<div className='head-navigator'>
|
||||
<div className='head-navigator-left'>
|
||||
<div
|
||||
className='head-navigator-logo'
|
||||
onClick={() => (window.location.href = '/question-bank')}
|
||||
>
|
||||
<img src={Logo} style={{ height: 50 }} />
|
||||
</div>
|
||||
<TopMenu />
|
||||
</div>
|
||||
<div className='head-navigator-user-box'>
|
||||
<div className='time-box'></div>
|
||||
{/* {'/question-bank' == pathname && (
|
||||
<div className="head-navigator-input-box">
|
||||
<Search
|
||||
placeholder="请输入感兴趣的内容~"
|
||||
@@ -67,32 +71,28 @@ const Header = () => {
|
||||
/>
|
||||
</div>
|
||||
)} */}
|
||||
{/* <div className="head-navigator-bell"> */}
|
||||
{/* <Icon type="bell" /> */}
|
||||
{/* </div> */}
|
||||
<div className="head-navigator-user-img">
|
||||
<Dropdown
|
||||
menu={{
|
||||
items: menuItems,
|
||||
onClick: handleMenuClick,
|
||||
}}
|
||||
placement="bottom"
|
||||
trigger={['click']}
|
||||
destroyPopupOnHide
|
||||
overlayStyle={{
|
||||
width: '150px'
|
||||
}}
|
||||
>
|
||||
<img
|
||||
src={Head}
|
||||
style={{ width: 36, height: 36 }}
|
||||
/>
|
||||
</Dropdown>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
{/* <div className="head-navigator-bell"> */}
|
||||
{/* <Icon type="bell" /> */}
|
||||
{/* </div> */}
|
||||
<div className='head-navigator-user-img'>
|
||||
<Dropdown
|
||||
menu={{
|
||||
items: menuItems,
|
||||
onClick: handleMenuClick
|
||||
}}
|
||||
placement='bottom'
|
||||
trigger={['click']}
|
||||
destroyPopupOnHide
|
||||
overlayStyle={{
|
||||
width: '150px'
|
||||
}}
|
||||
>
|
||||
<img src={Head} style={{ width: 36, height: 36 }} />
|
||||
</Dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Header
|
||||
export default Header
|
||||
|
@@ -1,6 +1,6 @@
|
||||
.login-box {
|
||||
width: 100%;
|
||||
height: calc(100% - 100px);
|
||||
height: 100%;
|
||||
background: url(../../imgs/login_bg.jpg) no-repeat 50%;
|
||||
background-size: cover;
|
||||
min-height: 600px;
|
||||
|
@@ -40,11 +40,7 @@ const Login = () => {
|
||||
return (
|
||||
<div className='login-box'>
|
||||
<div className='login-container-inner'>
|
||||
<div className='notes'>
|
||||
LeNet-5 诞生 1998 年 11 月,早期经典卷积神经网络 LeNet-5
|
||||
诞生。杨立昆、莱昂·伯托等发表经典论文“Gradient-Based Learning Applied to Document
|
||||
Recognition”,文章总结了应用于手写字符识别的各种模型并进行了比对,结果显示卷积神经网络表现超群。
|
||||
</div>
|
||||
<div className='notes'></div>
|
||||
<div className='qrcode-box'>
|
||||
<div className='qrcode-desc'>
|
||||
<p>微信扫码关注公众号</p>
|
||||
|
Reference in New Issue
Block a user