From c7c79981b1deb9b7dfe61e5d7c6060fa39ee1b48 Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Fri, 6 Jun 2025 10:49:41 +0800 Subject: [PATCH] =?UTF-8?q?feat(student):=20=E6=B7=BB=E5=8A=A0=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E8=AF=BE=E7=A8=8B=E5=AE=89=E6=8E=92=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 apiRoute.js 中新增 xy_personCourseSchedule 方法获取学生课程安排列表 - 在学生首页中添加课程安排信息展示区域 - 实现获取学生课程安排数据并展示在首页的功能 - 优化课程安排信息的显示样式,包括日期、时间、地点和课程名称 --- api/apiRoute.js | 8 +++ pages/student/index/index.vue | 96 ++++++++++++++++++++++++----------- 2 files changed, 74 insertions(+), 30 deletions(-) diff --git a/api/apiRoute.js b/api/apiRoute.js index 8ed87fb..683688a 100644 --- a/api/apiRoute.js +++ b/api/apiRoute.js @@ -499,6 +499,14 @@ export default { }) }, + //学生端-学生课程安排-列表 + xy_personCourseSchedule(data = {}) { + let url = '/xy/personCourseSchedule' + return http.get(url, data).then(res => { + return res; + }) + }, + diff --git a/pages/student/index/index.vue b/pages/student/index/index.vue index 6e85635..063282f 100644 --- a/pages/student/index/index.vue +++ b/pages/student/index/index.vue @@ -49,17 +49,19 @@ 更多 - + 课程预告 - - - {{$util.formatToDateTime(memberIndexData.kcyg.date_time,'m-d')}} {{memberIndexData.kcyg.weekday}} {{memberIndexData.kcyg.time_slot[0]}}-{{memberIndexData.kcyg.time_slot[1]}} - {{memberIndexData.kcyg.address}} {{memberIndexData.kcyg.courses_name}} - - + + + + + {{$util.formatToDateTime(personCourseScheduleInfo.course_date,'m-d')}} {{personCourseScheduleInfo.time_slot}} + {{personCourseScheduleInfo.venue.venue_name}} {{personCourseScheduleInfo.course.course_name}}xxxx123123 + + + 详情 @@ -177,6 +179,10 @@ height:'0',//身高 weight:'0',//体重 },//体测报告详情 + + personCourseScheduleInfo:{ + id:'', + },//课程安排详情 } }, onLoad() { @@ -194,6 +200,7 @@ async init(){ await this.member_init() await this.getPhysicalTestList() + await this.getPersonCourseScheduleList() this.getMemberIndex() this.getList() this.getJobAssignmentsInfo() @@ -223,6 +230,30 @@ } }, + //学生端-学生课程安排-列表 + async getPersonCourseScheduleList(){ + let params = { + page: 1,//当前页码 + limit: 1,//每页返回数据条数 + total: 1,//数据总条数 + resources_id:this.member_info.id,//学生资源表id + } + let res = await apiRoute.xy_personCourseSchedule(params) + if(res.code != 1){ + uni.showToast({ + title: res.msg, + icon: 'none' + }) + } + + console.log('kc',res.data) + + let arr = res.data.data + if(arr.length){ + this.personCourseScheduleInfo = arr[0] + } + }, + async openViewHome_COPY(){ @@ -696,32 +727,37 @@ .upcomin-classes-div-con { display: flex; + justify-content: space-between; align-items: center; color: #fff; + padding: 0 40rpx; + .upcomin-classes-div-con-left { + width: 60rpx; + text-align: right; + } + .centre_box{ + display: flex; + align-items: center; + .upcomin-classes-div-con-centre { + margin: 0 20rpx; + width: 2rpx; + height: 60rpx; + background-color: #fff; + } + .centre{ + width:80%; + } + } + .upcomin-classes-div-con-right { + width: 100rpx; + height: 50rpx; + background-color: #32baa1; + text-align: center; + line-height: 50rpx; + border-radius: 50rpx; + } } - .upcomin-classes-div-con-left { - width: 60rpx; - margin-left: 80rpx; - text-align: right; - } - - .upcomin-classes-div-con-centre { - width: 2rpx; - height: 60rpx; - background-color: #fff; - margin-left: 25rpx; - } - - .upcomin-classes-div-con-right { - width: 100rpx; - height: 50rpx; - background-color: #32baa1; - text-align: center; - line-height: 50rpx; - border-radius: 50rpx; - margin-left: 80rpx; - } .after-class { background-color: #292929;