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
192c96f2
Commit
192c96f2
authored
5 years ago
by
biao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111111
111111
parent
f981736f
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
269 additions
and
73 deletions
+269
-73
compass_db_schema.xlsx
doc/DB/compass_db_schema.xlsx
+0
-0
接口文档 V1.0.xls
doc/接口文档 V1.0.xls
+0
-0
ajax_delete_circle_moment.php
src/user/if/ajax_delete_circle_moment.php
+77
-0
editCircle.js
src/wx/pages/editCircle/editCircle.js
+55
-30
editCircle.wxml
src/wx/pages/editCircle/editCircle.wxml
+15
-4
editCircle.wxss
src/wx/pages/editCircle/editCircle.wxss
+62
-0
newCircleMoment.js
src/wx/pages/newCircleMoment/newCircleMoment.js
+2
-2
volunteersEventDetail.js
src/wx/pages/volunteersEventDetail/volunteersEventDetail.js
+42
-31
volunteersEventDetail.wxml
...wx/pages/volunteersEventDetail/volunteersEventDetail.wxml
+1
-1
volunteersEventDetail.wxss
...wx/pages/volunteersEventDetail/volunteersEventDetail.wxss
+15
-5
No files found.
doc/DB/compass_db_schema.xlsx
View file @
192c96f2
No preview for this file type
This diff is collapsed.
Click to expand it.
doc/接口文档 V1.0.xls
View file @
192c96f2
No preview for this file type
This diff is collapsed.
Click to expand it.
src/user/if/ajax_delete_circle_moment.php
0 → 100644
View file @
192c96f2
<?php
// 指定删除圈子动态接口
require_once
(
"../user_include.inc"
);
ErrorLogger
::
doOutput
(
"Compass...ajax_delete_circle_moment.php.php....Start."
,
0
);
//获取参数
$unionId
=
ParamUtil
::
getRequestString
(
"unionId"
);
$momentId
=
ParamUtil
::
getRequestNumber
(
"momentId"
,
0
);
//指定删除的用户ID
$circleId
=
ParamUtil
::
getRequestNumber
(
"circleId"
,
0
);
//圈子id
$result
=
array
();
//参数检查
if
(
empty
(
$unionId
)
||
empty
(
$momentId
)
||
empty
(
$circleId
))
{
$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
];
//判断圈子是否存在
$circleDat
=
CircleDat
::
getById
(
$circleId
);
if
(
empty
(
$circleDat
))
{
$result
[
"message"
]
=
"圈子不存在!"
;
responseNG
(
$result
);
}
//只有圈主才可以删除动态
if
(
$circleDat
->
owner_id
!=
$userMst
->
id
)
{
$result
[
"message"
]
=
"只有圈主才可以删除!"
;
responseNG
(
$result
);
}
//删除动态处理
$param
=
array
();
$param
[
'circle_id'
]
=
$circleDat
->
id
;
$param
[
'id'
]
=
$momentId
;
$param
[
'delete_flg'
]
=
false
;
$momentList
=
CircleMomentDat
::
getList
(
$param
,
"id"
,
"asc"
,
0
,
1
);
if
(
!
empty
(
$momentList
))
{
$momentList
[
0
]
->
delete_flg
=
true
;
$momentList
[
0
]
->
save
();
}
//组装返回数据
$result
[
"message"
]
=
"删除成功!"
;
ErrorLogger
::
doOutput
(
"Compass...ajax_delete_circle_moment.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
This diff is collapsed.
Click to expand it.
src/wx/pages/editCircle/editCircle.js
View file @
192c96f2
...
...
@@ -18,6 +18,8 @@ Page({
fileList
:
[],
frontImage
:
''
,
comment
:
""
,
deleteDialog
:
false
},
/**
...
...
@@ -129,46 +131,69 @@ Page({
//删除圈子
deleteCircle
()
{
//显示删除对话框
this
.
setData
({
deleteDialog
:
true
})
return
//跳转到上传凭证页面
Dialog
.
confirm
({
title
:
''
,
message
:
'是否删除圈子以及相关数据?'
}).
then
(()
=>
{
var
that
=
this
;
var
config
=
wx
.
getStorageSync
(
'config'
);
//调用删除接口
wx
.
request
({
url
:
app
.
url
+
'ajax_delete_circle.php'
,
data
:
{
unionId
:
config
.
unionId
,
circleId
:
that
.
data
.
circleId
,
zIndex
:
100
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
)
{
if
(
res
.
data
.
status
==
"OK"
)
{
//删除成功以后跳转到圈子模块首页
wx
.
switchTab
({
url
:
'../circle/circle'
,
})
}
else
{
Notify
(
res
.
data
.
message
)
return
}
}
},
fail
:
function
(
res
)
{
},
complete
:
function
(
res
)
{
},
})
}).
catch
(()
=>
{
});
},
//取消删除圈子
cancelDelete
()
{
this
.
setData
({
deleteDialog
:
false
})
},
//确认删除圈子
confirmDelete
()
{
var
that
=
this
;
var
config
=
wx
.
getStorageSync
(
'config'
);
//调用删除接口
wx
.
request
({
url
:
app
.
url
+
'ajax_delete_circle.php'
,
data
:
{
unionId
:
config
.
unionId
,
circleId
:
that
.
data
.
circleId
,
zIndex
:
100
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
)
{
if
(
res
.
data
.
status
==
"OK"
)
{
//删除成功以后跳转到圈子模块首页
wx
.
switchTab
({
url
:
'../circle/circle'
,
})
}
else
{
Notify
(
res
.
data
.
message
)
return
}
}
},
fail
:
function
(
res
)
{
},
complete
:
function
(
res
)
{
that
.
setData
({
deleteDialog
:
false
})
},
})
},
//提交数据【编辑】
editCircle
()
{
var
that
=
this
;
...
...
This diff is collapsed.
Click to expand it.
src/wx/pages/editCircle/editCircle.wxml
View file @
192c96f2
...
...
@@ -34,16 +34,27 @@
</view>
</view>
<view class='quanziComment'>
<text style="margin-top:10px;">圈子简介:</text>
<textarea bindinput="onInputComment" value='{{comment}}'></textarea>
</view>
<view class='quanziComment'>
<text style="margin-top:10px;">圈子简介:</text>
<textarea bindinput="onInputComment" value='{{comment}}'></textarea>
</view>
<view class='buttons'>
<view class='buttonDelete' bindtap='deleteCircle'>删除</view>
<view class='buttonEdit' bindtap='editCircle'>下一步</view>
</view>
<view class='comfirmDialogShadow' wx:if="{{deleteDialog}}">
</view>
<view class='comfirmDialog' wx:if="{{deleteDialog}}">
<text class="message">是否删除圈子以及相关数据?</text>
<view class='dialogButtons'>
<view class="cancelButton" bindtap='cancelDelete'>取消</view>
<view class="confirmButton" bindtap='confirmDelete'>确认</view>
</view>
</view>
<van-dialog id="van-dialog" zIndex="100"/>
<van-notify id="van-notify" />
</view>
This diff is collapsed.
Click to expand it.
src/wx/pages/editCircle/editCircle.wxss
View file @
192c96f2
...
...
@@ -8,6 +8,7 @@ page{
width: 100%;
margin: 0 auto;
background: #fff;
z-index: 0;
}
.top_newQuanzi{
width: 85%;
...
...
@@ -127,4 +128,64 @@ page{
text-align: center;
background: #0D76ED;
color: #fff;
}
.comfirmDialogShadow {
position:fixed;
width:100%;
height:100%;
top:0;
left:0;
background: #000;
opacity:0.75;
z-index: 998;
}
.comfirmDialog {
position:fixed;
top: 32%;
left:5%;
width:90%;
height:100px;
background: #fff;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
border: 1rpx solid #f0f0f0;
border-radius: 16px;
z-index: 999;
}
.comfirmDialog .message{
width:100%;
margin: auto;
line-height: 60px;
height: 60px;
text-align: center;
border-bottom: 1rpx solid #f0f0f0;
}
.comfirmDialog .dialogButtons{
width: 100%;
height: 40px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
text-align: center;
}
.dialogButtons .cancelButton{
width: 50%;
height: 40px;
line-height: 40px;
border-right: 1rpx solid #f0f0f0;
}
.dialogButtons .confirmButton{
width: 50%;
height: 40px;
line-height: 40px;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/wx/pages/newCircleMoment/newCircleMoment.js
View file @
192c96f2
...
...
@@ -59,8 +59,8 @@ Page({
//判断上传的图片类型
beforeRead
(
event
)
{
const
{
file
,
callback
}
=
event
.
detail
;
if
(
file
[
0
].
path
.
indexOf
(
'jpg'
)
<
0
)
{
wx
.
showToast
({
title
:
'
请选择jpg图片上传
'
,
icon
:
'none'
});
if
(
file
[
0
].
path
.
indexOf
(
'jpg'
)
<
0
&&
file
[
0
].
path
.
indexOf
(
'png'
)
<
0
&&
file
[
0
].
path
.
indexOf
(
'gif'
)
<
0
)
{
wx
.
showToast
({
title
:
'
只能上传图片
'
,
icon
:
'none'
});
callback
(
false
);
return
;
}
...
...
This diff is collapsed.
Click to expand it.
src/wx/pages/volunteersEventDetail/volunteersEventDetail.js
View file @
192c96f2
...
...
@@ -11,7 +11,8 @@ Page({
circleId
:
0
,
eventId
:
0
,
active
:
0
,
buttonClass
:
'actionBtn'
,
volunteerEventDat
:[],
isEnrollFinish
:
false
,
isComplete
:
false
,
...
...
@@ -77,19 +78,22 @@ Page({
if
(
res
.
data
.
result
.
isMember
==
false
&&
res
.
data
.
result
.
isEnrollFinish
==
false
){
that
.
setData
({
menuText
:
'报名参加'
,
showActionButton
:
true
showActionButton
:
true
,
buttonClass
:
'actionBtn'
})
}
if
(
res
.
data
.
result
.
isMember
==
true
&&
res
.
data
.
result
.
isEnrollFinish
==
false
)
{
that
.
setData
({
menuText
:
'取消报名'
,
showActionButton
:
true
showActionButton
:
true
,
buttonClass
:
'cancelBtn'
})
}
if
(
res
.
data
.
result
.
isMember
==
true
&&
res
.
data
.
result
.
isEnrollFinish
==
true
&&
res
.
data
.
result
.
isComplete
==
false
)
{
that
.
setData
({
menuText
:
'上传凭证'
,
showActionButton
:
true
showActionButton
:
true
,
buttonClass
:
'actionBtn'
})
}
}
...
...
@@ -163,39 +167,46 @@ Page({
}
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?'
,
})
//跳转到上传凭证页面
Dialog
.
confirm
({
title
:
''
,
message
:
'是否取消报名?'
}).
then
(()
=>
{
//取消报名处理
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"
)
{
that
.
onLoad
();
}
}
}
},
fail
:
function
(
res
)
{
Notify
({
type
:
'danger'
,
message
:
res
.
data
.
result
.
message
});
},
complete
:
function
(
res
)
{
},
})
},
fail
:
function
(
res
)
{
Notify
({
type
:
'danger'
,
message
:
res
.
data
.
result
.
message
});
},
complete
:
function
(
res
)
{
},
})
}).
catch
(()
=>
{
});
}
if
(
that
.
data
.
menuText
==
"上传凭证"
)
{
//跳转到上传凭证页面
Dialog
.
confirm
({
title
:
'
标题
'
,
title
:
''
,
message
:
'是否上传凭证?'
}).
then
(()
=>
{
wx
.
navigateTo
({
...
...
This diff is collapsed.
Click to expand it.
src/wx/pages/volunteersEventDetail/volunteersEventDetail.wxml
View file @
192c96f2
...
...
@@ -67,7 +67,7 @@
</view>
</van-tab>
</van-tabs>
<view class='
actionBtn
' bindtap='userAction' wx:if="{{showActionButton}}">{{menuText}}</view>
<view class='
{{buttonClass}}
' bindtap='userAction' wx:if="{{showActionButton}}">{{menuText}}</view>
</view>
<view class="ownerAttendDialog" wx:if="{{showOwnerDialog}}">
...
...
This diff is collapsed.
Click to expand it.
src/wx/pages/volunteersEventDetail/volunteersEventDetail.wxss
View file @
192c96f2
...
...
@@ -90,17 +90,27 @@
justify-content: center;
align-items: center;
}
.actionBtn{
width: 75%;
position:fixed;
bottom: 0;
width: 100%;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 14px;
margin: 10px auto;
background: #0D76ED;
margin-bottom: 10px;
color: #fff;
border-radius: 15px;
}
.cancelBtn{
position:fixed;
bottom: 0;
width: 100%;
height: 40px;
line-height: 40px;
text-align: center;
background: #8F8F8F;
color: #fff;
}
/**圈主报名对话框**/
...
...
This diff is collapsed.
Click to expand it.
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