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
f21dbba2
Commit
f21dbba2
authored
5 years ago
by
biao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
512be874
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
152 additions
and
150 deletions
+152
-150
FamilyEventDat.inc
src/cn/compass/entity/FamilyEventDat.inc
+1
-0
ajax_get_family_event_list.php
src/user/if/ajax_get_family_event_list.php
+1
-1
app.wxss
src/wx/app.wxss
+1
-3
familyEvent.js
src/wx/pages/familyEvent/familyEvent.js
+36
-45
familyEvent.json
src/wx/pages/familyEvent/familyEvent.json
+3
-1
familyEvent.wxml
src/wx/pages/familyEvent/familyEvent.wxml
+5
-8
familyEventDetail.js
src/wx/pages/familyEventDetail/familyEventDetail.js
+25
-22
familyEventDetail.json
src/wx/pages/familyEventDetail/familyEventDetail.json
+3
-1
familyEventDetail.wxml
src/wx/pages/familyEventDetail/familyEventDetail.wxml
+12
-39
familyEventDetail.wxss
src/wx/pages/familyEventDetail/familyEventDetail.wxss
+61
-28
socialEvent.js
src/wx/pages/socialEvent/socialEvent.js
+2
-0
socialEventDetail.js
src/wx/pages/socialEventDetail/socialEventDetail.js
+2
-2
No files found.
src/cn/compass/entity/FamilyEventDat.inc
View file @
f21dbba2
...
...
@@ -39,6 +39,7 @@ class FamilyEventDat extends CompassDynamicData
$this
->
original_source
=
$record
[
"original_source"
];
$this
->
title
=
$record
[
"title"
];
$this
->
author
=
$record
[
"author"
];
$this
->
publish_time
=
$record
[
"publish_time"
];
$this
->
front_image
=
$record
[
"front_image"
];
$this
->
images
=
$record
[
"images"
];
$this
->
images
=
$record
[
"images"
];
...
...
This diff is collapsed.
Click to expand it.
src/user/if/ajax_get_family_event_list.php
View file @
f21dbba2
...
...
@@ -58,7 +58,7 @@ if(!empty($tmpList)) {
//组装返回数据
$result
[
"rowCount"
]
=
$rowCount
;
$result
[
"page"
]
=
$page
;
$result
[
"
familyEventCount"
]
=
$familyEvent
Count
;
$result
[
"
pageCount"
]
=
$page
Count
;
$result
[
"familyEventList"
]
=
$familyEventList
;
ErrorLogger
::
doOutput
(
"Compass...ajax_get_family_event_list.php....End."
,
0
);
...
...
This diff is collapsed.
Click to expand it.
src/wx/app.wxss
View file @
f21dbba2
...
...
@@ -211,9 +211,7 @@ video, live-player, live-pusher, open-data, web-view {
line-height: 20px;
}
.right_listPractice>text{
display: block;
text-align: right;
margin-top: 20px;
color: #000;
}
.listPublicWelfare>view{
width: 94%;
...
...
This diff is collapsed.
Click to expand it.
src/wx/pages/familyEvent/familyEvent.js
View file @
f21dbba2
...
...
@@ -17,35 +17,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
var
that
=
this
;
that
.
setData
({
showLoading
:
true
,
});
var
config
=
wx
.
getStorageSync
(
'config'
);
var
location
=
wx
.
getStorageSync
(
'location'
);
wx
:
wx
.
request
({
url
:
app
.
url
+
'ajax_get_family_event_list.php'
,
data
:
{
unionId
:
config
.
unionId
,
age
:
4
,
province
:
location
.
province
,
city
:
location
.
city
,
district
:
location
.
district
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
)
{
that
.
setData
({
eventDat
:
res
.
data
.
result
.
sociaEventDat
})
}
},
fail
:
function
(
res
)
{
},
complete
:
function
(
res
)
{
},
})
this
.
familyEventList
()
},
/**
...
...
@@ -70,20 +42,6 @@ Page({
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
...
...
@@ -97,19 +55,52 @@ Page({
},
// 社会实践列表
familyEventList
()
{
var
that
=
this
;
that
.
setData
({
showLoading
:
true
,
});
var
config
=
wx
.
getStorageSync
(
'config'
);
wx
.
request
({
url
:
app
.
url
+
'ajax_get_family_event_list.php'
,
data
:
{
unionId
:
config
.
unionId
,
page
:
that
.
data
.
page
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
)
{
that
.
setData
({
pageCount
:
res
.
data
.
result
.
pageCount
,
familyEventList
:
res
.
data
.
result
.
familyEventList
})
}
},
fail
:
function
(
res
)
{
},
complete
:
function
(
res
)
{
},
})
},
//跳转到亲子活动详情页面
familyEventDetail
()
{
familyEventDetail
(
e
)
{
var
eventId
=
e
.
currentTarget
.
dataset
[
'index'
]
wx
.
navigateTo
({
url
:
'../familyEventDetail/familyEventDetail?event
i
d='
+
eventId
,
url
:
'../familyEventDetail/familyEventDetail?event
I
d='
+
eventId
,
})
},
//加载更多
loadMore
()
{
if
((
this
.
data
.
page
+
1
)
<
this
.
data
.
pageCount
)
{
var
pageIndex
=
this
.
data
.
page
+
1
this
.
setData
({
page
:
pageIndex
})
this
.
familyEventList
()
}
else
{
wx
.
showToast
({
title
:
'没有更多内容啦。'
,
...
...
This diff is collapsed.
Click to expand it.
src/wx/pages/familyEvent/familyEvent.json
View file @
f21dbba2
{
"usingComponents"
:
{}
"usingComponents"
:
{},
"navigationBarTitleText"
:
"亲子活动"
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/wx/pages/familyEvent/familyEvent.wxml
View file @
f21dbba2
<!--pages/familyEvent/familyEvent.wxml-->
<view class='familyEvent'>
<view class='titleqinzi'>
<image src='../../img/sanjiao.png'></image>亲子活动
</view>
<view class='listPractice'>
<scroll-view scroll-y="true" style='height:1100rpx;bottom:10rpx;' class="listPublicWelfare" bindscrolltolower='loadMore'>
<view class='activelist' wx:for="{{familyEventList}}" wx:key="{{familyEventList[index].id}}" bindtap='familyEventDetail'>
<view class='activelist' wx:for="{{familyEventList}}" wx:key="{{familyEventList[index].id}}" bindtap='familyEventDetail'
data-index='{{item.id}}'
>
<view class='left_listPractice'>
<image src='{{item.
images
}}'></image>
<image src='{{item.
front_image
}}'></image>
</view>
<view class='right_listPractice'>
<text>{{item.class_title}}{{item.title}}\n</text>
<view>
<text>{{item.title
}}\n</text>
<text>{{item.content}}
</text>
<text>发布人:{{item.author
}}\n</text>
<text>发布时间:{{item.publish_time}}\n
</text>
</view>
<text>{{item.author}}</text>
</view>
<text class='activeLine'></text>
</view>
...
...
This diff is collapsed.
Click to expand it.
src/wx/pages/familyEventDetail/familyEventDetail.js
View file @
f21dbba2
...
...
@@ -10,6 +10,8 @@ Page({
data
:
{
eventId
:
''
,
eventDat
:
''
,
finishUserList
:
[],
unfinishUserList
:
[],
active
:
0
},
...
...
@@ -18,24 +20,29 @@ Page({
*/
onLoad
:
function
(
options
)
{
var
that
=
this
;
that
.
setData
({
eventId
:
options
.
eventId
})
var
config
=
wx
.
getStorageSync
(
'config'
);
var
location
=
wx
.
getStorageSync
(
'location'
);
wx
:
wx
.
request
({
//调用接口获取数据
wx
.
request
({
url
:
app
.
url
+
'ajax_get_family_event_detail.php'
,
data
:
{
unionId
:
config
.
unionId
,
eventId
:
1
eventId
:
that
.
data
.
eventId
},
header
:
{
'content-type'
:
'application/json'
},
method
:
'GET'
,
dataType
:
'json'
,
success
:
function
(
res
)
{
console
.
log
(
res
)
// if (res.statusCode == 200) {
// that.setData({
// familyEventList: res.data.result.familyEventList
// })
// }
if
(
res
.
statusCode
==
200
)
{
that
.
setData
({
eventDat
:
res
.
data
.
result
.
sociaEventDat
,
finishUserList
:
res
.
data
.
result
.
finishUserList
,
unfinishUserList
:
res
.
data
.
result
.
unfinishUserList
})
}
},
fail
:
function
(
res
)
{
},
complete
:
function
(
res
)
{
},
...
...
@@ -93,18 +100,13 @@ Page({
onChange
(
event
)
{
},
btnBaoming
()
{
Dialog
.
confirm
({
title
:
'标题'
,
message
:
'是否报名!'
}).
then
(()
=>
{
wx
.
navigateTo
({
url
:
'../joinFamilyEvent/joinFamilyEvent'
,
})
}).
catch
(()
=>
{
// on cancel
Notify
({
type
:
'danger'
,
message
:
'取消报名'
});
});
},
//参加
attend
()
{
var
that
=
this
;
wx
.
navigateTo
({
url
:
'../joinFamilyEvent/joinFamilyEvent?eventId='
+
that
.
data
.
eventId
+
"&eventTitle="
+
that
.
data
.
eventDat
.
title
,
})
}
})
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/wx/pages/familyEventDetail/familyEventDetail.json
View file @
f21dbba2
{
"usingComponents"
:
{}
"usingComponents"
:
{},
"navigationBarTitleText"
:
"亲子活动详情"
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/wx/pages/familyEventDetail/familyEventDetail.wxml
View file @
f21dbba2
<!--pages/familyEventDetail/familyEventDetail.wxml-->
<!--pages/activeDetails/activeDetails.wxml-->
<view class='activeDetails'>
<image src='../../img/1.jpg'></image>
<view class='con_activeDetails'>
<text>活动名称:马群街道卫生清理</text>
<text>活动地点:马群区2号地铁站南出口处</text>
<text>征集范围:不限</text>
<text>活动人数:30人</text>
<text>活动时长:2.5h</text>
<text>活动期限:2019.10.11-2019.10.30</text>
<view class='top_familyEventDetail'>
<view>{{eventDat.title}}</view>
<text>作者:{{eventDat.author}} 发表时间:{{eventDat.publish_time}}</text>
</view>
<view class='botCon_activeDetails'>
<view>
<text>联系人:邵帅</text>
<text>联系方式:19308903183</text>
<text>集合地点:马群街道</text>
<text>集合时间:2019.11.10 12:00</text>
</view>
</view>
<view class='activejieshao'>
活动介绍:*************
<view class='con_familyEventDetail'>
<rich-text nodes="{{eventDat.content}}"></rich-text>
</view>
<view class='avtiveTab'>
<van-tabs active="{{ active }}" bind:change="onChange" tab-active-class="activebeijing">
<van-tab title="
圈子报名
">
<van-tab title="
已完成
">
<view class='quanzi'>
<view>
<view>
<image src='../../img/3.jpg'></image>梁天同学
</view>
<text>已报名</text>
</view>
<view>
<view wx:for='{{finishUserList}}' >
<view>
<image src='
../../img/3.jpg'></image>梁天同学
<image src='
{{item.head_img}}'></image>{{item.name}}
</view>
<text>已报名</text>
</view>
</view>
</van-tab>
<van-tab title="
个人报名
">
<van-tab title="
未完成
">
<view class='quanzi'>
<view>
<view>
<image src='../../img/3.jpg'></image>小天同学
</view>
<text>已报名</text>
</view>
<view>
<view wx:for='{{unfinishUserList}}' >
<view>
<image src='
../../img/3.jpg'></image>小天同学
<image src='
{{item.head_img}}'></image>{{item.name}}
</view>
<text>已报名</text>
</view>
</view>
</van-tab>
</van-tabs>
<view class='
btnBaoming' bindtap='btnBaoming'>报名
参加</view>
<view class='
actionBtn' bindtap='attend'>
参加</view>
</view>
</view>
<van-dialog id="van-dialog" />
...
...
This diff is collapsed.
Click to expand it.
src/wx/pages/familyEventDetail/familyEventDetail.wxss
View file @
f21dbba2
/* pages/familyEventDetail/familyEventDetail.wxss */
.activeDetails>image{
width: 100%;
height: 100px;
.top_familyEventDetail{
box-sizing: border-box;
padding: 15px 5px;
text-align: center;
}
.con_activeDetails{
width: 80%;
margin: 30px auto;
.top_familyEventDetail>view{
font-size: 14px;
color: #000;
text-indent: 2rem;
}
.con_activeDetails>text{
display: block;
width: 100%;
.top_familyEventDetail>text{
font-size: 12px;
margin-bottom: 15px;
color: #666;
}
.con_familyEventDetail{
box-sizing: border-box;
padding: 15px 5px;
}
.
botCon_activeDetails
{
.
top_title
{
width: 100%;
height: 76px;
border-bottom: 1px solid #ccc;
height: 40px;
display: flex;
align-items: center;
}
.top_title>view{
width: 100px;
height: 30px;
font-size: 14px;
line-height: 30px;
text-align: center;
color: #fff;
background: #698FBB;
}
.top_title>text{
display: block;
flex: 1;
height: 1px;
background: #698FBB;
}
.botCon_activeDetails>view{
width: 150px;
float: right;
.neirong_title{
font-size: 12px;
color: #666;
font-size: 10px;
}
.botCon_activeDetails>view>text{
.neirong_title>image{
width: 100%;
height: 260px;
}
.title_familyEventDetail>text{
display: block;
margin-bottom: 5px;
width: 100%;
height: 2px;
background: #698FBB;
margin: 10px auto;
}
.activejieshao{
width: 100%;
...
...
@@ -37,7 +63,11 @@
border-bottom: 1px solid #ccc;
}
.activebeijing{
background: #666;
background: #0D76ED;
color: #fff!important;
}
.avtiveTab .van-tabs__wrap{
border-bottom: 1px solid #0D76ED;
}
.avtiveTab .van-tabs__line{
display: none;
...
...
@@ -74,13 +104,15 @@
justify-content: center;
align-items: center;
}
.
btnBaoming
{
width:
100
%;
height:
3
0px;
line-height:
3
0px;
.
actionBtn
{
width:
75
%;
height:
4
0px;
line-height:
4
0px;
text-align: center;
font-size: 13px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
margin-bottom: 3px;
font-size: 14px;
margin: 10px auto;
background: #0D76ED;
margin-bottom: 10px;
color: #fff;
border-radius: 15px;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/wx/pages/socialEvent/socialEvent.js
View file @
f21dbba2
...
...
@@ -76,6 +76,7 @@ Page({
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
)
{
that
.
setData
({
pageCount
:
res
.
data
.
result
.
pageCount
,
socialEventEventList
:
res
.
data
.
result
.
socialEventEventList
})
}
...
...
@@ -92,6 +93,7 @@ Page({
this
.
setData
({
page
:
pageIndex
})
this
.
socialList
()
}
else
{
wx
.
showToast
({
title
:
'没有更多内容啦。'
,
...
...
This diff is collapsed.
Click to expand it.
src/wx/pages/socialEventDetail/socialEventDetail.js
View file @
f21dbba2
...
...
@@ -20,10 +20,10 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
this
.
setData
({
var
that
=
this
;
that
.
setData
({
eventId
:
options
.
eventId
})
var
that
=
this
;
var
config
=
wx
.
getStorageSync
(
'config'
);
//调用接口获取数据
...
...
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