mirror of
https://github.com/PlayEdu/h5.git
synced 2025-02-05 21:47:19 +08:00
页面缓加载
This commit is contained in:
parent
37b034c555
commit
200f489359
@ -56,6 +56,7 @@ export class HttpClient {
|
||||
GoLogin();
|
||||
} else if (status === 404) {
|
||||
// 跳转到404页面
|
||||
GoLogin();
|
||||
} else if (status === 403) {
|
||||
// 跳转到无权限页面
|
||||
} else if (status === 500) {
|
||||
|
@ -1,17 +1,26 @@
|
||||
import { lazy } from "react";
|
||||
import { RouteObject } from "react-router-dom";
|
||||
import { system, user } from "../api";
|
||||
|
||||
import { getToken } from "../utils";
|
||||
// 页面加载
|
||||
import { InitPage } from "../pages/init";
|
||||
import IndexPage from "../pages/index/index";
|
||||
import LoginPage from "../pages/login";
|
||||
import MemberPage from "../pages/member/index";
|
||||
import ChangePasswordPage from "../pages/change-password/index";
|
||||
import ChangeDepartmentPage from "../pages/change-department/index";
|
||||
import StudyPage from "../pages/study/index";
|
||||
import CoursePage from "../pages/course/index";
|
||||
import CoursePlayPage from "../pages/course/video";
|
||||
//用户中心页面
|
||||
const MemberPage = lazy(() => import("../pages/member/index"));
|
||||
//主页
|
||||
const IndexPage = lazy(() => import("../pages/index/index"));
|
||||
//修改密码页面
|
||||
const ChangePasswordPage = lazy(() => import("../pages/change-password/index"));
|
||||
//修改部门页面
|
||||
const ChangeDepartmentPage = lazy(
|
||||
() => import("../pages/change-department/index")
|
||||
);
|
||||
//学习页面
|
||||
const StudyPage = lazy(() => import("../pages/study/index"));
|
||||
//课程页面
|
||||
const CoursePage = lazy(() => import("../pages/course/index"));
|
||||
const CoursePlayPage = lazy(() => import("../pages/course/video"));
|
||||
|
||||
import PrivateRoute from "../components/private-route";
|
||||
|
||||
let RootPage: any = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user