Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
Compass
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zong
Compass
Commits
20b009a0
Commit
20b009a0
authored
Feb 09, 2020
by
biao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
ff0da488
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
1 deletion
+77
-1
compass_db_schema.xlsx
doc/DB/compass_db_schema.xlsx
+0
-0
小程序文件命名以及接口调用说明.xlsx
doc/小程序文件命名以及接口调用说明.xlsx
+0
-0
环境准备.txt
doc/环境准备.txt
+3
-1
CourseParentCategory.inc
src/cn/compass/entity/definition/CourseParentCategory.inc
+74
-0
No files found.
doc/DB/compass_db_schema.xlsx
View file @
20b009a0
No preview for this file type
doc/小程序文件命名以及接口调用说明.xlsx
View file @
20b009a0
No preview for this file type
doc/环境准备.txt
View file @
20b009a0
1. 小程
序开发者账号
1. 小程
序开发者账号
...
...
@@ -3,3 +3,4 @@
3.腾讯lbs账号
4.阿里云oss key
5.小程序绑定对应公众号
6.
\ No newline at end of file
src/cn/compass/entity/definition/CourseParentCategory.inc
0 → 100644
View file @
20b009a0
<?php
/**
* 用户角色
* $Id$
* @author huangliang
* @package cn.compass.entity.definition
*/
class
CourseParentCategory
{
public
$id
;
public
$title
;
function
__construct
(
$record
)
{
$this
->
id
=
$record
[
"id"
];
$this
->
title
=
$record
[
"title"
];
}
/**
*
* @return array CourseParentCategory
*/
public
static
function
getList
()
{
static
$result
;
if
((
!
is_array
(
$result
))
||
(
count
(
$result
)
<
1
))
{
$data
=
array
();
$tmp
=
array
(
"id"
=>
1
,
"title"
=>
"科学课堂"
);
array_push
(
$data
,
$tmp
);
$tmp
=
array
(
"id"
=>
2
,
"title"
=>
"专题课堂"
);
array_push
(
$data
,
$tmp
);
$result
=
array
();
foreach
(
$data
as
$row
)
{
$tmp2
=
new
CourseParentCategory
(
$row
);
array_push
(
$result
,
$tmp2
);
}
}
return
$result
;
}
/**
*
* @return CourseParentCategory
*/
public
static
function
getById
(
$id
)
{
$list
=
CourseParentCategory
::
getList
();
foreach
(
$list
as
$tmp
)
{
if
(
$tmp
->
id
==
$id
)
{
return
$tmp
;
}
}
return
null
;
}
/**
*
* @return CourseParentCategory
*/
public
static
function
getTitleById
(
$id
)
{
$list
=
CourseParentCategory
::
getList
();
foreach
(
$list
as
$tmp
)
{
if
(
$tmp
->
id
==
$id
)
{
return
$tmp
->
title
;
}
}
return
null
;
}
}
\ 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