diff --git a/src/views/growth/growthList.vue b/src/views/growth/growthList.vue index 64566ad..7fdc852 100644 --- a/src/views/growth/growthList.vue +++ b/src/views/growth/growthList.vue @@ -338,86 +338,55 @@ -
-
- 开课列表 -
-
- X -
-
-
-
+ +
- {{ item.name }} -
-
- 去上课 +
+ {{ item.name }} +
+
+ 去上课 +
-
+ @@ -605,10 +574,6 @@ async function toFinish(d) { ElMessage.warning(`请先完成“${d.superTaskName}”的学习任务`); return; } - if (!d.canLearn && d.courseType != 2) { - ElMessage.warning(`学习任务暂未开始`); - return; - } //更新学员当前任务 await growthRequest(PROFESSIONAL_STUDENT_LEARN, { diff --git a/src/views/growth/growthRoadmap.vue b/src/views/growth/growthRoadmap.vue index 106259e..17483ec 100644 --- a/src/views/growth/growthRoadmap.vue +++ b/src/views/growth/growthRoadmap.vue @@ -231,86 +231,55 @@ -
-
- 开课列表 -
-
- X -
-
-
-
+ +
- {{ item }} -
-
- 去上课 +
+ {{ item.name }} +
+
+ 去上课 +
-
+
@@ -463,7 +432,6 @@ watch( ); const openCourseVisible = ref(false); const openCourseList = ref([]); -const openCourseIdList = ref([]); const dialogVisible = ref(false); const dialogVisibleTip = ref("该任务无法学习,请联系管理员进行替换!"); @@ -477,7 +445,7 @@ async function toFinish(d) { ElMessage.warning(`请先完成“${d.superTaskName}”的学习任务`); return; } - if (!d.canLearn && d.courseType != 2) { + if (!d.canLearn && d.completionStatus === '0') { ElMessage.warning(`学习任务暂未开始`); return; } @@ -492,8 +460,7 @@ async function toFinish(d) { return ElMessage.error("还未添加开课,请联系管理员!"); } if (d.targetId.split(",").length > 1) { - openCourseList.value = d.targetName?.split(","); - openCourseIdList.value = d.targetId?.split(","); + openCourseList.value = d.offcoursePlanList; openCourseVisible.value = true; return; } @@ -710,11 +677,17 @@ async function toFinish(d) { } } -function toOffcoursePlanPage(id) { +function toOffcoursePlanPage(item) { + let date1 = new Date(item.endTime).getTime(); + let date2 = new Date().getTime(); + if (date1 < date2) { + ElMessage.warning(`当前开课已结束`); + return; + } window.open( `${location.protocol}//${location.host}${ import.meta.env.VITE_BASE_API - }/stu/project/redirectDetail?courseId=${id}`, + }/stu/project/redirectDetail?courseId=${item.id}`, "_top" ); } diff --git a/vite.config.js b/vite.config.js index f6e1dbc..5e1dc01 100644 --- a/vite.config.js +++ b/vite.config.js @@ -38,16 +38,16 @@ export default defineConfig(({ command, mode }) => }, server: { proxy: { - "/professional": { - // target: 'http://192.168.16.195:32002', - // target: 'http://192.168.150.97:32002', - target: 'http://192.168.38.211:32002', - changeOrigin: true, - }, - // '/growth': { - // target: 'https://u-pre.boe.com', + // "/professional": { + // // target: 'http://192.168.16.195:32002', + // // target: 'http://192.168.150.97:32002', + // target: 'http://192.168.38.211:32002', // changeOrigin: true, - // }, + // }, + '/growth': { + target: 'https://u-pre.boe.com', + changeOrigin: true, + }, '/file/upload': { target: loadEnv(mode, process.cwd()).VITE_PROXY_URL, changeOrigin: true,