|
|
|
@ -1829,7 +1829,7 @@ class Special extends AuthController |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* NEW 课堂首页 |
|
|
|
|
* NEW 梦想课堂 |
|
|
|
|
*/ |
|
|
|
|
public function grade_index() |
|
|
|
|
{ |
|
|
|
@ -1839,8 +1839,7 @@ class Special extends AuthController |
|
|
|
|
$offlineCourse = (new \app\wap\model\special\OfflineCourse)->order('id desc')->limit(4)->select(); |
|
|
|
|
|
|
|
|
|
$uid = $this->uid; |
|
|
|
|
$is_member = isset($this->userInfo['level']) ? $this->userInfo['level'] : 0; |
|
|
|
|
$hot = SpecialModel::getSpecialList(['grade_id' => 0, 'subject_id' => 0, 'search' => '', 'page' => 1, 'limit' => 4, 'type' => 0, 'uid' => $uid, 'is_member' => $is_member, 'is_hot' => 1]); |
|
|
|
|
$hot = SpecialModel::getSpecialList(['grade_id' => 0, 'subject_id' => 0, 'search' => '', 'page' => 1, 'limit' => 4, 'type' => 0, 'uid' => $uid, 'is_hot' => 1]); |
|
|
|
|
|
|
|
|
|
return JsonService::successful('ok', [ |
|
|
|
|
'banner' => GroupDataService::getData('mxtk_banner') ?: [], |
|
|
|
@ -1851,6 +1850,23 @@ class Special extends AuthController |
|
|
|
|
]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* NEW 专题首页 |
|
|
|
|
*/ |
|
|
|
|
public function special_index($grade_id = 0, $subject_id = 0) |
|
|
|
|
{ |
|
|
|
|
$offlineCourse = (new \app\wap\model\special\OfflineCourse)->where(['subject_id' => $subject_id])->order('id desc')->limit(4)->select(); |
|
|
|
|
$hot = SpecialModel::getSpecialList(['grade_id' => $grade_id, 'subject_id' => $subject_id, 'page' => 1, 'limit' => 4, 'type' => 0, 'is_hot' => 1, 'is_member' => 0, 'search' => '']); |
|
|
|
|
|
|
|
|
|
$video = SpecialModel::getSpecialList(['grade_id' => $grade_id, 'subject_id' => $subject_id, 'page' => 1, 'limit' => 4, 'type' => 3, 'special_type' => 3, 'is_member' => 0, 'search' => '', 'uid'=>0]); |
|
|
|
|
return JsonService::successful('ok', [ |
|
|
|
|
'video_list' => $video, |
|
|
|
|
'hot_course' => $hot, |
|
|
|
|
'offline_courses' => $offlineCourse, |
|
|
|
|
]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 线下课详情 |
|
|
|
|
* @param $id |
|
|
|
@ -1908,12 +1924,13 @@ class Special extends AuthController |
|
|
|
|
* @param int $page |
|
|
|
|
* @param int $limit |
|
|
|
|
* @param int $type 学习记录获取专题使用 |
|
|
|
|
* @param int $special_type 专题类型 |
|
|
|
|
*/ |
|
|
|
|
public function get_special_list($grade_id = 0, $subject_id = 0, $search = '', $page = 1, $limit = 10, $type = 0) |
|
|
|
|
public function get_special_list($grade_id = 0, $subject_id = 0, $search = '', $page = 1, $limit = 10, $type = 0, $special_type = '') |
|
|
|
|
{ |
|
|
|
|
$uid = $this->uid; |
|
|
|
|
$is_member = isset($this->userInfo['level']) ? $this->userInfo['level'] : 0; |
|
|
|
|
return JsonService::successful(SpecialModel::getSpecialList(compact('grade_id', 'subject_id', 'search', 'page', 'limit', 'type', 'uid', 'is_member'))); |
|
|
|
|
return JsonService::successful(SpecialModel::getSpecialList(compact('grade_id', 'subject_id', 'search', 'page', 'limit', 'type', 'uid', 'is_member', 'special_type'))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|