@@ -36,5 +36,23 @@ class Education
}
+ /**
+ * 获取轮播列表
+ * @return mixed
+ */
+ public function recommend()
+ {
+ $EducationModel = new \app\model\api\Education();
+ $where = [
+ 'audit' => 1,
+ 'recommend' => 1,
+ ];
+ $recommendList = $EducationModel->getEducationGrList($where, 9, "od asc,recommend desc,gr_id desc");
+ $result = ['recommendList' => $recommendList];
+
+ return app('json')->success($result);
+ }
@@ -16,6 +16,8 @@ use think\facade\Route;
Route::group('Education', function () {
//课程列表页面
Route::rule('index','Education/index');
+ //获取轮播列表
+ Route::rule('recommend','Education/recommend');