Commit f21dbba2 by biao

11

parent 512be874
......@@ -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"];
......
......@@ -58,7 +58,7 @@ if(!empty($tmpList)) {
//组装返回数据
$result["rowCount"] = $rowCount;
$result["page"] = $page;
$result["familyEventCount"] = $familyEventCount;
$result["pageCount"] = $pageCount;
$result["familyEventList"] = $familyEventList;
ErrorLogger::doOutput("Compass...ajax_get_family_event_list.php....End.", 0);
......
......@@ -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%;
......
......@@ -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?eventid=' + eventId,
url: '../familyEventDetail/familyEventDetail?eventId=' + 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: '没有更多内容啦。',
......
{
"usingComponents": {}
"usingComponents": {},
"navigationBarTitleText": "亲子活动"
}
\ No newline at end of file
<!--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>
......
......@@ -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(() => {
//参加
attend() {
var that = this;
wx.navigateTo({
url: '../joinFamilyEvent/joinFamilyEvent',
url: '../joinFamilyEvent/joinFamilyEvent?eventId=' + that.data.eventId + "&eventTitle=" + that.data.eventDat.title,
})
}).catch(() => {
// on cancel
Notify({ type: 'danger', message: '取消报名' });
});
},
}
})
\ No newline at end of file
{
"usingComponents": {}
"usingComponents": {},
"navigationBarTitleText": "亲子活动详情"
}
\ No newline at end of file
<!--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>
<view class='botCon_activeDetails'>
<view>
<text>联系人:邵帅</text>
<text>联系方式:19308903183</text>
<text>集合地点:马群街道</text>
<text>集合时间:2019.11.10 12:00</text>
<view class='top_familyEventDetail'>
<view>{{eventDat.title}}</view>
<text>作者:{{eventDat.author}} 发表时间:{{eventDat.publish_time}}</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 wx:for='{{finishUserList}}' >
<view>
<view>
<image src='../../img/3.jpg'></image>梁天同学
</view>
<text>已报名</text>
</view>
<view>
<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 wx:for='{{unfinishUserList}}' >
<view>
<view>
<image src='../../img/3.jpg'></image>小天同学
</view>
<text>已报名</text>
</view>
<view>
<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" />
......
/* 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: 30px;
line-height: 30px;
.actionBtn{
width: 75%;
height: 40px;
line-height: 40px;
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
......@@ -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: '没有更多内容啦。',
......
......@@ -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');
//调用接口获取数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment