Commit bf9fbb40 authored by 菁菁's avatar 菁菁

课程api

parent eb7bdd66
<?php <?php
use internalApi\xue\CourseList; use internalApi\xue\Course;
require __DIR__.'/_init.php'; require __DIR__.'/_init.php';
//CourseList::setDebug(); Course::setDebug();
//$list = CourseList::getRecommendList(); //$list = CourseList::getRecommendList();
......
...@@ -14,7 +14,6 @@ return [ ...@@ -14,7 +14,6 @@ return [
], ],
'xue' => [ 'xue' => [
'apiUrl' => 'http://xue.yunya.com/api', 'apiUrl' => 'http://xue.yunya.com/api',
'remoteIp' => '127.0.0.1',
'clientId' => 'common', 'clientId' => 'common',
'clientSecret' => 'Z2oKgZYYc8mznesYMf1o' 'clientSecret' => 'Z2oKgZYYc8mznesYMf1o'
], ],
......
...@@ -81,4 +81,30 @@ class Course extends Client ...@@ -81,4 +81,30 @@ class Course extends Client
return self::call('course.sendCourse', compact('userId','courseId','orderId')); return self::call('course.sendCourse', compact('userId','courseId','orderId'));
} }
/**
* 获取课程章节基本信息
* @param int $sectionId
* @return mixed
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public static function getSectionBasicInfo($sectionId)
{
return self::call('course.getSectionBasicInfo' , compact('sectionId'));
}
/**
* 获取分类的课程
* @param $categoryId
* @param int $limit
* @param int $offset
* @return mixed
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public static function getAllCourseLists($categoryId, $limit = 10, $offset = 0)
{
return self::call('course.getAllCourseLists', compact('categoryId','limit','offset'));
}
} }
\ 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