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
b80888d6
Commit
b80888d6
authored
Feb 11, 2020
by
biao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a0d5cefb
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
39 additions
and
13 deletions
+39
-13
compass_db_schema.sql
doc/DB/compass_db_schema.sql
+2
-1
compass_db_schema.xlsx
doc/DB/compass_db_schema.xlsx
+0
-0
readme.txt
doc/readme.txt
+7
-0
小程序文件命名以及接口调用说明.xlsx
doc/小程序文件命名以及接口调用说明.xlsx
+0
-0
接口文档 V1.0.xls
doc/接口文档 V1.0.xls
+0
-0
CourseMst.inc
src/cn/compass/entity/CourseMst.inc
+6
-0
compass_include.inc
src/settings/compass_include.inc
+3
-0
ajax_get_course_by_category.php
src/user/if/ajax_get_course_by_category.php
+21
-12
No files found.
doc/DB/compass_db_schema.sql
View file @
b80888d6
...
@@ -421,6 +421,8 @@ DROP TABLE IF EXISTS course_mst;
...
@@ -421,6 +421,8 @@ DROP TABLE IF EXISTS course_mst;
CREATE
TABLE
IF
NOT
EXISTS
course_mst
(
CREATE
TABLE
IF
NOT
EXISTS
course_mst
(
id
bigint
unsigned
NOT
NULL
PRIMARY
KEY
auto_increment
,
id
bigint
unsigned
NOT
NULL
PRIMARY
KEY
auto_increment
,
registration_date
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
registration_date
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
parent_category_id
int8
NOT
NULL
,
sub_category_id
int8
NOT
NULL
,
title
varchar
(
128
)
NOT
NULL
,
title
varchar
(
128
)
NOT
NULL
,
front_image
varchar
(
64
)
NOT
NULL
,
front_image
varchar
(
64
)
NOT
NULL
,
teacher_profile
text
,
teacher_profile
text
,
...
@@ -428,7 +430,6 @@ CREATE TABLE IF NOT EXISTS course_mst(
...
@@ -428,7 +430,6 @@ CREATE TABLE IF NOT EXISTS course_mst(
)
ENGINE
=
INNODB
DEFAULT
CHARSET
=
utf8mb4
;
)
ENGINE
=
INNODB
DEFAULT
CHARSET
=
utf8mb4
;
##
----user_point_log create
##
----user_point_log create
DROP
TABLE
IF
EXISTS
user_point_log
;
DROP
TABLE
IF
EXISTS
user_point_log
;
...
...
doc/DB/compass_db_schema.xlsx
View file @
b80888d6
No preview for this file type
doc/readme.txt
View file @
b80888d6
开发服务器:
111.230.198.141
默认账户为 root ,初始密码:FS3y_e7pZYT?
目录:/var/www/html/compass
管理端:http://manager.koala-online.cn
数据库:http://manager.koala-online.cn/phpMyAdmin
管理端开发地址
管理端开发地址
http://compass.koala-online.cn/manager
http://compass.koala-online.cn/manager
...
...
doc/小程序文件命名以及接口调用说明.xlsx
View file @
b80888d6
No preview for this file type
doc/接口文档 V1.0.xls
View file @
b80888d6
No preview for this file type
src/cn/compass/entity/CourseMst.inc
View file @
b80888d6
...
@@ -8,6 +8,8 @@
...
@@ -8,6 +8,8 @@
*/
*/
class
CourseMst
extends
CompassDynamicData
class
CourseMst
extends
CompassDynamicData
{
{
var
$parent_category_id
;
var
$sub_category_id
;
var
$title
;
var
$title
;
var
$front_image
;
var
$front_image
;
var
$teacher_profile
;
var
$teacher_profile
;
...
@@ -23,6 +25,8 @@ class CourseMst extends CompassDynamicData
...
@@ -23,6 +25,8 @@ class CourseMst extends CompassDynamicData
{
{
parent
::
constructor
(
$record
);
parent
::
constructor
(
$record
);
$this
->
parent_category_id
=
$record
[
"parent_category_id"
];
$this
->
sub_category_id
=
$record
[
"sub_category_id"
];
$this
->
title
=
$record
[
"title"
];
$this
->
title
=
$record
[
"title"
];
$this
->
front_image
=
$record
[
"front_image"
];
$this
->
front_image
=
$record
[
"front_image"
];
$this
->
teacher_profile
=
$record
[
"teacher_profile"
];
$this
->
teacher_profile
=
$record
[
"teacher_profile"
];
...
@@ -90,6 +94,8 @@ class CourseMst extends CompassDynamicData
...
@@ -90,6 +94,8 @@ class CourseMst extends CompassDynamicData
{
{
$v_param
=
array
();
$v_param
=
array
();
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"parent_category_id"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"sub_category_id"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"title"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"title"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"front_image"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"front_image"
);
ParamUtil
::
copyObj2ArrayNullField
(
$v_param
,
$this
,
"teacher_profile"
);
ParamUtil
::
copyObj2ArrayNullField
(
$v_param
,
$this
,
"teacher_profile"
);
...
...
src/settings/compass_include.inc
View file @
b80888d6
...
@@ -36,6 +36,9 @@ require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/UserPointLog.inc");
...
@@ -36,6 +36,9 @@ require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/UserPointLog.inc");
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/UserSignDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/UserSignDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/SystemConstDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/SystemConstDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/CourseCategoryDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/CourseCategoryDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/CourseMst.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/CourseMediaDat.inc"
);
// definition
// definition
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/definition/ImageType.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/definition/ImageType.inc"
);
...
...
src/user/if/ajax_get_course_by_category.php
View file @
b80888d6
...
@@ -6,21 +6,30 @@ require_once ("../user_include.inc");
...
@@ -6,21 +6,30 @@ require_once ("../user_include.inc");
ErrorLogger
::
doOutput
(
"Compass...ajax_get_course_by_category.php....Start."
,
0
);
ErrorLogger
::
doOutput
(
"Compass...ajax_get_course_by_category.php....Start."
,
0
);
//获取参数
//获取参数
$parentId
=
ParamUtil
::
getRequestNumber
(
"parentId"
,
0
);
$subId
=
ParamUtil
::
getRequestNumber
(
"subId"
,
0
);
$page
=
ParamUtil
::
getRequestNumber
(
"page"
,
0
);
//
根据常量获取定义的值
//
每页显示条数
$
parentCategorys
=
CourseParentCategory
::
getList
()
;
$
rowCount
=
10
;
$result
=
array
();
$result
=
array
();
//获取对应的二级分类
foreach
(
$parentCategorys
as
$parentCategory
)
{
$offset
=
$page
*
$rowCount
;
//检索数据库
//检索数据库
$param
[
'parent_id'
]
=
$parentCategory
->
id
;
$param
=
array
();
$param
[
'delete_flg'
]
=
false
;
$param
[
'parent_category_id'
]
=
$parentId
;
$subCategoryList
=
CourseCategoryDat
::
getList
(
$param
,
'id'
,
'desc'
,
0
,
1
);
$param
[
'sub_category_id'
]
=
$subId
;
$parentCategory
->
subCategorys
=
$subCategoryList
;
$param
[
'delete_flg'
]
=
false
;
$result
[]
=
$parentCategory
;
$courseList
=
CourseMst
::
getList
(
$param
,
'id'
,
'desc'
,
$offset
,
$rowCount
);
}
$allCount
=
CourseMst
::
getListCount
(
$param
);
//接口返回数据
$result
[
"allCount"
]
=
$allCount
;
$result
[
"page"
]
=
$page
;
$result
[
"rowCount"
]
=
$rowCount
;
$result
[
"list"
]
=
$courseList
;
ErrorLogger
::
doOutput
(
"Compass...ajax_get_course_by_category.php....End."
,
0
);
ErrorLogger
::
doOutput
(
"Compass...ajax_get_course_by_category.php....End."
,
0
);
...
...
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