mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
fix(projects): check if init userInfo when initAuthRoute. fixed #680
This commit is contained in:
@ -176,6 +176,11 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
|||||||
|
|
||||||
/** Init auth route */
|
/** Init auth route */
|
||||||
async function initAuthRoute() {
|
async function initAuthRoute() {
|
||||||
|
// check if user info is initialized
|
||||||
|
if (!authStore.userInfo.userId) {
|
||||||
|
await authStore.initUserInfo();
|
||||||
|
}
|
||||||
|
|
||||||
if (authRouteMode.value === 'static') {
|
if (authRouteMode.value === 'static') {
|
||||||
initStaticAuthRoute();
|
initStaticAuthRoute();
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user