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
e78ec180
Commit
e78ec180
authored
Mar 15, 2020
by
biao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
fec08629
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
121 additions
and
96 deletions
+121
-96
ajax_get_circle_event_list.php
src/user/if/ajax_get_circle_event_list.php
+24
-5
circleDetails.js
src/wx/pages/circleDetails/circleDetails.js
+3
-2
circleEvents.js
src/wx/pages/circleEvents/circleEvents.js
+62
-25
circleEvents.json
src/wx/pages/circleEvents/circleEvents.json
+3
-1
circleEvents.wxml
src/wx/pages/circleEvents/circleEvents.wxml
+16
-59
circleEvents.wxss
src/wx/pages/circleEvents/circleEvents.wxss
+12
-2
volunteers.wxml
src/wx/pages/volunteers/volunteers.wxml
+1
-1
volunteersEventDetail.wxss
...wx/pages/volunteersEventDetail/volunteersEventDetail.wxss
+0
-1
No files found.
src/user/if/ajax_get_circle_event_list.php
View file @
e78ec180
...
...
@@ -8,6 +8,7 @@ ErrorLogger::doOutput("Compass...ajax_get_circle_event_list.php....Start.", 0);
//获取参数
$unionId
=
ParamUtil
::
getRequestString
(
"unionId"
);
$circleId
=
ParamUtil
::
getRequestNumber
(
"circleId"
,
0
);
//圈子id
$page
=
ParamUtil
::
getRequestNumber
(
"page"
,
0
);
//圈子id
$result
=
array
();
...
...
@@ -17,8 +18,6 @@ if(empty($unionId) || empty($circleId)) {
responseNG
(
$result
);
}
$result
=
array
();
//判断用户是否存在
$param
=
array
();
$param
[
'unionid'
]
=
$unionId
;
...
...
@@ -37,6 +36,12 @@ if(empty($circleDat)) {
responseNG
(
$result
);
}
//每页显示条数
$rowCount
=
10
;
$offset
=
$page
*
$rowCount
;
$result
=
array
();
//是否为圈主
$isOwner
=
false
;
if
(
$circleDat
->
owner_id
==
$userMst
->
id
)
{
...
...
@@ -44,6 +49,7 @@ if($circleDat->owner_id == $userMst->id) {
}
//查询发布的志愿者活动
$volunteerEventList
=
array
();
$param
=
array
();
$param
[
'circle_id'
]
=
$circleDat
->
id
;
//圈主可以查看所有活动,成员只能查看审核成功的活动
...
...
@@ -52,15 +58,28 @@ if(!$isOwner) {
$param
[
'status_NOT'
]
=
"NG"
;
}
$param
[
'delete_flg'
]
=
false
;
$volunteerEventList
=
VolunteerEventDat
::
getList
(
$param
,
"id"
,
"desc"
);
if
(
!
empty
(
$tmpList
))
{
$noticeDat
=
$tmpList
[
0
];
$tmpVolunteerEventList
=
VolunteerEventDat
::
getList
(
$param
,
"id"
,
"desc"
,
$offset
,
$rowCount
);
$volunteerEvenCount
=
VolunteerEventDat
::
getListCount
(
$param
);
$pageCount
=
ceil
(
$volunteerEvenCount
/
$rowCount
);
if
(
!
empty
(
$tmpVolunteerEventList
))
{
//设置状态和招募范围
foreach
(
$tmpVolunteerEventList
as
$tmp
)
{
$tmp
->
status_title
=
"征集中"
;
$tmp
->
scope
=
"校内"
;
if
(
$tmp
->
include_social_user
)
{
$tmp
->
scope
=
"校内.社会人士"
;
}
$volunteerEventList
[]
=
$tmp
;
}
}
ErrorLogger
::
doOutput
(
"Compass...ajax_get_circle_event_list.php....End."
,
0
);
//返回结果
$result
[
"isOwner"
]
=
$isOwner
;
$result
[
"rowCount"
]
=
$rowCount
;
$result
[
"page"
]
=
$page
;
$result
[
"pageCount"
]
=
$pageCount
;
$result
[
"volunteerEventList"
]
=
$volunteerEventList
;
responseOK
(
$result
);
...
...
src/wx/pages/circleDetails/circleDetails.js
View file @
e78ec180
...
...
@@ -99,14 +99,14 @@ Page({
//发布活动
newCircleEvent
(){
wx
.
navigateTo
({
url
:
'../newCircleEvent/newCircleEvent'
+
this
.
data
.
circleId
,
url
:
'../newCircleEvent/newCircleEvent
?circleId=
'
+
this
.
data
.
circleId
,
})
},
//活动管理
circleEvents
(){
wx
.
navigateTo
({
url
:
'../circleEvents/circleEvents'
+
this
.
data
.
circleId
,
url
:
'../circleEvents/circleEvents
?circleId=
'
+
this
.
data
.
circleId
,
})
}
})
\ No newline at end of file
src/wx/pages/circleEvents/circleEvents.js
View file @
e78ec180
...
...
@@ -6,37 +6,23 @@ Page({
* 页面的初始数据
*/
data
:
{
circleId
:
0
,
isOwner
:
false
,
page
:
0
,
//当前页数
pageCount
:
0
,
//总页数
volunteerEventList
:
[],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
var
that
=
this
;
var
config
=
wx
.
getStorageSync
(
'config'
);
var
jingweidu
=
wx
.
getStorageSync
(
'jingweidu'
);
wx
:
wx
.
request
({
url
:
app
.
url
+
'ajax_get_circle_event_list.php'
,
data
:
{
unionId
:
config
.
unionId
,
circleId
:
7
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
)
{
if
(
res
.
data
.
result
.
isOwner
==
true
)
{
}
}
},
fail
:
function
(
res
)
{
},
complete
:
function
(
res
)
{
},
this
.
setData
({
circleId
:
options
.
circleId
})
this
.
getEventList
();
},
/**
...
...
@@ -78,7 +64,20 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
if
(
this
.
data
.
page
<
this
.
data
.
pageCount
)
{
var
pageIndex
=
this
.
data
.
page
+
1
this
.
setData
({
page
:
pageIndex
})
this
.
getEventList
()
}
else
{
wx
.
showToast
({
title
:
'没有更多内容啦。'
,
icon
:
'success'
,
duration
:
2000
});
}
},
/**
...
...
@@ -86,5 +85,42 @@ Page({
*/
onShareAppMessage
:
function
()
{
}
},
//获取活动列表
getEventList
()
{
var
that
=
this
;
var
config
=
wx
.
getStorageSync
(
'config'
);
wx
.
request
({
url
:
app
.
url
+
'ajax_get_circle_event_list.php'
,
data
:
{
unionId
:
config
.
unionId
,
circleId
:
that
.
data
.
circleId
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
)
{
that
.
setData
({
page
:
res
.
data
.
result
.
page
,
pageCount
:
res
.
data
.
result
.
pageCount
,
volunteerEventList
:
res
.
data
.
result
.
volunteerEventList
,
isOwner
:
res
.
data
.
result
.
isOwner
})
}
},
fail
:
function
(
res
)
{
},
complete
:
function
(
res
)
{
},
})
},
//志愿者活动详情页面
volunteersEventDetail
(
e
)
{
let
eventId
=
e
.
currentTarget
.
dataset
[
'id'
];
wx
.
navigateTo
({
url
:
'../volunteersEventDetail/volunteersEventDetail?eventId='
+
eventId
,
})
},
})
\ No newline at end of file
src/wx/pages/circleEvents/circleEvents.json
View file @
e78ec180
{
"usingComponents"
:
{}
"usingComponents"
:
{},
"navigationBarTitleText"
:
"圈子活动管理"
}
\ No newline at end of file
src/wx/pages/circleEvents/circleEvents.wxml
View file @
e78ec180
<!--pages/circleEvents/circleEvents.wxml-->
<view class='activeManagement'>
<view class='listVolunteers'>
<view>
<view class='left_listVolunteers'>
<image src='../../img/3.jpg'></image>
<text>征集中</text>
<view>(市)</view>
</view>
<view class='right_listVolunteers'>
<text>周末图书馆清洁活动</text>
<view>
<text>征集范围:校内\n</text>
<text>征集人数:10人\n</text>
<text>发布单位:南京市教育局\n</text>
<text>报名截止:2019.10.10</text>
</view>
<view class='cicle'>
<view class='circleEventTitleArea'>
<view style='font-size:14px;padding-left:15px'>
<image src='../../img/sanjiao.png'></image>志愿者活动
</view>
</view>
<view>
<view class='left_listVolunteers'>
<image src='../../img/3.jpg'></image>
<text>征集中</text>
<view>(校)</view>
</view>
<view class='right_listVolunteers'>
<text>敬老院探望老人活动</text>
<view>
<text>征集范围:校内\n</text>
<text>征集人数:15人\n</text>
<text>发布单位:南京市教育局\n</text>
<text>报名截止:2019.11.10</text>
</view>
</view>
<view class='activelist' bindtap='volunteersEventDetail' wx:for="{{volunteerEventList}}" wx:key="{{volunteerEventList[index].id}}" data-id='{{item.id}}'>
<view class='left_listVolunteers'>
<image src='{{item.front_image}}'></image>
<text>{{item.status_title}}</text>
<!--<view>(市)</view>-->
</view>
<view>
<view class='left_listVolunteers'>
<image src='../../img/3.jpg'></image>
<text>征集中</text>
<view>(市)</view>
</view>
<view class='right_listVolunteers'>
<text>周末图书馆清洁活动</text>
<view>
<text>征集范围:校内\n</text>
<text>征集人数:10人\n</text>
<text>发布单位:南京市教育局\n</text>
<text>报名截止:2019.10.10</text>
</view>
<view class='right_listVolunteers'>
<text>{{item.title}}</text>
<view>
<text>征集范围:{{item.scope}}\n</text>
<text>征集人数:{{item.max_member}}人\n</text>
<text>发布单位:{{item.author}}\n</text>
<text>报名截止:{{item.enroll_time}}</text>
</view>
</view>
<view>
<view class='left_listVolunteers'>
<image src='../../img/3.jpg'></image>
<text>已结束</text>
<view>(社)</view>
</view>
<view class='right_listVolunteers'>
<text>敬老院探望老人活动</text>
<view>
<text>征集范围:校内\n</text>
<text>征集人数:15人\n</text>
<text>发布单位:南京市教育局\n</text>
<text>报名截止:2019.11.10</text>
</view>
</view>
</view>
</view>
</view>
src/wx/pages/circleEvents/circleEvents.wxss
View file @
e78ec180
/* pages/circleEvents/circleEvents.wxss */
\ No newline at end of file
/* pages/circleEvents/circleEvents.wxss */
.circleEventTitleArea{
display: flex;
align-items: center;
width:94%;
height:50px;
}
.circleEventTitleArea>view>image{
width: 10px;
height: 10px;
}
\ No newline at end of file
src/wx/pages/volunteers/volunteers.wxml
View file @
e78ec180
...
...
@@ -11,7 +11,7 @@
</view>
<view class='listVolunteers'>
<scroll-view scroll-y="true" style='height:1000rpx;bottom:10rpx;' class="listPublicWelfare" bindscrolltolower='loadMore'>
<view class='activelist' bindtap='volunteersEventDetail' wx:for="{{volunteerEventList}}"
wx:key="{{volunteerEventList[index].id}}"
data-id='{{item.id}}'>
<view class='activelist' bindtap='volunteersEventDetail' wx:for="{{volunteerEventList}}" data-id='{{item.id}}'>
<view class='left_listVolunteers'>
<image src='{{item.front_image}}'></image>
<text>{{item.status_title}}</text>
...
...
src/wx/pages/volunteersEventDetail/volunteersEventDetail.wxss
View file @
e78ec180
/* pages/activeDetails/activeDetails.wxss */
.activeDetails>image{
width: 100%;
height: 100px;
}
.con_activeDetails{
width: 80%;
...
...
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