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