|
@@ -61,6 +61,18 @@ class Lesson extends Api
|
|
|
$startday = '01';
|
|
|
}
|
|
|
|
|
|
+ //所有课程点进来的 额外传参
|
|
|
+ $lesson_id = input('lesson_id',0);
|
|
|
+ if($lesson_id){
|
|
|
+ $first_starttime = Db::name('lesson_slot')->where('lesson_id',$lesson_id)->where('status',0)->where('starttime','gt',time())->where('is_show',1)->order('starttime asc')->value('starttime');
|
|
|
+ // $first_startdate = date('Y-m-d H:i:s',$first_starttime);dump($first_startdate);exit;
|
|
|
+ if($first_starttime){
|
|
|
+ $year = date('Y',$first_starttime);
|
|
|
+ $month = date('m',$first_starttime);
|
|
|
+ $startday = date('d',$first_starttime);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//本月结束日
|
|
|
$endday_arr = [
|
|
|
'01' => 31,
|
|
@@ -156,6 +168,12 @@ class Lesson extends Api
|
|
|
if($coach_id){
|
|
|
$list->where('find_in_set(:coach_ids,coach_ids)', ['coach_ids' => $coach_id]);
|
|
|
}
|
|
|
+ //所有课程点进来的 额外传参
|
|
|
+ $lesson_id = input('lesson_id',0);
|
|
|
+ if($lesson_id){
|
|
|
+ $list->where('slot.lesson_id',$lesson_id);
|
|
|
+ }
|
|
|
+
|
|
|
$list = $list->order('slot.starttime asc')->select();
|
|
|
if(empty($list)){
|
|
|
$this->success(1,[]);
|