diff --git a/src/components/TabBar.vue b/src/components/TabBar.vue index 9c8501e..7e32a3e 100644 --- a/src/components/TabBar.vue +++ b/src/components/TabBar.vue @@ -36,7 +36,7 @@ const nameLabelIconMap = { progress: { title: '进度管理', icon: 'transfer', - roles: ['teacher', 'sysadmin'] as const // 校方教师、公司课程顾问、公司系统管理员 + roles: ['teacher', 'sysadmin'] as const // 校方教师、公司系统管理员 // roles: ['teacher', 'admin', 'sysadmin'] as const // 校方教师、公司课程顾问、公司系统管理员 }, my: { diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 14dfdc1..41ba11b 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -3,7 +3,7 @@ import BussApi from '@/api/BussApi'; import pageWrapper from '@/components/page-wrapper.vue'; import { useUser } from '@/stores/useUser'; import type { LessonTask } from '@/types/api/lesson'; -import { calcLessonProgress, getLessonSteps } from '@/utils/lesson'; +import { calcLessonProgress, getLessonRole } from '@/utils/lesson'; import { onPageShow, onLoad, onPullDownRefresh } from '@dcloudio/uni-app'; import { useRouter } from 'uni-mini-router'; import { onMounted, ref, watch } from 'vue'; @@ -73,6 +73,7 @@ const openLessonDetail = (courseId: number) => { }) } + const loadLessons = async () => { if (!user.userinfo) { toast.error({ msg: '请先登录' }) @@ -156,7 +157,9 @@ const loadLessons = async () => { } watch(teacherFilterValue, () => { - loadLessons() + loadLessons().then(() => { + refreshKey.value++ + }) }) onPageShow(() => { @@ -207,7 +210,6 @@ onLoad(() => { - @@ -216,11 +218,14 @@ onLoad(() => {