diff --git a/src/views/course/basicCourseInformation.vue b/src/views/course/basicCourseInformation.vue index 03aacbf..c9968f6 100644 --- a/src/views/course/basicCourseInformation.vue +++ b/src/views/course/basicCourseInformation.vue @@ -33,6 +33,7 @@ const total = ref(0) const params = ref({ pageNo: 1, pageSize: 7, + // username: 'qiuqiu', username: userStore.userName, assessmenttype: '', category: '', @@ -43,7 +44,10 @@ const loading = ref(false) // 获取课程列表 const getCourseList = async () => { loading.value = true - console.log(params.value, '11') + // console.log(params.value, '11') + if (userStore.userInfo.roleId === 2) { + params.value.pageSize = 8 + } const res = await getCourseListApi(params.value) courseList.value = res.data.list diff --git a/src/views/course/components/courseEdit.vue b/src/views/course/components/courseEdit.vue index f7e2c34..e192963 100644 --- a/src/views/course/components/courseEdit.vue +++ b/src/views/course/components/courseEdit.vue @@ -7,6 +7,9 @@ import { addCourseApi } from '../../../api/user/crouse' import { getCourseListApi, getCourseDetailApi } from '../../../api/user/crouse' import request from '../../../utils/request' import { tool, client } from '../../../utils/alioss.js' +import useUserStore from '@/store/modules/user' +// import { useRoute } from 'vue-router' +const userStore = useUserStore() // 绑定弹框 const visibleDrawer = ref(false) // 绑定图片 @@ -382,7 +385,7 @@ const upload = async (option: any) => {