mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
31 lines
703 B
JavaScript
31 lines
703 B
JavaScript
|
|
|
|
import { access as accessApi } from '@fesjs/fes';
|
|
import PageLoading from '@/components/PageLoading';
|
|
import UserCenter from '@/components/UserCenter';
|
|
|
|
export const beforeRender = {
|
|
loading: <PageLoading />,
|
|
action() {
|
|
const { setRole } = accessApi;
|
|
return new Promise((resolve) => {
|
|
setTimeout(() => {
|
|
setRole('admin');
|
|
resolve({
|
|
userName: 'harrywan'
|
|
});
|
|
}, 1000);
|
|
});
|
|
}
|
|
};
|
|
|
|
export const layout = {
|
|
customHeader: <UserCenter />
|
|
// unAccessHandler({ next }) {
|
|
// next(false);
|
|
// },
|
|
// noFoundHandler({ next }) {
|
|
// next(false);
|
|
// }
|
|
};
|