You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
我是这样设置的:
`
import {IConfigFromPlugins} from "@@/core/pluginConfig";
export default <IConfigFromPlugins['routes']>[
{
name: '登录',
path: '/login',
component: './Login',
layout: false,
},
{
path: '/',
flatMenu: true,
// wrappers: ['@/wrappers/LoginAuth'],
routes: [
{
path: '/',
redirect: '/home'
},
{
name: '首页',
path: '/home',
component: './Home',
icon: 'HomeTwoTone',
},
{
name: '产品管理',
path: 'product/panel',
component: './merchant/product/panel',
icon: 'ReconciliationTwoTone'
},
]
}
]
`
`
import {Navigate, Outlet} from 'umi'
import TokenUtil from "@/utils/app/tokenUtil";
export default () => {
// return ;
console.log('验证前:', TokenUtil.isLoggedIn());
if (TokenUtil.isLoggedIn()) {
return <>
</>
}
console.log('验证后:', TokenUtil.isLoggedIn());
return ;
}
`
刷新浏览器地址才有效,通过菜单点击 切换页面无效;请问是我哪里写错了吗?
Beta Was this translation helpful? Give feedback.
All reactions