From 320816304a09230263c05e8f9787898b2108ede6 Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Fri, 5 Feb 2021 18:07:12 +0800 Subject: [PATCH] add api --- src/js/api.js | 2 + src/pages/course/class_change/class_change.vue | 68 ++++++++++++++++++++++---- src/pages/course/student_list/student_list.vue | 15 ++++-- src/pages/course/task_finish/task_finish.vue | 12 +++-- src/pages/course/task_info/task_info.vue | 57 ++++++++++++++++----- 5 files changed, 127 insertions(+), 27 deletions(-) diff --git a/src/js/api.js b/src/js/api.js index 9778814..b921601 100644 --- a/src/js/api.js +++ b/src/js/api.js @@ -21,9 +21,11 @@ API['course'] = { getClassList: `${ORIGIN}/stadium/coach/getClassList`, // 小程序-班级列表 getCourseStudentList: `${ORIGIN}/stadium/coach/getCourseStudentList`, // 小程序-学员列表 SaveStudentComment: `${ORIGIN}/stadium/coach/SaveStudentComment`, // 小程序-学员点评保存 + shiftStudentClass: `${ORIGIN}/stadium/coach/shiftStudentClass`, // 小程序-学员调班 homeworkList: `${ORIGIN}/stadium/coach/homework/list`, // 小程序-作业列表 homeworkRecords: `${ORIGIN}/stadium/coach/homework/records`, // 小程序-作业完成列表 homeworkRemind: `${ORIGIN}/stadium/coach/homework/remind`, // 小程序-作业提醒 + homeworkRecordInfo: `${ORIGIN}/stadium/coach/homework/recordInfo`, // 小程序-作业完成详情 homeworkAdd: `${ORIGIN}/stadium/coach/homework/add`, // 小程序-布置作业 } diff --git a/src/pages/course/class_change/class_change.vue b/src/pages/course/class_change/class_change.vue index 0528907..c4bc228 100644 --- a/src/pages/course/class_change/class_change.vue +++ b/src/pages/course/class_change/class_change.vue @@ -1,28 +1,80 @@ @@ -40,7 +92,6 @@ export default { >image{ flex-grow: 0; flex-shrink: 0; - background-color: skyblue; } .cu-avatar{ margin-right: 32upx; @@ -84,7 +135,6 @@ export default { margin-left: 20upx; width: 28upx; height: 28upx; - background-color: skyblue; } } } diff --git a/src/pages/course/student_list/student_list.vue b/src/pages/course/student_list/student_list.vue index 8d774e4..f61ba87 100644 --- a/src/pages/course/student_list/student_list.vue +++ b/src/pages/course/student_list/student_list.vue @@ -69,12 +69,21 @@ export default { user_id: e.user_id, user_name: e.name, ...optionsQuery, - } + } util.routeTo(`/pages/course/student_review/student_review?query=${util.jsonStr(_query)}`, 'nT'); }, - toShift(){ + toShift(e){ let { optionsQuery } = this; - util.routeTo(`/pages/course/class_change/class_change`, 'nT'); + let _query = { + order_no: e.order_no, + user_id: e.user_id, + user_name: e.name, + user_gender: e.gender, + user_avatar: e.user_info.avatar_url, + ...optionsQuery, + } + console.warn(e); + util.routeTo(`/pages/course/class_change/class_change?query=${util.jsonStr(_query)}`, 'nT'); }, getStudentList({ course_id, diff --git a/src/pages/course/task_finish/task_finish.vue b/src/pages/course/task_finish/task_finish.vue index 22ad172..a49ab29 100644 --- a/src/pages/course/task_finish/task_finish.vue +++ b/src/pages/course/task_finish/task_finish.vue @@ -12,7 +12,7 @@ --> - + @@ -81,8 +81,14 @@ export default { }) }, 300, 300), - toTaskInfo(){ - util.routeTo(`/pages/course/task_info/task_info`, 'nT'); + toTaskInfo(e){ + let { optionsQuery } = this; + let _query = { + ...optionsQuery, + homework_record_id: e.record.id, + user_name: e.order.name + } + util.routeTo(`/pages/course/task_info/task_info?query=${util.jsonStr(_query)}`, 'nT'); }, getFinishList({ homework_id= '', diff --git a/src/pages/course/task_info/task_info.vue b/src/pages/course/task_info/task_info.vue index a3dea14..105dc92 100644 --- a/src/pages/course/task_info/task_info.vue +++ b/src/pages/course/task_info/task_info.vue @@ -1,11 +1,11 @@ @@ -145,7 +179,6 @@ export default { width: 200upx; height: 200upx; border-radius: 10upx; - background-color: skyblue; &:not(:nth-child(3n)){ margin-right: 44upx; }