Commit 84af5cad by tangjinlin

0515

parent 23192f23
...@@ -7,19 +7,18 @@ Page({ ...@@ -7,19 +7,18 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
keyword:'', keyword: '',
active:1, active: 1,
showNearCircles:0, showNearCircles: 0,
userCircleList:[], userCircleList: [],
circleList:[], circleList: [],
showImg:true showImg: true
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {},
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
...@@ -57,7 +56,9 @@ Page({ ...@@ -57,7 +56,9 @@ Page({
}, },
onChange(event) { onChange(event) {
// event.detail 的值为当前选中项的索引 // event.detail 的值为当前选中项的索引
this.setData({ active: event.detail }); this.setData({
active: event.detail
});
if (event.detail == 0) { if (event.detail == 0) {
wx.redirectTo({ wx.redirectTo({
url: '../index/index' url: '../index/index'
...@@ -70,14 +71,14 @@ Page({ ...@@ -70,14 +71,14 @@ Page({
}, },
//新建圈子 //新建圈子
creatCircle(){ creatCircle() {
wx.navigateTo({ wx.navigateTo({
url: '../newCircle/newCircle', url: '../newCircle/newCircle',
}); });
}, },
//查找附近的圈子 //查找附近的圈子
searchCircleNearby(e){ searchCircleNearby(e) {
var that = this; var that = this;
var config = wx.getStorageSync('config'); var config = wx.getStorageSync('config');
var location = wx.getStorageSync('location'); var location = wx.getStorageSync('location');
...@@ -88,7 +89,9 @@ Page({ ...@@ -88,7 +89,9 @@ Page({
latitude: location.latitude, latitude: location.latitude,
longitude: location.longitude longitude: location.longitude
}, },
header: { 'content-type': 'application/json' }, header: {
'content-type': 'application/json'
},
method: 'GET', method: 'GET',
dataType: 'json', dataType: 'json',
success: function (res) { success: function (res) {
...@@ -100,8 +103,8 @@ Page({ ...@@ -100,8 +103,8 @@ Page({
}) })
} }
}, },
fail: function (res) { }, fail: function (res) {},
complete: function (res) { }, complete: function (res) {},
}) })
}, },
...@@ -114,35 +117,42 @@ Page({ ...@@ -114,35 +117,42 @@ Page({
}, },
//加入圈子 //加入圈子
joinCircle(e){ joinCircle(e) {
//获取圈子id //获取圈子id
let cirleId = e.currentTarget.dataset['index'] var circleId = e.currentTarget.dataset['index']
var that = this; var that = this;
var config = wx.getStorageSync('config'); var config = wx.getStorageSync('config');
// var location = wx.getStorageSync('location'); // var location = wx.getStorageSync('location');
wx: wx.request({ wx: wx.request({
url: app.url + 'ajax_check_user_join_circle.php', url: app.url + 'ajax_user_join_circle.php',
data: { data: {
unionId: config.unionId, unionId: config.unionId,
circleId: cirleId circleId: circleId
},
header: {
'content-type': 'application/json'
}, },
header: { 'content-type': 'application/json' },
method: 'GET', method: 'GET',
dataType: 'json', dataType: 'json',
success: function (res) { success: function (res) {
console.log(res) console.log(res)
if (res.statusCode == 200) { if (res.statusCode == 200) {
if (res.data.status =='NG'){ if (res.data.status == 'NG' || res.data.status == 'OK') {
Toast('已经发送入圈申请!'); Toast(res.data.result.message);
}
if (res.data.status == 'MEMBER') {
wx.navigateTo({
url: '../circleDetails/circleDetails?circleId=' + circleId,
});
} }
} }
}, },
fail: function (res) { }, fail: function (res) {},
complete: function (res) {}, complete: function (res) {},
}) })
}, },
// 圈子首页获取数据 // 圈子首页获取数据
getCircleTopDat(){ getCircleTopDat() {
var that = this; var that = this;
var config = wx.getStorageSync('config'); var config = wx.getStorageSync('config');
// var location = wx.getStorageSync('location'); // var location = wx.getStorageSync('location');
...@@ -151,7 +161,9 @@ Page({ ...@@ -151,7 +161,9 @@ Page({
data: { data: {
unionId: config.unionId unionId: config.unionId
}, },
header: { 'content-type': 'application/json' }, header: {
'content-type': 'application/json'
},
method: 'GET', method: 'GET',
dataType: 'json', dataType: 'json',
success: function (res) { success: function (res) {
...@@ -162,19 +174,19 @@ Page({ ...@@ -162,19 +174,19 @@ Page({
}) })
} }
}, },
fail: function (res) { }, fail: function (res) {},
complete: function (res) { }, complete: function (res) {},
}) })
}, },
//获取输入框的值 //获取输入框的值
keywordInput(e) { keywordInput(e) {
if(e.detail.value){ if (e.detail.value) {
this.setData({ this.setData({
showImg: false showImg: false
}) })
} }
if(!e.detail.value){ if (!e.detail.value) {
this.setData({ this.setData({
showImg: true showImg: true
}) })
...@@ -185,8 +197,8 @@ Page({ ...@@ -185,8 +197,8 @@ Page({
}, },
//圈子检索 //圈子检索
searchCircle(){ searchCircle() {
if (this.data.keyword == null || this.data.keyword=='') { if (this.data.keyword == null || this.data.keyword == '') {
wx.showToast({ wx.showToast({
title: '请输入关键词', title: '请输入关键词',
icon: 'success', icon: 'success',
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<text>({{item.member_count}}人)</text> <text>({{item.member_count}}人)</text>
</view> </view>
<!-- <van-button type="default" size='mini' bind:click="joinCircle" data-index="{{item.id}}">进圈</van-button> --> <!-- <van-button type="default" size='mini' bind:click="joinCircle" data-index="{{item.id}}">进圈</van-button> -->
<text bindtap="joinCircle" style='display:block;width:50px;height:20px;text-align:center;line-height:20px;border-radius:15px;font-size:12px;background: linear-gradient(to right, #e85c6d, #fb689b);color:#fff' data-index="{{item.id}}">进圈</text> <text bindtap="joinCircle" style='display:block;width:50px;height:20px;text-align:center;line-height:20px;border-radius:15px;font-size:12px;background: linear-gradient(to right, #e85c6d, #fb689b);color:#fff' data-index="{{item.circle_id}}">进圈</text>
</view> </view>
</view> </view>
</view> </view>
......
<!--pages/circleMoment/circleMoment.wxml--> <!--pages/circleMoment/circleMoment.wxml-->
<custom-navi text="圈子动态" back="{{true}}" home="{{true}}" bg1="#fff" bg2="#fff" bg3="#fff"></custom-navi> <custom-navi text="圈子动态" back="{{true}}" home="{{true}}" bg1="#fff" bg2="#fff" bg3="#fff"></custom-navi>
<view class="title">
<view></view>
圈子动态
</view>
<view class='circleMoment'> <view class='circleMoment'>
<view class="momentNewBtn" bindtap="momentNew" wx:if="{{isOwner}}"> <view class="momentNewBtn" bindtap="momentNew" wx:if="{{isOwner}}">
发布动态 发布动态
</view> </view>
<view class="momentItem" wx:for="{{momentList}}" wx:for-item='momentDat'> <view class="momentItem" wx:for="{{momentList}}" wx:for-item='momentDat'>
<view class="comment">{{momentDat.comment}}[{{momentDat.registration_date}}]</view> <view class="momenttitle">
<view class="images"> <view class="comment">{{momentDat.comment}}[{{momentDat.registration_date}}]</view>
<image src='{{item}}' wx:for="{{momentDat.images}}" mode="aspectFit"></image> <view class="actionRow" wx:if="{{isOwner}}">
</view> <view bindtap="deleteMoment" data-index="{{momentDat.id}}">删除</view>
<view class="actionRow" wx:if="{{isOwner}}"> </view>
<image src='../../img/delete.png' mode="widthFix" bindtap="deleteMoment" data-index="{{momentDat.id}}"></image> </view>
</view> <view class="images">
</view> <image src='{{item}}' wx:for="{{momentDat.images}}"></image>
</view>
</view>
</view> </view>
<van-notify id="van-notify" /> <van-notify id="van-notify" />
<van-dialog id="van-dialog" /> <van-dialog id="van-dialog" />
\ No newline at end of file
.title {
display: flex;
flex-direction: row;
align-items: center;
padding: 0 5%;
font-size: 16px;
font-weight: 550;
}
.title view {
height: 20px;
width: 6px;
border-radius: 3px;
margin-right: 10px;
background-color: #9cc64d;
}
.circleMoment { .circleMoment {
margin-top: 10px; margin-top: 10px;
margin-left: 2%; margin-left: 5%;
margin-bottom: 50px; margin-bottom: 50px;
width: 96%; width: 90%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
...@@ -18,13 +36,13 @@ ...@@ -18,13 +36,13 @@
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
border-bottom: 1rpx solid #ccc;
} }
.momentItem .comment { .momentItem .comment {
width: 100%; width: 100%;
line-height: 20px; line-height: 20px;
text-align: left; text-align: left;
color: #929292;
} }
.momentItem .images { .momentItem .images {
...@@ -32,27 +50,33 @@ ...@@ -32,27 +50,33 @@
margin-bottom: 10px; margin-bottom: 10px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between;
align-items: center; align-items: center;
} }
.images>image { .images>image {
height: 75px; width: 30%;
height: 120px;
margin-top: 10px; margin-top: 10px;
margin-right: 5px; margin-right: 5px;
border-radius: 5px;
} }
.momentItem .actionRow { .momentItem .momenttitle {
width: 100%; width: 100%;
margin-bottom: 10px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: flex-end;
align-items: center; align-items: center;
justify-content: space-between;
} }
.momentItem .actionRow>image { .momentItem .actionRow>view {
text-align: center;
width: 60px; width: 60px;
height: 20px;
line-height: 20px;
border-radius: 10px;
color: #fff;
background: #ffa0a5;
} }
.momentNewBtn { .momentNewBtn {
......
...@@ -22,6 +22,7 @@ Page({ ...@@ -22,6 +22,7 @@ Page({
volunteerEventList:[], volunteerEventList:[],
familyEventList:[], familyEventList:[],
mediaList:[], mediaList:[],
newsList:[],
isMember:false, isMember:false,
isvolunteerEventList:false, isvolunteerEventList:false,
ismediaList:false ismediaList:false
...@@ -196,6 +197,7 @@ Page({ ...@@ -196,6 +197,7 @@ Page({
familyEventList: res.data.result.familyEventList, familyEventList: res.data.result.familyEventList,
socialEventList: res.data.result.socialEventList, socialEventList: res.data.result.socialEventList,
mediaList: res.data.result.mediaList, mediaList: res.data.result.mediaList,
newsList: res.data.result.newsList,
isvolunteerEventList: res.data.result.volunteerEventList.length>0?true:false, isvolunteerEventList: res.data.result.volunteerEventList.length>0?true:false,
ismediaList: res.data.result.mediaList.length>0?true:false, ismediaList: res.data.result.mediaList.length>0?true:false,
unreadMessageCount: res.data.result.unreadMessageCount unreadMessageCount: res.data.result.unreadMessageCount
...@@ -213,6 +215,14 @@ Page({ ...@@ -213,6 +215,14 @@ Page({
}) })
}, },
//志愿要闻详情
vNewsDetail(e){
let newsId = e.currentTarget.dataset['index']
wx.navigateTo({
url: '../vNewsDetail/vNewsDetail?newsId=' + newsId,
});
},
//志愿者活动详情 //志愿者活动详情
volunteersEventDetail(e){ volunteersEventDetail(e){
let eventId = e.currentTarget.dataset['index'] let eventId = e.currentTarget.dataset['index']
......
...@@ -93,23 +93,22 @@ ...@@ -93,23 +93,22 @@
</view> </view>
</view> </view>
<view class='listActivity'> <view class='listActivity'>
<view class="activity" bindtap='volunteersEventDetail'> <view class="activity">
<view class='activityContent'> <block wx:for="{{newsList}}">
<!-- <text class="top_title">{{item.status_title}}</text> --> <view class='activityContent' wx:if="{{item.front_image_big}}" bindtap='vNewsDetail' data-index='{{item.id}}'>
<!-- <image src='{{item.front_image}}' mode="widthFix"></image> <image src='{{item.front_image_big}}' mode="widthFix"></image>
<text class="bottom_title">{{item.title}}</text> --> <text class="bottom_title">{{item.title}}</text>
<image src='/img/homePage/1.png' mode="widthFix"></image> </view>
<text class="bottom_title">【志愿精神】武汉一线青年志愿者说:“我愿意...</text> <view class="text1" wx:elif="{{item.front_image_small}}" bindtap='vNewsDetail' data-index='{{item.id}}'>
</view> <view>{{item.title}}</view>
<view class="text1"> <image src='{{item.front_image_small}}'></image>
<view>【志愿精神】与我爱的城市共度抗疫岁月——对话90后志愿者</view> </view>
<image src='/img/homePage/1_1.jpg'></image> <view class="borderLine" wx:if="{{index == 1}}"></view>
</view> <!-- <view class="text2">
<view class="borderLine"></view>
<view class="text2">
<view>【领会精神】吉林青年志愿者宣讲总书记新年贺词,传播新时代奋进强音</view> <view>【领会精神】吉林青年志愿者宣讲总书记新年贺词,传播新时代奋进强音</view>
<image src='/img/homePage/1_2.jpg'></image> <image src='/img/homePage/1_2.jpg'></image>
</view> </view> -->
</block>
</view> </view>
</view> </view>
...@@ -131,15 +130,15 @@ ...@@ -131,15 +130,15 @@
</view> </view>
</view> </view>
<view class='listActivity'> <view class='listActivity'>
<!-- <view class="activity" bindtap='volunteersEventDetail' wx:for="{{volunteerEventList}}" data-index='{{item.id}}' wx:key="{{index}}"> <view class="activity" bindtap='volunteersEventDetail' wx:for="{{volunteerEventList}}" data-index='{{item.id}}' wx:key="{{index}}">
<view class='activityContent'> <view class='activityContent'>
<text class="top_title">{{item.status_title}}</text> <text class="top_title">{{item.status_title}}</text>
<image src='{{item.front_image}}' mode="widthFix"></image> <image src='{{item.front_image}}' mode="widthFix"></image>
<text class="bottom_title">{{item.title}}</text> <text class="bottom_title">{{item.title}}</text>
</view> </view>
<text class="enroll_time">报名截止:{{item.enroll_time}}</text> <text class="enroll_time">报名截止:{{item.enroll_time}}</text>
</view> --> </view>
<view class="activity" bindtap='volunteersEventDetail'> <!-- <view class="activity" bindtap='volunteersEventDetail'>
<view class='activityContent'> <view class='activityContent'>
<text class="top_title">征集中</text> <text class="top_title">征集中</text>
<image src='/img/homePage/2.png' mode="widthFix"></image> <image src='/img/homePage/2.png' mode="widthFix"></image>
...@@ -154,7 +153,7 @@ ...@@ -154,7 +153,7 @@
<text class="bottom_title">周末图书馆清洁活动</text> <text class="bottom_title">周末图书馆清洁活动</text>
</view> </view>
<text class="enroll_time">报名截止:2020.4.21</text> <text class="enroll_time">报名截止:2020.4.21</text>
</view> </view> -->
</view> </view>
<!-- 社会实践 --> <!-- 社会实践 -->
...@@ -217,35 +216,20 @@ ...@@ -217,35 +216,20 @@
<text class="watch">{{item.view_count}}观看</text> <text class="watch">{{item.view_count}}观看</text>
</view> </view>
</view> --> </view> -->
<view class="activity" bindtap='classDetails'> <view class="activity" bindtap='classDetails' wx:for="{{mediaList}}" wx:key="{{index}}" bindtap='classDetails' data-index="{{item.id}}">
<view class='activityContent'> <view class='activityContent'>
<image src='/img/homePage/4.png' mode="widthFix"></image> <image src='{{item.front_image}}' mode="widthFix"></image>
</view> </view>
<view class="class_info"> <view class="class_info">
<view> <view>
<image src="/img/hot.png"></image> <image src="/img/hot.png"></image>
<text>主讲教师:陈老师</text> <text>主讲教师:{{item.teacher}}</text>
</view> </view>
<view> <view>
<image src="/img/shoucang.png"></image> <image src="/img/shoucang.png"></image>
<text>小学课程</text> <text>小学课程</text>
</view> </view>
<text class="watch">10000 观看</text> <text class="watch">{{item.view_count}} 观看</text>
</view>
</view>
<view class="activity" bindtap='classDetails'>
<view class='activityContent'>
<image src='/img/homePage/5.png' mode="widthFix"></image>
</view>
<view class="class_info">
<view>
<text>主讲教师:李老师</text>
</view>
<view>
<image src="/img/shoucang.png"></image>
<text>初中课程</text>
</view>
<text class="watch">10000 观看</text>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -31,7 +31,7 @@ Page({ ...@@ -31,7 +31,7 @@ Page({
//检索志愿者活动列表 //检索志愿者活动列表
wx.request({ wx.request({
url: app.url + 'ajax_get_volunteer_event_list.php', url: app.url + 'ajax_get_volunteer_top_dat.php',
data: { data: {
unionId: config.unionId, unionId: config.unionId,
province: location.province, province: location.province,
......
<!--pages/volunteers/volunteers.wxml--> <!--pages/volunteers/volunteers.wxml-->
<custom-navi text="志愿者活动" back="{{true}}" home="{{true}}"></custom-navi> <custom-navi text="志愿者活动" back="{{true}}" home="{{true}}" bg1="#fff" bg2="#fff" bg3="#fff"></custom-navi>
<view class='volunteers'> <view class='volunteers'>
<text class='volunteersTitle'>所在区域:<text>{{place}}</text></text> <view class="top_title">
<view class='volunteersActive'> <view class='volunteersTitle'>
<view style='font-size:15px;padding-left:15px'> <image src="/img/dingwei1.png"></image>
<image src='../../img/sanjiao.png'></image>志愿者活动 <text>{{place}}</text>
</view> </view>
<view style='font-size:15px;color:#666;padding-right:15px'> <view class='volunteersActive'>
<van-button type="info" size='mini' bind:click="rank1" style='margin-right:8px'>排名</van-button>志愿能力分:<text>{{abilityPoint}}</text> <van-button type="info" size='mini' bind:click="rank1" style='margin-right:8px'>排名</van-button>志愿能力分:<text>{{abilityPoint}}</text>
</view> </view>
</view> </view>
......
/* pages/volunteers/volunteers.wxss */ /* pages/volunteers/volunteers.wxss */
.top_title {
.volunteersTitle{
display: block;
width: 100%;
text-align: left;
font-size: 14px;
box-sizing: border-box;
padding-left: 15px;
margin-top: 20px;
}
.volunteersActive{
display: flex; display: flex;
justify-content: space-between; flex-direction: row;
align-items: center; align-items: center;
margin-top: 20px; justify-content: space-between;
margin-bottom: 10px; padding: 10px 20px;
} }
.volunteersActive>view{
.top_title .volunteersTitle {
display: flex; display: flex;
flex-direction: row;
align-items: center; align-items: center;
} }
.volunteersActive>view>image{
width: 10px; .top_title .volunteersTitle text {
height: 10px; color: #929292;
font-size: 12px;
} }
.left_listVolunteers{
margin-left: 10px; .top_title .volunteersTitle image {
width: 20px;
height: 20px;
margin-right: 10px;
}
.volunteersActive {
color: #929292;
font-size: 12px;
}
.volunteersActive button {
background: #fb689b;
border: none;
border-radius: 10px;
}
.volunteersActive button view {
font-size: 12px;
} }
\ No newline at end of file
...@@ -10,26 +10,27 @@ ...@@ -10,26 +10,27 @@
margin-left: 4%; margin-left: 4%;
margin-bottom: 20px; margin-bottom: 20px;
background: #fff; background: #fff;
border: 1rpx solid #969696; box-shadow: 1px 1px 8px -2px rgba(0, 0, 0, 0.3);
border-radius: 5px; border-radius: 5px;
padding: 20px 0;
} }
.con_activeDetails .row{ .con_activeDetails .row{
width: 100%; /* width: 100%; */
padding:1%; padding-left: 5%;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
text-align: left; text-align: left;
margin-top: 5px; margin-top: 10px;
margin-bottom: 5px; /* margin-bottom: 10px; */
} }
.con_activeDetails .row .titleText{ .con_activeDetails .row .titleText{
display:flex; display:flex;
flex-wrap: nowrap; flex-wrap: nowrap;
color:#4F4F4F; color:#333333;
width:100px; width:100px;
} }
...@@ -37,22 +38,7 @@ ...@@ -37,22 +38,7 @@
display:flex; display:flex;
width:100%; width:100%;
flex-wrap: wrap; flex-wrap: wrap;
color:#969696; color:#333333;
}
.botCon_activeDetails{
width: 100%;
height: 100px;
border-bottom: 1px solid #ccc;
}
.botCon_activeDetails>view{
width: 240px;
float: right;
color: #666;
font-size: 12px;
}
.botCon_activeDetails>view>text{
display: block;
margin-bottom: 5px;
} }
.activebeijing{ .activebeijing{
......
...@@ -94,6 +94,20 @@ ...@@ -94,6 +94,20 @@
"pathName": "pages/circleMoment/circleMoment", "pathName": "pages/circleMoment/circleMoment",
"query": "circleId=6", "query": "circleId=6",
"scene": null "scene": null
},
{
"id": -1,
"name": "pages/volunteersEventDetail/volunteersEventDetail",
"pathName": "pages/volunteersEventDetail/volunteersEventDetail",
"query": "eventId=25",
"scene": null
},
{
"id": -1,
"name": "pages/volunteers/volunteers",
"pathName": "pages/volunteers/volunteers",
"query": "eventId=25",
"scene": null
} }
] ]
} }
......
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