From e645c2163e06dd119abaf4fdae7cf9bbb504caa0 Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Wed, 3 Mar 2021 18:06:16 +0800 Subject: [PATCH] add api --- src/js/api.js | 1 + src/pages/course/task/task.vue | 34 ++++--- src/pages/time/select/select.vue | 195 +++++++++++++++++++++++++++++++-------- 3 files changed, 179 insertions(+), 51 deletions(-) diff --git a/src/js/api.js b/src/js/api.js index 1f623c7..d962e9c 100644 --- a/src/js/api.js +++ b/src/js/api.js @@ -29,6 +29,7 @@ export const API = { // 我的时间 getCoachTimeList: `${ORIGIN}/stadium/coach/getCoachTimeList`, // 场地列表 + saveCoachTimeStatus: `${ORIGIN}/stadium/coach/saveCoachTimeStatus`, // 小程序-教练时间状态修改-我的时间 } diff --git a/src/pages/course/task/task.vue b/src/pages/course/task/task.vue index f67dd26..f090918 100644 --- a/src/pages/course/task/task.vue +++ b/src/pages/course/task/task.vue @@ -9,12 +9,12 @@ {{e.date || '-'}} 完成情况: {{e.complete_member || '0'}}/{{e.total_member || '0'}} - + {{e.description || '-'}} - 展开 - + {{e._isUnfold?'收起':'展开'}} + 完成列表 @@ -45,15 +45,20 @@ export default { }) }, + onLoad(options){ + let _query = util.jsonPar(options.query); + this.optionsQuery = _query; + this.getHomeworkList({ + course_id: _query.course_id, + user_id: _query.user_id, + class_id: _query.class_id, + }) + }, methods: { - onLoad(options){ - let _query = util.jsonPar(options.query); - this.optionsQuery = _query; - this.getHomeworkList({ - course_id: _query.course_id, - user_id: _query.user_id, - class_id: _query.class_id, - }) + unFoldChange(i){ + let _taskList = [...this.taskList]; + _taskList[i]._isUnfold = !_taskList[i]._isUnfold; + this.taskList = _taskList; }, toPublish(){ let { optionsQuery } = this; @@ -115,7 +120,7 @@ export default {