|
|
@@ -4,6 +4,7 @@ import RightContent from '@/components/RightContent'
|
|
|
import { PERMISSION_NEED_PATH } from './utils/consts/customer'
|
|
|
import { message } from 'antd'
|
|
|
import logo from '../public/logo.svg'
|
|
|
+import BasicModal, { BasicDrawer } from '@/components/Modal'
|
|
|
|
|
|
const loginPath = '/user/login'
|
|
|
|
|
|
@@ -26,7 +27,7 @@ export async function getInitialState() {
|
|
|
} catch (error) {
|
|
|
message.error('获取数据权限失败,请联系管理员')
|
|
|
}
|
|
|
- return undefined
|
|
|
+ return {}
|
|
|
}
|
|
|
// 如果是登录页面,不执行
|
|
|
if (history.location.pathname !== loginPath) {
|
|
|
@@ -67,6 +68,13 @@ export const layout = ({ initialState, setInitialState }) => {
|
|
|
permData && setInitialState({ ...initialState, permData })
|
|
|
}
|
|
|
},
|
|
|
+ childrenRender: children => (
|
|
|
+ <>
|
|
|
+ {children}
|
|
|
+ <BasicDrawer />
|
|
|
+ <BasicModal />
|
|
|
+ </>
|
|
|
+ ),
|
|
|
// menuHeaderRender: false,
|
|
|
...initialState?.settings
|
|
|
}
|