Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wxh_internal_api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
杨培培
wxh_internal_api
Commits
bf9fbb40
Commit
bf9fbb40
authored
Mar 26, 2019
by
菁菁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
课程api
parent
eb7bdd66
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
3 deletions
+28
-3
xue_course_list.php
example/xue_course_list.php
+2
-2
client_config_dev.php
src/client_config_dev.php
+0
-1
Course.php
src/xue/Course.php
+26
-0
No files found.
example/xue_course_list.php
View file @
bf9fbb40
<?php
use
internalApi\xue\Course
List
;
use
internalApi\xue\Course
;
require
__DIR__
.
'/_init.php'
;
//CourseList
::setDebug();
Course
::
setDebug
();
//$list = CourseList::getRecommendList();
...
...
src/client_config_dev.php
View file @
bf9fbb40
...
...
@@ -14,7 +14,6 @@ return [
],
'xue'
=>
[
'apiUrl'
=>
'http://xue.yunya.com/api'
,
'remoteIp'
=>
'127.0.0.1'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'Z2oKgZYYc8mznesYMf1o'
],
...
...
src/xue/Course.php
View file @
bf9fbb40
...
...
@@ -81,4 +81,30 @@ class Course extends Client
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment