From 9bc5b3cf3774a591f40f59f773e9394ef4ef8417 Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Thu, 4 Feb 2021 18:02:58 +0800 Subject: [PATCH] add api --- src/App.vue | 22 ++-- src/js/api.js | 3 + src/pages/course/class_list/class_list.vue | 25 +---- src/pages/course/student_list/student_list.vue | 30 ++++-- src/pages/course/student_review/student_review.vue | 112 ++++++++++++++++++--- src/pages/course/task/task.vue | 11 +- src/pages/course/task_finish/task_finish.vue | 92 ++++++++++++++--- src/pages/course/task_publish/task_publish.vue | 3 +- 8 files changed, 221 insertions(+), 77 deletions(-) diff --git a/src/App.vue b/src/App.vue index 8284ccd..39bb662 100644 --- a/src/App.vue +++ b/src/App.vue @@ -54,17 +54,17 @@ color: #333; background-color: #fff; @include textHide(1); - &::after{ - content: ''; - margin-left: 24upx; - display: inline-block; - vertical-align: middle; - width: 0; - height: 0; - border-left: 16upx solid transparent; - border-right: 16upx solid transparent; - border-top: 16upx solid #333; - } + // &::after{ + // content: ''; + // margin-left: 24upx; + // display: inline-block; + // vertical-align: middle; + // width: 0; + // height: 0; + // border-left: 16upx solid transparent; + // border-right: 16upx solid transparent; + // border-top: 16upx solid #333; + // } } // 底部按钮 diff --git a/src/js/api.js b/src/js/api.js index 238d32c..9778814 100644 --- a/src/js/api.js +++ b/src/js/api.js @@ -12,6 +12,7 @@ export const API = { coach_feedback: `${ORIGIN}/upload/file/coach_feedback`, // 上传文件 - 教练反馈 task_publish: `${ORIGIN}/upload/file/task_publish`, // 上传文件 - 布置作业 + student_review: `${ORIGIN}/upload/file/student_review`, // 上传文件 - 学员点评 } @@ -21,6 +22,8 @@ API['course'] = { getCourseStudentList: `${ORIGIN}/stadium/coach/getCourseStudentList`, // 小程序-学员列表 SaveStudentComment: `${ORIGIN}/stadium/coach/SaveStudentComment`, // 小程序-学员点评保存 homeworkList: `${ORIGIN}/stadium/coach/homework/list`, // 小程序-作业列表 + homeworkRecords: `${ORIGIN}/stadium/coach/homework/records`, // 小程序-作业完成列表 + homeworkRemind: `${ORIGIN}/stadium/coach/homework/remind`, // 小程序-作业提醒 homeworkAdd: `${ORIGIN}/stadium/coach/homework/add`, // 小程序-布置作业 } diff --git a/src/pages/course/class_list/class_list.vue b/src/pages/course/class_list/class_list.vue index 07075c4..e84184d 100644 --- a/src/pages/course/class_list/class_list.vue +++ b/src/pages/course/class_list/class_list.vue @@ -1,7 +1,7 @@ @@ -106,7 +189,6 @@ export default { flex-shrink: 0; width: 28upx; height: 28upx; - background-color: skyblue; } } } @@ -158,7 +240,6 @@ export default { width: 200upx; height: 200upx; border-radius: 10upx; - background-color: greenyellow; overflow: hidden; &:not(:nth-child(3n)){ margin-right: 44upx; @@ -170,22 +251,21 @@ export default { z-index: 2; width: 40upx; height: 40upx; - background-color: skyblue; } .si-img{ width: 100%; height: 100%; - background-color: royalblue; } &.sp-add{ padding-top: 36upx; + border: 2upx solid #d8d8d8; >view{ &:first-child{ position: relative; margin: 0 auto 30upx; width: 60upx; height: 60upx; - background-color: springgreen; + &::before{ content: ''; position: absolute; diff --git a/src/pages/course/task/task.vue b/src/pages/course/task/task.vue index 5fc6996..8bc457d 100644 --- a/src/pages/course/task/task.vue +++ b/src/pages/course/task/task.vue @@ -16,7 +16,7 @@ 展开 - 完成列表 + 完成列表 布置作业 @@ -48,8 +48,13 @@ export default { util.routeTo(`/pages/course/task_publish/task_publish?query=${util.jsonStr(optionsQuery)}`, 'nT'); }, - toFinish(){ - util.routeTo(`/pages/course/task_finish/task_finish`, 'nT'); + toFinish(e){ + let { optionsQuery } = this; + let _query = { + homework_id: e.id, + ...optionsQuery, + }; + util.routeTo(`/pages/course/task_finish/task_finish?query=${util.jsonStr(_query)}`, 'nT'); }, getHomeworkList({ course_id= '', diff --git a/src/pages/course/task_finish/task_finish.vue b/src/pages/course/task_finish/task_finish.vue index 68cb395..22ad172 100644 --- a/src/pages/course/task_finish/task_finish.vue +++ b/src/pages/course/task_finish/task_finish.vue @@ -1,43 +1,111 @@