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
a1b7d04e
Commit
a1b7d04e
authored
Feb 22, 2020
by
biao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
118308e9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
110 additions
and
4 deletions
+110
-4
compass_db_schema.txt
doc/DB/compass_db_schema.txt
+2
-1
compass_db_schema.xlsx
doc/DB/compass_db_schema.xlsx
+0
-0
小程序文件命名以及接口调用说明.xlsx
doc/小程序文件命名以及接口调用说明.xlsx
+0
-0
接口文档 V1.0.xls
doc/接口文档 V1.0.xls
+0
-0
VolunteerEventDat.inc
src/cn/compass/entity/VolunteerEventDat.inc
+6
-3
compass_include.inc
src/settings/compass_include.inc
+2
-0
ajax_get_top_dat.php
src/user/if/ajax_get_top_dat.php
+100
-0
No files found.
doc/DB/compass_db_schema.txt
View file @
a1b7d04e
...
...
@@ -344,7 +344,8 @@ CREATE TABLE IF NOT EXISTS volunteer_event_dat(
position_latitude text NOT NULL,
author varchar(64) NOT NULL,
author_role int8 NOT NULL DEFAULT '0',
school_id int8 NOT NULL DEFAULT '0',
school_no varchar(64) NOT NULL DEFAULT '0',
original_source int8 NOT NULL DEFAULT '0',
province varchar(64),
city varchar(64),
district varchar(64),
...
...
doc/DB/compass_db_schema.xlsx
View file @
a1b7d04e
No preview for this file type
doc/小程序文件命名以及接口调用说明.xlsx
View file @
a1b7d04e
No preview for this file type
doc/接口文档 V1.0.xls
View file @
a1b7d04e
No preview for this file type
src/cn/compass/entity/VolunteerEventDat.inc
View file @
a1b7d04e
...
...
@@ -16,7 +16,8 @@ class VolunteerEventDat extends CompassDynamicData
var
$position_latitude
;
var
$author
;
var
$author_role
;
var
$school_id
;
var
$school_no
;
var
$original_source
;
var
$province
;
var
$city
;
var
$district
;
...
...
@@ -47,7 +48,8 @@ class VolunteerEventDat extends CompassDynamicData
$this
->
position_latitude
=
$record
[
"position_latitude"
];
$this
->
author
=
$record
[
"author"
];
$this
->
author_role
=
$record
[
"author_role"
];
$this
->
school_id
=
$record
[
"school_id"
];
$this
->
school_no
=
$record
[
"school_no"
];
$this
->
original_source
=
$record
[
"original_source"
];
$this
->
province
=
$record
[
"province"
];
$this
->
city
=
$record
[
"city"
];
$this
->
district
=
$record
[
"district"
];
...
...
@@ -130,7 +132,8 @@ class VolunteerEventDat extends CompassDynamicData
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"position_latitude"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"author"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"author_role"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"school_id"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"school_no"
);
ParamUtil
::
copyObj2Array
(
$v_param
,
$this
,
"original_source"
);
ParamUtil
::
copyObj2ArrayNullField
(
$v_param
,
$this
,
"province"
);
ParamUtil
::
copyObj2ArrayNullField
(
$v_param
,
$this
,
"city"
);
ParamUtil
::
copyObj2ArrayNullField
(
$v_param
,
$this
,
"district"
);
...
...
src/settings/compass_include.inc
View file @
a1b7d04e
...
...
@@ -39,6 +39,8 @@ require_once(COMPASS_LIB_ROOT . "/cn/compass/entity/CertificateMst.inc");
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/UserCertificateDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/UserMessageDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/GovernmentQrDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/VolunteerEventDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/VolunteerEventMemberDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/SocialEventDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/SocialEventMemberDat.inc"
);
require_once
(
COMPASS_LIB_ROOT
.
"/cn/compass/entity/FamilyEventDat.inc"
);
...
...
src/user/if/ajax_get_top_dat.php
0 → 100644
View file @
a1b7d04e
<?php
// 获取首页数据
require_once
(
"../user_include.inc"
);
ErrorLogger
::
doOutput
(
"Compass...ajax_get_user_role.php....Start."
,
0
);
//获取参数
$unionId
=
ParamUtil
::
getRequestString
(
"unionId"
);
$result
=
array
();
//参数检查
if
(
empty
(
$unionId
))
{
$result
[
"message"
]
=
"参数错误!"
;
responseNG
(
$result
);
}
//判断用户是否存在
$param
=
array
();
$param
[
'unionid'
]
=
$unionId
;
$param
[
'delete_flg'
]
=
false
;
$userList
=
UserMst
::
getList
(
$param
,
'id'
,
'desc'
,
0
,
1
);
if
(
empty
(
$userList
))
{
$result
[
"message"
]
=
"用户不存在!"
;
responseNG
(
$result
);
}
$userMst
=
$userList
[
0
];
//判断用户身份分别获取数据
$volunteerEventList
=
array
();
$socialEventList
=
array
();
$socialEventList
=
array
();
$mediaList
=
array
();
//[1:家园用户]
if
(
$userMst
->
role
==
1
)
{
//志愿者活动[查找本校发布的志愿者活动+面向所属区域学校发布的志愿者活动]
$param
=
array
();
$param
[
'school_no'
]
=
$userMst
->
school_no
;
$param
[
'original_source'
]
=
$userMst
->
school_no
;
$param
[
'delete_flg'
]
=
false
;
$volunteerEventList
=
VolunteerEventDat
::
getList
(
$param
,
'id'
,
'desc'
,
0
,
1
);
//社会实践【家园用户无社会实践】
//亲子活动
$param
=
array
();
$param
[
'school_no'
]
=
$userMst
->
school_no
;
$param
[
'original_source'
]
=
$userMst
->
school_no
;
$param
[
'delete_flg'
]
=
false
;
$familyEventList
=
FamilyEventDat
::
getList
(
$param
,
'id'
,
'desc'
,
0
,
1
);
}
//[2:家校用户]
if
(
$userMst
->
role
==
1
)
{
//志愿者活动
//社会实践
$param
=
array
();
$param
[
'school_no'
]
=
$userMst
->
school_no
;
$param
[
'original_source'
]
=
$userMst
->
school_no
;
$param
[
'delete_flg'
]
=
false
;
$socialEventList
=
SocialEventDat
::
getList
(
$param
,
'id'
,
'desc'
,
0
,
1
);
//亲子活动
//公益课堂
}
//公益课堂
$param
=
array
();
$param
[
'delete_flg'
]
=
false
;
$mediaList
=
CourseMediaDat
::
getList
(
$param
,
'id'
,
'desc'
,
0
,
3
);
//组装返回数据
$result
[
"volunteerEventList"
]
=
$volunteerEventList
;
$result
[
"familyEventList"
]
=
$familyEventList
;
$result
[
"socialEventList"
]
=
$socialEventList
;
$result
[
"mediaList"
]
=
$mediaList
;
ErrorLogger
::
doOutput
(
"Compass...ajax_get_user_role.php....End."
,
0
);
//返回结果
responseOK
(
$result
);
function
responseNG
(
$result
)
{
$result
=
array
(
"status"
=>
"NG"
,
"result"
=>
$result
);
print
json_encode
(
$result
);
exit
;
}
function
responseOK
(
$result
)
{
$result
=
array
(
"status"
=>
"OK"
,
"result"
=>
$result
);
print
json_encode
(
$result
);
exit
;
}
?>
\ 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