fix: call back

This commit is contained in:
lbaf23 2021-08-07 20:30:05 +08:00
parent 9ab7da834c
commit 89740c7d79
3 changed files with 42 additions and 40 deletions

View File

@ -39,13 +39,12 @@ class MyProject extends React.PureComponent {
theme="light"
style={{backgroundColor: '#f2f4f5'}}
>
{type === 'teacher' ?
<Menu
defaultSelectedKeys={['published']}
className="menu-bar"
mode="inline"
>
{type === 'teacher' ?
<>
<Menu.Item key="published" icon={<CheckCircleOutlined/>}>
<Link to="/my-project/published">
已发布
@ -61,9 +60,13 @@ class MyProject extends React.PureComponent {
已结束
</Link>
</Menu.Item>
</>
</Menu>
:
<>
<Menu
defaultSelectedKeys={['learning']}
className="menu-bar"
mode="inline"
>
<Menu.Item key="learning" icon={<SyncOutlined/>}>
<Link to="/my-project/learning">
进行中
@ -74,9 +77,8 @@ class MyProject extends React.PureComponent {
已完成
</Link>
</Menu.Item>
</>
}
</Menu>
}
{type === 'teacher' ?
<Button
type='primary'

View File

@ -23,7 +23,7 @@ class AuthCallback extends React.Component {
if (res.data.code === 200) {
localStorage.setItem("type", res.data.data.tag)
message.success("登录成功,跳转主页");
window.location.href = "/project"
window.location.href = "/public-project"
} else {
this.setState({
msg: res.msg,

View File

@ -128,7 +128,7 @@ class HeaderLayout extends React.Component {
</Link>
</Menu.Item>
<Menu.Item key="my-project">
<Link to="/my-project/published">
<Link to="/my-project">
我的空间
</Link>
</Menu.Item>