mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-06-27 06:52:50 +08:00
首页标题加载优化
This commit is contained in:
parent
2bd10f5a6f
commit
5cea8d06fc
@ -25,6 +25,7 @@ const CoursePage = () => {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
Course.detail(Number(params.courseId))
|
Course.detail(Number(params.courseId))
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
|
document.title = res.data.course.title;
|
||||||
setCourse(res.data.course);
|
setCourse(res.data.course);
|
||||||
setChapters(res.data.chapters);
|
setChapters(res.data.chapters);
|
||||||
setHours(res.data.hours);
|
setHours(res.data.hours);
|
||||||
|
@ -31,6 +31,10 @@ const IndexPage = () => {
|
|||||||
getData();
|
getData();
|
||||||
}, [tabKey, currentDepId]);
|
}, [tabKey, currentDepId]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
document.title = systemConfig.systemName;
|
||||||
|
}, [systemConfig]);
|
||||||
|
|
||||||
const getData = () => {
|
const getData = () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
user.courses(currentDepId).then((res: any) => {
|
user.courses(currentDepId).then((res: any) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user