Commit eee02faf authored by 杨培's avatar 杨培

增加获取学院课程和小节信息的接口

parent 70365ef4
......@@ -9,6 +9,9 @@ require __DIR__.'/_init.php';
//$list = CourseList::getRecommendList();
//$list = \internalApi\xue\Exam::getExam(4);
$list = \internalApi\xue\Exam::getExams([4, 5, 6, 7]);
//$list = \internalApi\xue\Exam::getExams([4, 5, 6, 7]);
//$list = \internalApi\xue\Course::getCourseInfo(37);
$list = \internalApi\xue\Course::getSectionInfo(47);
print_r($list);
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/9/22
* Time: 12:52
*/
namespace internalApi\xue;
use internalApi\base\Client;
class Course extends Client
{
/**
* 获取课程信息
*
* @param int $courseId
* @return array|null
*/
public static function getCourseInfo($courseId)
{
return self::call('course.getCourseInfo', compact('courseId'));
}
/**
* 获取小节信息
*
* @param int $sectionId
* @return array|null
*/
public static function getSectionInfo($sectionId)
{
return self::call('course.getSectionInfo', compact('sectionId'));
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment