feat(首页): 学生上课时首页最上面就是这节课和「接着做」,课后先看上次没做完的;老师有了自己的首页,看今天哪些班在上课、点进课堂看板
Deploy / deploy (push) Canceled after 0s
Deploy / deploy (push) Canceled after 0s
去掉和顶栏重复的找题框、常年空着的比赛卡、底部快捷入口,公告只留置顶那条。 修了当天上午上课、下午再登录时写「上次(今天的日期)还有几道没过」。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c8c38553ec
commit
10d2638c23
4 files changed
+480
-191
No files matched your search
@@ -5,6 +5,8 @@ import { useUserStore } from "shared/store/user"
|
||||
|
||||
// 两边都按需加载:没登录的访客只拿题目列表那一份,登录了的学生只拿首页那一份
|
||||
const Dashboard = defineAsyncComponent(() => import("./dashboard.vue"))
|
||||
// 老师的首页单独一张(设计稿「首页重设计」HomeTeacher):今天哪些班在上课
|
||||
const TeacherHome = defineAsyncComponent(() => import("./TeacherHome.vue"))
|
||||
const ProblemList = defineAsyncComponent(() => import("oj/problem/list.vue"))
|
||||
|
||||
const userStore = useUserStore()
|
||||
@@ -17,6 +19,10 @@ const showDashboard = computed(() =>
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Dashboard v-if="showDashboard" />
|
||||
<template v-if="showDashboard">
|
||||
<!-- 资料回来之前分不出是不是老师,先空着,免得老师先闪一下学生的首页 -->
|
||||
<TeacherHome v-if="userStore.isFinished && userStore.isTeacherOrAbove" />
|
||||
<Dashboard v-else-if="userStore.isFinished" />
|
||||
</template>
|
||||
<ProblemList v-else />
|
||||
</template>
|
||||
Reference in new issue
Block a user