From 70148923861b541216a5c935b9fb2a1826062e3e Mon Sep 17 00:00:00 2001 From: lijiaqi <1205620597@qq.com> Date: Fri, 21 Jun 2024 15:00:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/course/basicCourseInformation.vue | 6 +++++- src/views/course/components/courseEdit.vue | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) 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) => {