|
@@ -105,26 +105,11 @@ export const useRouteStore = defineStore('route-store', {
|
|
|
/** 初始化动态路由 */
|
|
|
async initDynamicRoute() {
|
|
|
const { resetAuthStore } = useAuthStore();
|
|
|
- // const { initHomeTab } = useTabStore();
|
|
|
|
|
|
const id = localStorage.getItem('userInfo');
|
|
|
if (!id) {
|
|
|
throw new Error('userId 不能为空!');
|
|
|
}
|
|
|
-
|
|
|
- // const { error, data } = await fetchUserRoutes(Number(id));
|
|
|
-
|
|
|
- // if (!error && data) {
|
|
|
- // this.routeHomeName = data.home;
|
|
|
- // this.handleUpdateRootRedirect(data.home);
|
|
|
- // this.handleAuthRoute(sortRoutes(data.routes));
|
|
|
-
|
|
|
- // initHomeTab(data.home, router);
|
|
|
-
|
|
|
- // this.isInitAuthRoute = true;
|
|
|
- // } else {
|
|
|
- // resetAuthStore();
|
|
|
- // }
|
|
|
resetAuthStore();
|
|
|
},
|
|
|
/** 初始化静态路由 */
|