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
eee02faf
Commit
eee02faf
authored
Sep 22, 2017
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加获取学院课程和小节信息的接口
parent
70365ef4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
1 deletion
+42
-1
xue_course_list.php
example/xue_course_list.php
+4
-1
Course.php
src/xue/Course.php
+38
-0
No files found.
example/xue_course_list.php
View file @
eee02faf
...
@@ -9,6 +9,9 @@ require __DIR__.'/_init.php';
...
@@ -9,6 +9,9 @@ require __DIR__.'/_init.php';
//$list = CourseList::getRecommendList();
//$list = CourseList::getRecommendList();
//$list = \internalApi\xue\Exam::getExam(4);
//$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
);
print_r
(
$list
);
\ No newline at end of file
src/xue/Course.php
0 → 100644
View file @
eee02faf
<?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
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