mirror of
https://github.com/PlayEdu/h5.git
synced 2025-07-23 20:11:07 +08:00
Compare commits
No commits in common. "8a3bbd565bf0593e3b4394fc16b116cbcc433d83" and "19df4739ad07e0f62c31b7a3d63eccb9974cd5c5" have entirely different histories.
8a3bbd565b
...
19df4739ad
@ -13,6 +13,11 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<script type="module" src="/src/main.tsx"></script>
|
<script type="module" src="/src/main.tsx"></script>
|
||||||
|
<script
|
||||||
|
crossorigin="anonymous"
|
||||||
|
integrity="sha512-oHrfR/z2wkuRuaHrdZ9NhoT/o/1kteub+QvmQgVzOKK7NTvIKQMvnY9+/RR0+eW311o4lAE/YzzLXXmP2XUvig=="
|
||||||
|
src="https://lib.baomitu.com/hls.js/1.1.4/hls.min.js"
|
||||||
|
></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
if (
|
if (
|
||||||
typeof WeixinJSBridge == "object" &&
|
typeof WeixinJSBridge == "object" &&
|
||||||
|
@ -32,13 +32,6 @@ code {
|
|||||||
float: left;
|
float: left;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.float-left {
|
|
||||||
width: 100%;
|
|
||||||
height: auto;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-header {
|
.main-header {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0px 20px 55px 20px;
|
padding: 96px 20px 55px 20px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import { Dropdown, PullToRefresh, Skeleton, Tabs } from "antd-mobile";
|
import { Dropdown, Skeleton, Tabs } from "antd-mobile";
|
||||||
import { sleep } from "antd-mobile/es/utils/sleep";
|
|
||||||
import { DropdownRef } from "antd-mobile/es/components/dropdown";
|
import { DropdownRef } from "antd-mobile/es/components/dropdown";
|
||||||
import { user } from "../../api/index";
|
import { user } from "../../api/index";
|
||||||
import styles from "./index.module.scss";
|
import styles from "./index.module.scss";
|
||||||
@ -72,15 +71,14 @@ const IndexPage = () => {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setLoading(true);
|
|
||||||
if (currentDepId === 0) {
|
if (currentDepId === 0) {
|
||||||
setLoading(false);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
getData();
|
getData();
|
||||||
}, [currentDepId, categoryId]);
|
}, [currentDepId, categoryId]);
|
||||||
|
|
||||||
const getData = () => {
|
const getData = () => {
|
||||||
|
setLoading(true);
|
||||||
user.courses(currentDepId, categoryId).then((res: any) => {
|
user.courses(currentDepId, categoryId).then((res: any) => {
|
||||||
const records = res.data.learn_course_records;
|
const records = res.data.learn_course_records;
|
||||||
setLearnCourseRecords(records);
|
setLearnCourseRecords(records);
|
||||||
@ -267,17 +265,6 @@ const IndexPage = () => {
|
|||||||
</Dropdown.Item>
|
</Dropdown.Item>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
className="float-left"
|
|
||||||
style={{ position: "relative", paddingTop: 96 }}
|
|
||||||
>
|
|
||||||
<PullToRefresh
|
|
||||||
onRefresh={async () => {
|
|
||||||
setLoading(true);
|
|
||||||
await sleep(700);
|
|
||||||
getData();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div className={styles["list-box"]}>
|
<div className={styles["list-box"]}>
|
||||||
{loading &&
|
{loading &&
|
||||||
Array.from({ length: 2 }).map((_, i) => (
|
Array.from({ length: 2 }).map((_, i) => (
|
||||||
@ -333,8 +320,6 @@ const IndexPage = () => {
|
|||||||
<Footer></Footer>
|
<Footer></Footer>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>{" "}
|
|
||||||
</PullToRefresh>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
.playedu-app {
|
|
||||||
width: 100vw;
|
|
||||||
height: 100vh;
|
|
||||||
overflow-y: auto;
|
|
||||||
overflow-x: hidden;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
@ -2,16 +2,15 @@ import { Suspense } from "react";
|
|||||||
import { Outlet } from "react-router-dom";
|
import { Outlet } from "react-router-dom";
|
||||||
import LoadingPage from "../../loading";
|
import LoadingPage from "../../loading";
|
||||||
import { TabBarFooter } from "../../../components";
|
import { TabBarFooter } from "../../../components";
|
||||||
import styles from "./index.module.scss";
|
|
||||||
|
|
||||||
const WithoutHeaderWithoutFooter = () => {
|
const WithoutHeaderWithoutFooter = () => {
|
||||||
return (
|
return (
|
||||||
<div className={styles["playedu-app"]}>
|
<>
|
||||||
<Suspense fallback={<LoadingPage />}>
|
<Suspense fallback={<LoadingPage />}>
|
||||||
<Outlet />
|
<Outlet />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
<TabBarFooter></TabBarFooter>
|
<TabBarFooter></TabBarFooter>
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import { PullToRefresh, Skeleton } from "antd-mobile";
|
import { Skeleton } from "antd-mobile";
|
||||||
import { sleep } from "antd-mobile/es/utils/sleep";
|
|
||||||
import styles from "./index.module.scss";
|
import styles from "./index.module.scss";
|
||||||
import { course } from "../../api/index";
|
import { course } from "../../api/index";
|
||||||
import { Empty } from "../../components";
|
import { Empty } from "../../components";
|
||||||
@ -18,11 +17,14 @@ const StudyPage = () => {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setLoading(true);
|
|
||||||
getCourses();
|
getCourses();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const getCourses = () => {
|
const getCourses = () => {
|
||||||
|
if (loading) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setLoading(true);
|
||||||
course
|
course
|
||||||
.latestLearn()
|
.latestLearn()
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
@ -59,14 +61,6 @@ const StudyPage = () => {
|
|||||||
return (
|
return (
|
||||||
<div className="main-body">
|
<div className="main-body">
|
||||||
<div className={styles["title"]}>最近学习</div>
|
<div className={styles["title"]}>最近学习</div>
|
||||||
<div className="float-left" style={{ position: "relative" }}>
|
|
||||||
<PullToRefresh
|
|
||||||
onRefresh={async () => {
|
|
||||||
setLoading(true);
|
|
||||||
await sleep(700);
|
|
||||||
getCourses();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div className={styles["list-box"]}>
|
<div className={styles["list-box"]}>
|
||||||
{loading &&
|
{loading &&
|
||||||
Array.from({ length: 2 }).map((_, i) => (
|
Array.from({ length: 2 }).map((_, i) => (
|
||||||
@ -149,8 +143,6 @@ const StudyPage = () => {
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</PullToRefresh>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user