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