diff --git a/src/app.jsx b/src/app.jsx index c119eb7..2ae1c01 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -983,10 +983,13 @@ export const layout = ({ initialState }) => { // children.pathname = history.location.pathname; console.log("11111",children); return ( - - - {/* {children} */} + <> + {initialState?.currentUser && location.pathname !== loginPath ? ( + + {children} + ) : children} + ); }, // 自定义 403 页面 diff --git a/src/pages/sys/deviceConfig/StockLoc/index.jsx b/src/pages/sys/deviceConfig/StockLoc/index.jsx index 4861cc0..8fdd56b 100644 --- a/src/pages/sys/deviceConfig/StockLoc/index.jsx +++ b/src/pages/sys/deviceConfig/StockLoc/index.jsx @@ -5,7 +5,7 @@ import { PageContainer, FooterToolbar } from '@ant-design/pro-layout'; import ProTable from '@ant-design/pro-table'; import ProDescriptions from '@ant-design/pro-descriptions'; import CreateForm from './components/CreateForm'; -import { Add, Update, Delete, GetPage } from './services'; +import { Add, Delete, GetPage } from './services'; const key = 'message'; diff --git a/src/pages/sys/sysSettings/components/base.jsx b/src/pages/sys/sysSettings/components/base.jsx index 0ca864b..a57a709 100644 --- a/src/pages/sys/sysSettings/components/base.jsx +++ b/src/pages/sys/sysSettings/components/base.jsx @@ -9,8 +9,6 @@ import ProForm, { ProFormTextArea, } from '@ant-design/pro-form'; import { useRequest } from 'umi'; -import { queryCurrent } from './service'; -import { queryProvince, queryCity } from './service'; import styles from './BaseView.less'; const validatorPhone = (rule, value, callback) => {