From 2880679fef10a83dbbd41bf59d4e0cdf5e9807ee Mon Sep 17 00:00:00 2001 From: xy <2115269706@qq.com> Date: Wed, 19 Jun 2024 18:06:44 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/api/courseChaptersApi.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index a24f4fd..330efcc 100644 --- a/.env.development +++ b/.env.development @@ -1,4 +1,4 @@ # 变量必须以 VITE_ 为前缀才能暴露给外部读取 NODE_ENV = 'development' VITE_APP_TITLE = '无糖运营平台' -VITE_APP_BASE_API = 'http://39.106.16.162:8080' \ No newline at end of file +VITE_APP_BASE_API = 'http://127.0.0.1:8080' \ No newline at end of file diff --git a/src/api/courseChaptersApi.ts b/src/api/courseChaptersApi.ts index ae9997c..b6362f4 100644 --- a/src/api/courseChaptersApi.ts +++ b/src/api/courseChaptersApi.ts @@ -101,6 +101,6 @@ export const getCourseInfo = (params: any) => { return request({ url: '/objective_contents/' + params.id, method: "get", - params + // params }) } \ No newline at end of file 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 2/6] =?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) => {