自动跳转pc

This commit is contained in:
禺狨
2023-07-03 12:07:48 +08:00
parent 8dad348c20
commit 3098d99de4
3 changed files with 28 additions and 1 deletions

View File

@@ -32,7 +32,18 @@ if (getToken()) {
});
});
} else {
RootPage = <InitPage />;
RootPage = lazy(async () => {
return new Promise<any>(async (resolve) => {
try {
let configRes: any = await system.config();
resolve({
default: <InitPage configData={configRes.data} />,
});
} catch (e) {
console.error("系统初始化失败", e);
}
});
});
}
const routes: RouteObject[] = [