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
03f2f8af
Commit
03f2f8af
authored
Feb 29, 2020
by
biao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
3b3b1bbd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
0 deletions
+97
-0
compass_db_schema.xlsx
doc/DB/compass_db_schema.xlsx
+0
-0
小程序文件命名以及接口调用说明.xlsx
doc/小程序文件命名以及接口调用说明.xlsx
+0
-0
ajax_get_circle_top_dat.php
src/user/if/ajax_get_circle_top_dat.php
+97
-0
No files found.
doc/DB/compass_db_schema.xlsx
View file @
03f2f8af
No preview for this file type
doc/小程序文件命名以及接口调用说明.xlsx
View file @
03f2f8af
No preview for this file type
src/user/if/ajax_get_circle_top_dat.php
0 → 100644
View file @
03f2f8af
<?php
// 获取圈子首页数据
require_once
(
"../user_include.inc"
);
ErrorLogger
::
doOutput
(
"Compass...ajax_get_circle_top_dat.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
();
$familyEventList
=
array
();
$socialEventList
=
array
();
$mediaList
=
array
();
//志愿者活动[当前所在区域的第一条志愿者活动]
$param
=
array
();
$param
[
'province'
]
=
$province
;
$param
[
'city'
]
=
$city
;
$param
[
'district'
]
=
$district
;
$param
[
'status'
]
=
"OK"
;
$param
[
'delete_flg'
]
=
false
;
//社会用户和机构用户的时候,添加【是否允许社会人士参加】
if
(
$userMst
->
role
==
5
||
$userMst
->
role
==
6
)
{
$param
[
'include_social_user'
]
=
true
;
}
$volunteerEventList
=
VolunteerEventDat
::
getList
(
$param
,
'id'
,
'desc'
,
0
,
1
);
//亲子活动
if
(
$userMst
->
role
==
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
);
}
//社会实践
if
(
$userMst
->
role
==
2
)
{
$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_circle_top_dat.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