diff --git a/.umirc.ts b/.umirc.ts index a5f4599..a2e0a5c 100644 --- a/.umirc.ts +++ b/.umirc.ts @@ -25,7 +25,7 @@ export default defineConfig({ component: '@/pages/Basic/Header', routes: [ { - path: '/basic/index', + path: '/basic', component: '@/pages/Basic/List/Index', }, { @@ -53,7 +53,7 @@ export default defineConfig({ component: '@/pages/Equipment/Header', routes: [ { - path: '/equipment/index', + path: '/equipment', component: '@/pages/Equipment/List/Index', }, ], @@ -63,7 +63,7 @@ export default defineConfig({ component: '@/pages/Encrypt/Header', routes: [ { - path: '/encrypt/index', + path: '/encrypt', component: '@/pages/Encrypt/List/Index', }, ], @@ -96,10 +96,13 @@ export default defineConfig({ path: '/manager/basicManager/allotment', component: '@/pages/Manager/BasicManager/List/Allotment', }, + { component: '@/pages/HttpStatus/404' }, ], }, + { component: '@/pages/HttpStatus/404' }, ], }, + { component: '@/pages/HttpStatus/404' }, ], }, ], diff --git a/src/pages/Basic/List/Certificate/Step4/index.tsx b/src/pages/Basic/List/Certificate/Step4/index.tsx index e992f32..161b9eb 100644 --- a/src/pages/Basic/List/Certificate/Step4/index.tsx +++ b/src/pages/Basic/List/Certificate/Step4/index.tsx @@ -20,7 +20,7 @@ const Page: FC = ({ basic, dispatch }) => { }); if (res.result === 'success') { message.success('开通证书系统成功'); - history.replace('/basic/index'); + history.replace('/basic'); } }; diff --git a/src/pages/Basic/List/Device/index.tsx b/src/pages/Basic/List/Device/index.tsx index 7102424..b03dbd3 100644 --- a/src/pages/Basic/List/Device/index.tsx +++ b/src/pages/Basic/List/Device/index.tsx @@ -127,7 +127,7 @@ const Page: FC = ({ basic, dispatch }) => { }); if (res.result === 'success') { message.success('成功开通设施管理设备'); - history.replace('/basic/index'); + history.replace('/basic'); } }; diff --git a/src/pages/Equipment/List/DataCenter/index.tsx b/src/pages/Equipment/List/DataCenter/index.tsx index 9a523d5..18bbd2b 100644 --- a/src/pages/Equipment/List/DataCenter/index.tsx +++ b/src/pages/Equipment/List/DataCenter/index.tsx @@ -54,7 +54,7 @@ const Page: FC = () => { }); if (res.result === 'success') { message.success('操作成功'); - history.replace('/equipment/index'); + history.replace('/equipment'); } }; diff --git a/src/pages/Equipment/List/LocalManager/index.tsx b/src/pages/Equipment/List/LocalManager/index.tsx index 3d49fbe..ec85c29 100644 --- a/src/pages/Equipment/List/LocalManager/index.tsx +++ b/src/pages/Equipment/List/LocalManager/index.tsx @@ -64,7 +64,7 @@ const Page: FC = () => { }); if (res.result === 'success') { message.success('操作成功'); - history.replace('/equipment/index'); + history.replace('/equipment'); } }; diff --git a/src/pages/HttpStatus/404.tsx b/src/pages/HttpStatus/404.tsx new file mode 100644 index 0000000..11e7db5 --- /dev/null +++ b/src/pages/HttpStatus/404.tsx @@ -0,0 +1,13 @@ +import { Button, Result } from 'antd'; +import React from 'react'; + +const App: React.FC = () => ( + } + /> +); + +export default App; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index f92f7d0..84a9635 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -10,7 +10,7 @@ const IndexPage = ({ ...props }) => { useEffect(() => { const basic = ['/', '/basic/device', '/basic/certificate']; if (basic.includes(props.location.pathname)) { - history.replace('/basic/index'); + history.replace('/basic'); } }, []);