mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-08 04:16:07 +08:00
修复任务运行状态展示
This commit is contained in:
parent
b73431a7ab
commit
d7d29c468c
|
@ -19,6 +19,12 @@ export default {
|
||||||
hideInMenu: true,
|
hideInMenu: true,
|
||||||
component: '@/pages/login/index',
|
component: '@/pages/login/index',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/crontab',
|
||||||
|
name: '定时任务',
|
||||||
|
icon: <FieldTimeOutlined />,
|
||||||
|
component: '@/pages/crontab/index',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/cookie',
|
path: '/cookie',
|
||||||
name: 'Cookie管理',
|
name: 'Cookie管理',
|
||||||
|
@ -37,12 +43,6 @@ export default {
|
||||||
icon: <FormOutlined />,
|
icon: <FormOutlined />,
|
||||||
component: '@/pages/diy/index',
|
component: '@/pages/diy/index',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/crontab',
|
|
||||||
name: '定时任务',
|
|
||||||
icon: <FieldTimeOutlined />,
|
|
||||||
component: '@/pages/crontab/index',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/diff',
|
path: '/diff',
|
||||||
name: '对比工具',
|
name: '对比工具',
|
||||||
|
|
|
@ -31,7 +31,7 @@ export default function (props: any) {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (props.location.pathname === '/') {
|
if (props.location.pathname === '/') {
|
||||||
history.push('/cookie');
|
history.push('/crontab');
|
||||||
}
|
}
|
||||||
}, [props.location.pathname]);
|
}, [props.location.pathname]);
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,8 @@ import CronModal from './modal';
|
||||||
const { Text } = Typography;
|
const { Text } = Typography;
|
||||||
|
|
||||||
enum CrontabStatus {
|
enum CrontabStatus {
|
||||||
'idle',
|
|
||||||
'running',
|
'running',
|
||||||
|
'idle',
|
||||||
'disabled',
|
'disabled',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ const Login = () => {
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
if (data.code === 200) {
|
if (data.code === 200) {
|
||||||
localStorage.setItem(config.authKey, data.token);
|
localStorage.setItem(config.authKey, data.token);
|
||||||
history.push('/cookie');
|
history.push('/crontab');
|
||||||
} else if (data.code === 100) {
|
} else if (data.code === 100) {
|
||||||
notification.warn({
|
notification.warn({
|
||||||
message: data.msg,
|
message: data.msg,
|
||||||
|
@ -39,7 +39,7 @@ const Login = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const isAuth = localStorage.getItem(config.authKey);
|
const isAuth = localStorage.getItem(config.authKey);
|
||||||
if (isAuth) {
|
if (isAuth) {
|
||||||
history.push('/cookie');
|
history.push('/crontab');
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user