diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 6f59f3c..4ff1a32 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -103,9 +103,10 @@ const useUserStore = defineStore( if (result.code === 200) { const res = await userIdenService(result.data.id) // @ts-expect-error + console.log(res.data, 'res.data') this.userInfo = res.data - // console.log(this.userInfo, 'this.userInfo') + console.log(this.userInfo, 'this.userInfo') // @ts-expect-error this.data = result.data diff --git a/src/views/course/basicCourseInformation.vue b/src/views/course/basicCourseInformation.vue index f730006..fba21ab 100644 --- a/src/views/course/basicCourseInformation.vue +++ b/src/views/course/basicCourseInformation.vue @@ -20,14 +20,14 @@ const router = useRouter() // console.log(route) // import { client } from '@/utils/alioss.js' // 课程列表 -const courseList = ref([]) +const courseList = ref() // 教师列表 -const teacherList = ref([]) +const teacherList = ref() const getTeacherList = async () => { const res = await getTeacherListApi() - console.log(res) + console.log(res, 'teacher') teacherList.value = res.data - console.log(teacherList.value) + console.log(teacherList.value, 'teacherList.value') } const total = ref(0) const params = ref({ @@ -45,14 +45,14 @@ const loading = ref(false) const getCourseList = async () => { loading.value = true // console.log(params.value, '11') - if (userStore.userInfo.roleId === 2) { + if (userStore.userInfo.roleId[0] === 2) { params.value.pageSize = 8 } const res = await getCourseListApi(params.value) courseList.value = res.data.list total.value = res.data.total - console.log(res.data.list) + console.log(courseList.value, 'courseList.value') loading.value = false // console.log(userStore.userName, '1111') } @@ -171,7 +171,7 @@ const CloseCouresNameChangeEvent = () => {
- +