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
95d72f74
Commit
95d72f74
authored
Mar 11, 2020
by
biao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
5f165f64
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
169 additions
and
33 deletions
+169
-33
compass_db_schema.txt
doc/DB/compass_db_schema.txt
+1
-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
ajax_attend_volunteer_event_circle.php
src/user/if/ajax_attend_volunteer_event_circle.php
+6
-6
ajax_attend_volunteer_event_personal.php
src/user/if/ajax_attend_volunteer_event_personal.php
+2
-2
ajax_get_volunteer_event_detail.php
src/user/if/ajax_get_volunteer_event_detail.php
+2
-2
volunteersEventDetail.js
src/wx/pages/volunteersEventDetail/volunteersEventDetail.js
+156
-20
volunteersEventDetail.wxml
...wx/pages/volunteersEventDetail/volunteersEventDetail.wxml
+1
-1
volunteersEventDetail.wxss
...wx/pages/volunteersEventDetail/volunteersEventDetail.wxss
+1
-1
No files found.
doc/DB/compass_db_schema.txt
View file @
95d72f74
...
@@ -370,7 +370,7 @@ CREATE TABLE IF NOT EXISTS volunteer_event_member_dat(
...
@@ -370,7 +370,7 @@ CREATE TABLE IF NOT EXISTS volunteer_event_member_dat(
position_longitude text,
position_longitude text,
position_latitude text,
position_latitude text,
role int8 NOT NULL DEFAULT '0',
role int8 NOT NULL DEFAULT '0',
time_length float(6,2) NOT NULL DEFAULT '0',
time_length float(6,2) NOT NULL DEFAULT '0
.00
',
finish_time timestamp,
finish_time timestamp,
status varchar(64) NOT NULL DEFAULT 'NEW',
status varchar(64) NOT NULL DEFAULT 'NEW',
delete_flg tinyint(1) NOT NULL DEFAULT '0'
delete_flg tinyint(1) NOT NULL DEFAULT '0'
...
...
doc/DB/compass_db_schema.xlsx
View file @
95d72f74
No preview for this file type
doc/小程序文件命名以及接口调用说明.xlsx
View file @
95d72f74
No preview for this file type
doc/接口文档 V1.0.xls
View file @
95d72f74
No preview for this file type
src/user/if/ajax_attend_volunteer_event_circle.php
View file @
95d72f74
...
@@ -12,7 +12,7 @@ $eventId = ParamUtil::getRequestNumber("eventId", 0);
...
@@ -12,7 +12,7 @@ $eventId = ParamUtil::getRequestNumber("eventId", 0);
$result
=
array
();
$result
=
array
();
//参数检查
//参数检查
if
(
empty
(
$unionId
))
{
if
(
empty
(
$unionId
)
||
empty
(
$eventId
)
)
{
$result
[
"message"
]
=
"参数错误!"
;
$result
[
"message"
]
=
"参数错误!"
;
responseNG
(
$result
);
responseNG
(
$result
);
}
}
...
@@ -38,7 +38,7 @@ $userMst = $userList[0];
...
@@ -38,7 +38,7 @@ $userMst = $userList[0];
//是否已经报名
//是否已经报名
$param
=
array
();
$param
=
array
();
$param
[
'volunteer_event_id'
]
=
$
userMst
->
i
d
;
$param
[
'volunteer_event_id'
]
=
$
eventI
d
;
$param
[
'user_id'
]
=
$userMst
->
id
;
$param
[
'user_id'
]
=
$userMst
->
id
;
$param
[
'delete_flg'
]
=
false
;
$param
[
'delete_flg'
]
=
false
;
$tmpList
=
VolunteerEventMemberDat
::
getList
(
$param
,
"id"
,
"desc"
,
0
,
1
);
$tmpList
=
VolunteerEventMemberDat
::
getList
(
$param
,
"id"
,
"desc"
,
0
,
1
);
...
@@ -80,18 +80,18 @@ $param = array();
...
@@ -80,18 +80,18 @@ $param = array();
$param
[
'circle_id'
]
=
$circleDat
->
id
;
$param
[
'circle_id'
]
=
$circleDat
->
id
;
$param
[
'user_id_NOT'
]
=
$userMst
->
id
;
//不包含自己
$param
[
'user_id_NOT'
]
=
$userMst
->
id
;
//不包含自己
$param
[
'delete_flg'
]
=
false
;
$param
[
'delete_flg'
]
=
false
;
$tmpCircleMemberList
=
CircleMemberDat
::
getList
Count
(
$param
);
$tmpCircleMemberList
=
CircleMemberDat
::
getList
(
$param
);
if
(
!
empty
(
$tmpCircleMemberList
))
{
if
(
!
empty
(
$tmpCircleMemberList
))
{
foreach
(
tmpCircleMemberList
as
$tmpCircleMember
)
{
foreach
(
$
tmpCircleMemberList
as
$tmpCircleMember
)
{
$userMessageDat
=
new
UserMessageDat
();
$userMessageDat
=
new
UserMessageDat
();
$userMessageDat
->
user_id
=
$tmpCircleMember
->
user_id
;
$userMessageDat
->
user_id
=
$tmpCircleMember
->
user_id
;
$userMessageDat
->
title
=
"活动参加邀请通知"
;
$userMessageDat
->
title
=
"活动参加邀请通知"
;
$userMessageDat
->
comment
=
"嘀嘀嘀!圈主邀请您参加活动,快点击
进入,
参加报名吧!"
;
$userMessageDat
->
comment
=
"嘀嘀嘀!圈主邀请您参加活动,快点击参加报名吧!"
;
//添加附件附件
//添加附件附件
$userMessageDat
->
attach_dat_type
=
"VOLUNTEER"
;
$userMessageDat
->
attach_dat_type
=
"VOLUNTEER"
;
$userMessageDat
->
attach_dat_id
=
$circleDat
->
id
;
$userMessageDat
->
attach_dat_id
=
$circleDat
->
id
;
$userMessageDat
->
attach_dat_path
=
"pages/volunteersEventDetail/volunteersEventDetail?
volunteersE
ventId=
{
$volunteerDat
->
id
}
&circleId=
{
$circleDat
->
id
}
"
;
$userMessageDat
->
attach_dat_path
=
"pages/volunteersEventDetail/volunteersEventDetail?
e
ventId=
{
$volunteerDat
->
id
}
&circleId=
{
$circleDat
->
id
}
"
;
}
}
}
}
...
...
src/user/if/ajax_attend_volunteer_event_personal.php
View file @
95d72f74
...
@@ -13,7 +13,7 @@ $circleId = ParamUtil::getRequestNumber("circleId", 0);//受邀请参加的时
...
@@ -13,7 +13,7 @@ $circleId = ParamUtil::getRequestNumber("circleId", 0);//受邀请参加的时
$result
=
array
();
$result
=
array
();
//参数检查
//参数检查
if
(
empty
(
$unionId
))
{
if
(
empty
(
$unionId
)
||
empty
(
$eventId
)
)
{
$result
[
"message"
]
=
"参数错误!"
;
$result
[
"message"
]
=
"参数错误!"
;
responseNG
(
$result
);
responseNG
(
$result
);
}
}
...
@@ -39,7 +39,7 @@ $userMst = $userList[0];
...
@@ -39,7 +39,7 @@ $userMst = $userList[0];
//是否已经报名参加
//是否已经报名参加
$param
=
array
();
$param
=
array
();
$param
[
'volunteer_event_id'
]
=
$
userMst
->
i
d
;
$param
[
'volunteer_event_id'
]
=
$
eventI
d
;
$param
[
'user_id'
]
=
$userMst
->
id
;
$param
[
'user_id'
]
=
$userMst
->
id
;
$param
[
'delete_flg'
]
=
false
;
$param
[
'delete_flg'
]
=
false
;
$tmpList
=
VolunteerEventMemberDat
::
getList
(
$param
,
"id"
,
"desc"
,
0
,
1
);
$tmpList
=
VolunteerEventMemberDat
::
getList
(
$param
,
"id"
,
"desc"
,
0
,
1
);
...
...
src/user/if/ajax_get_volunteer_event_detail.php
View file @
95d72f74
...
@@ -40,7 +40,7 @@ $userMst = $userList[0];
...
@@ -40,7 +40,7 @@ $userMst = $userList[0];
$isMember
=
false
;
$isMember
=
false
;
$isComplete
=
false
;
$isComplete
=
false
;
$param
=
array
();
$param
=
array
();
$param
[
'volunteer_event_id'
]
=
$
userMst
->
i
d
;
$param
[
'volunteer_event_id'
]
=
$
eventI
d
;
$param
[
'user_id'
]
=
$userMst
->
id
;
$param
[
'user_id'
]
=
$userMst
->
id
;
$param
[
'delete_flg'
]
=
false
;
$param
[
'delete_flg'
]
=
false
;
$tmpList
=
VolunteerEventMemberDat
::
getList
(
$param
,
"id"
,
"desc"
,
0
,
1
);
$tmpList
=
VolunteerEventMemberDat
::
getList
(
$param
,
"id"
,
"desc"
,
0
,
1
);
...
@@ -63,7 +63,7 @@ if($tmpCount > 0) {
...
@@ -63,7 +63,7 @@ if($tmpCount > 0) {
//报名是否已经结束
//报名是否已经结束
$isEnrollFinish
=
false
;
$isEnrollFinish
=
false
;
if
(
date
(
"Y-m-d H:i:s"
)
<
=
$volunteerDat
->
enroll_time
)
{
if
(
date
(
"Y-m-d H:i:s"
)
>
=
$volunteerDat
->
enroll_time
)
{
$isEnrollFinish
=
true
;
$isEnrollFinish
=
true
;
}
}
...
...
src/wx/pages/volunteersEventDetail/volunteersEventDetail.js
View file @
95d72f74
...
@@ -8,6 +8,7 @@ Page({
...
@@ -8,6 +8,7 @@ Page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
circleId
:
0
,
eventId
:
0
,
eventId
:
0
,
active
:
0
,
active
:
0
,
...
@@ -27,9 +28,12 @@ Page({
...
@@ -27,9 +28,12 @@ Page({
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
var
that
=
this
;
var
that
=
this
;
if
(
options
!=
null
)
{
that
.
setData
({
that
.
setData
({
circleId
:
options
.
circleId
,
eventId
:
options
.
eventId
eventId
:
options
.
eventId
})
})
}
var
config
=
wx
.
getStorageSync
(
'config'
);
var
config
=
wx
.
getStorageSync
(
'config'
);
wx
.
request
({
wx
.
request
({
url
:
app
.
url
+
'ajax_get_volunteer_event_detail.php'
,
url
:
app
.
url
+
'ajax_get_volunteer_event_detail.php'
,
...
@@ -53,20 +57,20 @@ Page({
...
@@ -53,20 +57,20 @@ Page({
circleMemberList
:
res
.
data
.
result
.
circleMemberList
circleMemberList
:
res
.
data
.
result
.
circleMemberList
})
})
//按钮文字控制
//按钮文字控制
if
(
res
.
data
.
result
.
isMember
==
false
){
if
(
res
.
data
.
result
.
isMember
==
false
&&
res
.
data
.
result
.
isEnrollFinish
==
false
){
that
.
setData
({
that
.
setData
({
menuText
:
'报名参加'
menuText
:
'报名参加'
})
})
}
else
{
}
if
(
res
.
data
.
result
.
isEnrollFinish
==
false
){
if
(
res
.
data
.
result
.
isMember
==
true
&&
res
.
data
.
result
.
isEnrollFinish
==
false
)
{
that
.
setData
({
menuText
:
'上传凭证'
})
}
else
{
that
.
setData
({
that
.
setData
({
menuText
:
'取消报名'
menuText
:
'取消报名'
})
})
}
}
if
(
res
.
data
.
result
.
isMember
==
true
&&
res
.
data
.
result
.
isEnrollFinish
==
true
&&
res
.
data
.
result
.
isComplete
==
false
)
{
that
.
setData
({
menuText
:
'上传凭证'
})
}
}
}
}
},
},
...
@@ -93,14 +97,155 @@ Page({
...
@@ -93,14 +97,155 @@ Page({
onShareAppMessage
:
function
()
{
onShareAppMessage
:
function
()
{
},
},
//点击切换
onChange
(
event
)
{
onChange
(
event
)
{
},
},
//报名参加
//报名参加
btnBaoming
(){
userAction
(
e
){
var
that
=
this
;
var
config
=
wx
.
getStorageSync
(
'config'
);
var
config
=
wx
.
getStorageSync
(
'config'
);
//获取按钮上面的文字.
if
(
that
.
data
.
isCircleOwner
&&
that
.
data
.
menuText
==
"报名参加"
)
{
//圈主身份的时候报名处理,弹出选择对话框
Dialog
.
confirm
({
title
:
''
,
message
:
'检测到您为圈主,是否团队报名?'
,
confirmButtonText
:
'是'
,
cancelButtonText
:
'否'
}).
then
(()
=>
{
//调用团队报名接口
wx
.
request
({
url
:
app
.
url
+
'ajax_attend_volunteer_event_circle.php'
,
data
:
{
unionId
:
config
.
unionId
,
eventId
:
that
.
data
.
eventId
,
circleId
:
that
.
data
.
circleId
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
)
{
Notify
({
type
:
'success'
,
message
:
res
.
data
.
result
.
message
});
//如果报名成功则刷新本页面
if
(
res
.
data
.
status
==
"OK"
)
{
that
.
onLoad
();
}
}
},
fail
:
function
(
res
)
{
Notify
({
type
:
'danger'
,
message
:
res
.
data
.
result
.
message
});
},
complete
:
function
(
res
)
{
},
})
}).
catch
(()
=>
{
//调用个人报名接口
wx
.
request
({
url
:
app
.
url
+
'ajax_attend_volunteer_event_personal.php'
,
data
:
{
unionId
:
config
.
unionId
,
eventId
:
that
.
data
.
eventId
,
circleId
:
that
.
data
.
circleId
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
)
{
Notify
({
type
:
'success'
,
message
:
res
.
data
.
result
.
message
});
//如果报名成功则刷新本页面
if
(
res
.
data
.
status
==
"OK"
)
{
that
.
onLoad
();
}
}
},
fail
:
function
(
res
)
{
Notify
({
type
:
'danger'
,
message
:
res
.
data
.
result
.
message
});
},
complete
:
function
(
res
)
{
},
})
});
}
if
(
!
that
.
data
.
isCircleOwner
&&
that
.
data
.
menuText
==
"报名参加"
)
{
//非圈主身份的时候个人报名处理
wx
.
request
({
url
:
app
.
url
+
'ajax_attend_volunteer_event_personal.php'
,
data
:
{
unionId
:
config
.
unionId
,
eventId
:
that
.
data
.
eventId
,
circleId
:
that
.
data
.
circleId
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
){
Notify
({
type
:
'success'
,
message
:
res
.
data
.
result
.
message
});
//如果报名成功则刷新本页面
if
(
res
.
data
.
status
==
"OK"
)
{
that
.
onLoad
();
}
}
},
fail
:
function
(
res
)
{
Notify
({
type
:
'danger'
,
message
:
res
.
data
.
result
.
message
});
},
complete
:
function
(
res
)
{},
})
}
if
(
that
.
data
.
menuText
==
"取消报名"
)
{
//取消报名
wx
.
request
({
url
:
app
.
url
+
'ajax_cancel_volunteer_event.php'
,
data
:
{
unionId
:
config
.
unionId
,
eventId
:
that
.
data
.
eventId
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
)
{
Notify
({
type
:
'success'
,
message
:
res
.
data
.
result
.
message
});
//如果取消成功,跳转到活动首页
if
(
res
.
data
.
status
==
"OK"
)
{
wx
.
redirectTo
({
url
:
'../volunteers/volunteers?'
,
})
}
}
},
fail
:
function
(
res
)
{
Notify
({
type
:
'danger'
,
message
:
res
.
data
.
result
.
message
});
},
complete
:
function
(
res
)
{
},
})
}
if
(
that
.
data
.
menuText
==
"上传凭证"
)
{
//跳转到上传凭证页面
Dialog
.
confirm
({
title
:
'标题'
,
message
:
'是否上传凭证?'
}).
then
(()
=>
{
wx
.
navigateTo
({
url
:
'../uploadDocuments/uploadDocuments'
,
})
}).
catch
(()
=>
{
// on cancel
Notify
({
type
:
'danger'
,
message
:
'取消报名'
});
});
}
// if(this.data.zhuangtai=='报名参加'){
// if(this.data.zhuangtai=='报名参加'){
// if(this.data.isOwner==true){
// if(this.data.isOwner==true){
// Dialog.confirm({
// Dialog.confirm({
...
@@ -157,17 +302,8 @@ Page({
...
@@ -157,17 +302,8 @@ Page({
// });
// });
// }
// }
// }
// }
Dialog
.
confirm
({
title
:
'标题'
,
message
:
'是否上传凭证?'
}).
then
(()
=>
{
wx
.
navigateTo
({
url
:
'../uploadDocuments/uploadDocuments'
,
})
}).
catch
(()
=>
{
// on cancel
Notify
({
type
:
'danger'
,
message
:
'取消报名'
});
});
// wx: wx.request({
// wx: wx.request({
// url: app.url + 'ajax_cancel_volunteer_event_personal.php',
// url: app.url + 'ajax_cancel_volunteer_event_personal.php',
// header: { 'content-type': 'application/json' },
// header: { 'content-type': 'application/json' },
...
...
src/wx/pages/volunteersEventDetail/volunteersEventDetail.wxml
View file @
95d72f74
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
</view>
</view>
</van-tab>
</van-tab>
</van-tabs>
</van-tabs>
<view class='
btnBaoming' bindtap='btnBaoming
'>{{menuText}}</view>
<view class='
actionBtn' bindtap='userAction
'>{{menuText}}</view>
</view>
</view>
</view>
</view>
<van-dialog id="van-dialog" />
<van-dialog id="van-dialog" />
...
...
src/wx/pages/volunteersEventDetail/volunteersEventDetail.wxss
View file @
95d72f74
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
justify-content: center;
justify-content: center;
align-items: center;
align-items: center;
}
}
.
btnBaoming
{
.
actionBtn
{
width: 75%;
width: 75%;
height: 40px;
height: 40px;
line-height: 40px;
line-height: 40px;
...
...
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