作者 niufei

新增页面

... ... @@ -10,7 +10,9 @@
"pages/result/result",
"pages/close_apply/close_apply",
"pages/my/my_active/my_active",
"pages/index/active/active"
"pages/index/active/active",
"pages/word_report/word_report",
"pages/enroll/enroll"
],
"window": {
"backgroundTextStyle": "light",
... ... @@ -25,13 +27,11 @@
"list": [
{
"pagePath": "pages/index/index",
"text": "",
"iconPath": "imgs/shouye_02@2x.png",
"selectedIconPath": "imgs/shouye_01@2x.png"
},
{
"pagePath": "pages/my/my",
"text": "",
"iconPath": "imgs/wode_01@2x.png",
"selectedIconPath": "imgs/wode_02@2x.png"
}
... ...
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
enroll_arr: ['线上', '线下', '线上及线下'],
cover_type: false
},
show_cover(){
this.setData({
cover_type: true
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
}
\ No newline at end of file
... ...
<view class="info_box">
<view class="item">
<text>姓名</text>
<text>小房房</text>
</view>
<view class="item">
<text>性别</text>
<text>女</text>
</view>
<view class="item">
<text>出生日期</text>
<text>1995-12-27</text>
</view>
<view class="item">
<text>电话</text>
<text>136xxxx7579</text>
</view>
<view class="item">
<view class="left">
<image src="/imgs/must.png" /> 工作类型
</view>
<picker range="{{enroll_arr}}" value="{{enroll}}" bindchange="change_enroll">
<view class="right">
<text>请选择</text>
<image src="/imgs/right.png" />
</view>
</picker>
</view>
<view class="item">
<view class="left">
<image src="/imgs/must.png" /> 工作内容
</view>
<view class="right" bindtap="show_cover">
<text>请选择</text>
<image src="/imgs/right.png" />
</view>
</view>
</view>
<view class="info_box">
<view class="tilte">选择日期</view>
<view class="item">
<view class="left">
<image src="/imgs/must.png" /> 参加日期
</view>
<picker mode="date" value="{{time}}" bindchange="change_time">
<view class="right">
<text>请选择</text>
<image src="/imgs/right.png" />
</view>
</picker>
</view>
<view class="item">
<view class="left">
<image src="/imgs/must.png" /> 参加时间
</view>
<picker mode="time" value="{{time}}" bindchange="change_time">
<view class="right">
<text>请选择</text>
<image src="/imgs/right.png" />
</view>
</picker>
</view>
<view class="add">+添加</view>
</view>
<view class="info_box">
<view class="tilte">申请入住
<text>*仅限工作人员本人</text>
</view>
<view class="item">
<view class="left">
<image src="/imgs/must.png" /> 入住日期
</view>
<picker mode="date" value="{{time}}" bindchange="change_time">
<view class="right">
<text>请选择</text>
<image src="/imgs/right.png" />
</view>
</picker>
</view>
<view class="item">
<text>入住人身份证号码</text>
<text>150xxxxxxxxxxxxxxx</text>
</view>
<view class="add">+添加</view>
</view>
<view class="info_box">
<view class="tilte">申请用餐</view>
<view class="item">
<view class="left">
<image src="/imgs/must.png" /> 用餐日期
</view>
<picker mode="date" value="{{time}}" bindchange="change_time">
<view class="right">
<text>请选择</text>
<image src="/imgs/right.png" />
</view>
</picker>
</view>
<view class="item">
<view class="left">
<image src="/imgs/must.png" /> 用餐时间
</view>
<picker mode="time" value="{{time}}" bindchange="change_time">
<view class="right">
<text>请选择</text>
<image src="/imgs/right.png" />
</view>
</picker>
</view>
<view class="add">+添加</view>
</view>
<view class="cover_box" catchtouchmove="true">
<view class="content_box">
<view class="w_title">选择工作内容</view>
<view class="w_content">
<view class="w_item">摄影(设备自带)</view>
<view class="w_item" style="margin-right:0;">摄像(设备自带)</view>
<view class="w_item">现场服务(签到、指引、礼仪等)</view>
<view class="w_item">爱心车队</view>
</view>
<view class="submit">确认</view>
</view>
</view>
\ No newline at end of file
... ...
page {
height: 100%;
padding-bottom: 120rpx;
}
.info_box {
width: 100%;
padding: 0 32rpx;
border-bottom: 16rpx solid #f5f6f8;
box-sizing: border-box;
}
.item {
width: 100%;
height: 100rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(51, 51, 51, 1);
border-bottom: 2rpx solid #e6e6e6;
box-sizing: border-box;
}
.item:last-child {
border: none;
}
.item text:last-child {
color: #666;
}
.right, .left {
display: flex;
align-items: center;
}
.right text {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(204, 204, 204, 1);
}
.right image {
width: 14rpx;
height: 24rpx;
margin-left: 21rpx;
}
.left image {
width: 18rpx;
height: 18rpx;
margin-right: 10rpx;
}
.tilte {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: rgba(51, 51, 51, 1);
margin-top: 50rpx;
}
.tilte text {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(248, 65, 65, 1);
margin-left: 23rpx;
}
.add {
width: 100%;
height: 100rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(65, 205, 121, 1);
display: flex;
justify-content: center;
align-items: center;
}
.cover_box {
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.3);
position: fixed;
left: 0;
top: 0;
display: flex;
justify-content: center;
align-items: center;
}
.content_box {
width: 595rpx;
/* height: 696rpx; */
background: rgba(255, 255, 255, 1);
border-radius: 10rpx;
/* position: absolute;
left: 0;
right: 0;
top: 50%;
bottom: 50%;
margin: auto; */
padding: 50rpx 32rpx;
box-sizing: border-box;
}
.content_box .w_title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: rgba(51, 51, 51, 1);
text-align: center;
margin-top: 24rpx;
}
.w_content {
width: 100%;
margin-top: 50rpx;
display: flex;
flex-wrap: wrap;
}
.w_item {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(255, 255, 255, 1);
padding: 18rpx 22rpx;
background: rgba(65, 205, 121, 1);
border-radius: 10rpx;
margin-bottom: 30rpx;
margin-right: 18rpx;
border: 1px solid #ccc;
}
.submit {
width: 100%;
height: 88rpx;
background: rgba(65, 205, 121, 1);
border-radius: 10rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
margin-top: 34rpx;
}
... ...
... ... @@ -9,7 +9,7 @@ Page({
*/
data: {
cover_type: false,
enroll_arr: ['线上', '线下', '线上线下'],
enroll_arr: ['线上', '线下', '线上线下'],
enroll: '请选择报名方式',
starTime: '请选择开始时间',
endTime: '请选择结束时间',
... ... @@ -18,117 +18,117 @@ Page({
status: ''
},
// 选择报名方式
selectenroll(e) {
let that = this
that.setData({
enroll: that.data.enroll_arr[e.detail.value],
enroll_id: Number(e.detail.value) + 1
})
if (e.detail.value == 0) {
that.setData({
ztype: 0
})
} else {
that.setData({
ztype: 1
})
}
// selectenroll(e) {
// let that = this
// that.setData({
// enroll: that.data.enroll_arr[e.detail.value],
// enroll_id: Number(e.detail.value) + 1
// })
// if (e.detail.value == 0) {
// that.setData({
// ztype: 0
// })
// } else {
// that.setData({
// ztype: 1
// })
// }
},
selecte_startTime(e) {
this.setData({
starTime: e.detail.value
})
},
selecte_endTime(e) {
this.setData({
endTime: e.detail.value
})
},
// },
// selecte_startTime(e) {
// this.setData({
// starTime: e.detail.value
// })
// },
// selecte_endTime(e) {
// this.setData({
// endTime: e.detail.value
// })
// },
change_cover: function() {
this.setData({
cover_type: false
})
},
// change_cover: function() {
// this.setData({
// cover_type: false
// })
// },
//报名
submit: function() {
let that = this
if (that.data.enroll == '请选择报名方式') {
wx.showToast({
title: '请选择报名方式',
icon: 'none',
duration: 1000
})
return false
}
if (that.data.enroll_id != 1) {
if (that.data.starTime == '请选择开始时间') {
wx.showToast({
title: '请选择开始时间',
icon: 'none',
duration: 1000
})
return false
}
if (that.data.endTime == '请选择结束时间') {
wx.showToast({
title: '请选择结束时间',
icon: 'none',
duration: 1000
})
return false
}
} else {
}
let head = {
'XX-Token': wx.getStorageSync('token')
}
let url = '/index/index/applyJoin';
let params = {}
if (that.data.enroll_id != 1){
params = {
id: that.data.id,
type: that.data.enroll_id,
start_time: that.data.starTime,
end_time: that.data.endTime
}
}else{
params = {
id: that.data.id,
type: that.data.enroll_id,
start_time: '',
end_time: ''
}
}
// submit: function() {
// let that = this
// if (that.data.enroll == '请选择报名方式') {
// wx.showToast({
// title: '请选择报名方式',
// icon: 'none',
// duration: 1000
// })
// return false
// }
// if (that.data.enroll_id != 1) {
// if (that.data.starTime == '请选择开始时间') {
// wx.showToast({
// title: '请选择开始时间',
// icon: 'none',
// duration: 1000
// })
// return false
// }
// if (that.data.endTime == '请选择结束时间') {
// wx.showToast({
// title: '请选择结束时间',
// icon: 'none',
// duration: 1000
// })
// return false
// }
// } else {
// }
// let head = {
// 'XX-Token': wx.getStorageSync('token')
// }
// let url = '/index/index/applyJoin';
// let params = {}
// if (that.data.enroll_id != 1){
// params = {
// id: that.data.id,
// type: that.data.enroll_id,
// start_time: that.data.starTime,
// end_time: that.data.endTime
// }
// }else{
// params = {
// id: that.data.id,
// type: that.data.enroll_id,
// start_time: '',
// end_time: ''
// }
// }
app.post(url, params, head).then((res) => {
wx.showToast({
title: '提交成功',
duration: 1000,
success: (res) => {
let t = setInterval((res) => {
clearInterval(t)
wx.switchTab({
url: '/pages/index/index',
})
}, 1000)
}
})
// app.post(url, params, head).then((res) => {
// wx.showToast({
// title: '提交成功',
// duration: 1000,
// success: (res) => {
// let t = setInterval((res) => {
// clearInterval(t)
// wx.switchTab({
// url: '/pages/index/index',
// })
// }, 1000)
// }
// })
}).catch((err) => {
// }).catch((err) => {
})
// })
},
// },
// 展示报名弹窗
enroll() {
this.setData({
cover_type: true
})
},
// enroll() {
// this.setData({
// cover_type: true
// })
// },
/**
* 获取设备信息
*/
... ...
... ... @@ -10,28 +10,33 @@
</view>
<view class='memberbox' wx:if='{{datalist.join.length>0 && type != 1}}'>
<view class='title'>已成功报名人员</view>
<view class='member' wx:for='{{datalist.join}}' wx:key=''>
<image src='{{item.photo}}'></image>
<view>{{item.name}}</view>
<view class='member' wx:for='{{datalist.join}}' wx:key='index'>
<view class="top">
<image src='{{item.photo}}' mode="aspectFill" />
<text>{{item.name}}</text>
</view>
<view class="duty">{{item.duty}}</view>
</view>
</view>
</view>
<view wx:if="{{type!= 1}}">
<view class='foot' bindtap='enroll' wx:if='{{datalist.button_status == 1}}'>报名</view>
<view class='foot' wx:if='{{datalist.button_status == 2}}' style='background: #FFD700; color: #fff;'>待审核</view>
<view class='foot' bindtap='sign' wx:if='{{datalist.button_status == 3}}'>签到</view>
<view class='foot' wx:if='{{datalist.button_status == 4}}' style='background: #ccc;color: #fff;'>已签到</view>
<navigator class='foot' url="/pages/word_report/word_report">报名</navigator>
<!-- <navigator class='foot' url="/pages/word_report/word_report">报名</navigator> -->
<!-- <view class='foot' bindtap='enroll' wx:if='{{datalist.button_status == 1}}'>报名</view> -->
<!-- <view class='foot' wx:if='{{datalist.button_status == 2}}' style='background: #FFD700; color: #fff;'>待审核</view> -->
<view class='foot' bindtap='sign' wx:if='{{datalist.button_status == 3}}'>签到工作汇报</view>
<view class='foot' wx:if='{{datalist.button_status == 4}}' style='background: #ccc;color: #fff;'>已签到工作汇报</view>
<view class='foot' wx:if='{{datalist.button_status == 5}}' style='background: #ccc;color: #fff;'>已结束</view>
<navigator url='/pages/result/result' class='foot' wx:if='{{datalist.button_status == 6}}'>成为志愿者</navigator>
<view class='cover' style='width:100%;height:{{height}};' wx:if='{{cover_type}}'>
<view class='toast_box'>
<view class='cover_box' >
<view class='cover_box'>
<view class='title'>报名方式</view>
<image src='/imgs/del.png' class='close' bindtap='change_cover'></image>
<picker range='{{enroll_arr}}' bindchange='selectenroll' value='{{enroll}}'>
<view class="enroll ">
<view class="enroll">
{{enroll}}
</view>
</picker>
... ... @@ -53,4 +58,11 @@
</view>
</view>
<view class="btn_box">
<navigator class="btn-item" style="background: url('/imgs/index.png') no-repeat center;background-size: cover;" url="/pages/index/index" open-type="switchTab">首页</navigator>
<view class="btn-item" style="background: url('/imgs/edit.png') no-repeat center;background-size: cover;">编辑</view>
<view class="btn-item" style="background: url('/imgs/out.png') no-repeat center;background-size: cover;">退出</view>
<button class="btn-item" style="background: url('/imgs/share.png') no-repeat center;background-size: cover;" plain="true" open-type="share">分享</button>
</view>
\ No newline at end of file
... ...
... ... @@ -63,41 +63,77 @@ page {
color: #333;
font-size: 32rpx;
font-weight: bold;
padding: 0 0 0 13rpx;
box-sizing: border-box;
margin-bottom: 20rpx;
position: relative;
}
.memberbox .title::after {
position: absolute;
content: '';
top: 50%;
transform: translateY(-50%);
left: 0;
width: 4rpx;
height: 32rpx;
background: #21ae59;
}
.member {
width: 170rpx;
width: 200rpx;
margin-bottom: 20rpx;
display: flex;
flex-wrap: wrap;
justify-content: center;
margin-right: 35rpx;
}
.member image {
width: 120rpx;
height: 120rpx;
.member:nth-child(3n) {
margin-right: 0;
}
.member view {
.member .top {
width: 100%;
display: flex;
align-items: center;
}
.member .top image {
width: 76rpx;
height: 76rpx;
border-radius: 50%;
margin-right: 18rpx;
}
.member .top text {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(51, 51, 51, 1);
}
.member .duty {
width: 100%;
padding: 0 10rpx;
box-sizing: border-box;
color: #ccc;
font-size: 26rpx;
text-align: center;
font-family: PingFang SC;
font-weight: 500;
color: rgba(153, 153, 153, 1);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-top: 16rpx;
}
.cover{
.cover {
position: fixed;
left: 0;
top: 0;
z-index: 2;
background: rgba(0,0,0,0.6);
background: rgba(0, 0, 0, 0.6);
}
.cover_box{
.cover_box {
width: 600rpx;
height: auto;
border-radius: 10rpx;
... ... @@ -107,7 +143,8 @@ page {
margin: auto;
position: relative;
}
.cover_box .title{
.cover_box .title {
width: 500rpx;
text-align: center;
color: #333;
... ... @@ -115,7 +152,8 @@ page {
font-weight: bold;
margin: 50rpx auto 0;
}
.enroll,.time{
.enroll, .time {
width: 500rpx;
height: 80rpx;
border: 2rpx solid #eee;
... ... @@ -128,20 +166,24 @@ page {
border-radius: 10rpx;
text-align: left;
}
.time{
.time {
margin-top: 50rpx;
}
.active{
margin-top: 70rpx ! important;
.active {
margin-top: 70rpx !important;
}
.close{
.close {
width: 50rpx;
height: 50rpx;
position: absolute;
right: 10rpx;
top: 10rpx;
}
.sub_bnt{
.sub_bnt {
width: 86%;
height: 80rpx;
display: flex;
... ... @@ -150,12 +192,40 @@ page {
margin: 0 auto;
border-radius: 10rpx;
background: #21ae59;
color: #FFF;
color: #fff;
margin-top: 80rpx;
font-size: 32rpx;
}
.toast_box{
.toast_box {
height: 100%;
width: 100%;
display: flex;
}
\ No newline at end of file
}
.btn_box {
width: 100rpx;
height: auto;
position: fixed;
right: 48rpx;
bottom: 142rpx;
background: rgba(255, 255, 255, 0);
display: flex;
flex-wrap: wrap;
}
.btn-item {
width: 100rpx;
height: 100rpx;
border: none !important;
line-height: 1 !important;
padding: 63rpx 0 0;
box-sizing: border-box;
border-radius: 50%;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(255, 255, 255, 1) !important;
text-align: center;
margin: 40rpx 0 0;
}
... ...
... ... @@ -37,9 +37,9 @@ Page({
that.setData({
datalist: res,
activity: res.activity,
// activity_page: res.activity_page,
news: res.news
})
console.log(that.data.datalist)
} else {
that.setData({
news: that.data.news.concat(res.news)
... ...
<!-- 轮播图 -->
<swiper indicator-dots="true" autoplay="true" indicator-color='#8C9194' indicator-active-color='#ffffff' class="slide-image">
<navigator wx:for="{{datalist.slide}}" wx:key hover-class="none" url='/pages/img_txt/img_txt?id={{item.activity_id}}&status=1'>
<swiper-item>
<image src="{{item.image}}" mode="aspectFill" />
</swiper-item>
</navigator>
</swiper>
<view class='vold_line'></view>
<!-- <scroll-view scroll-y='true' bindscrolltolower='getdatalist' style='height:{{scroll_height}}rpx'> -->
<swiper indicator-dots="true" autoplay="true" indicator-color='#8C9194' indicator-active-color='#ffffff' class="slide-image">
<navigator wx:for="{{datalist.slide}}" wx:key hover-class="none" url='/pages/img_txt/img_txt?id={{item.activity_id}}&status=1'>
<swiper-item>
<image src="{{item.image}}" />
</swiper-item>
</navigator>
</swiper>
<view class='vold_line'></view>
<view class='index_volunteertitle'>
<view class='title'>志愿者</view>
<navigator url='/pages/more/more' hover-class="none">更多</navigator>
</view>
<view class='volunteerbox'>
<view class='volunteercell' wx:for='{{datalist.volunteer}}' wx:key id='{{item.id}}'>
<view class='cell_top'>
<view class='cellimg'>
<image src='{{item.photo?item.photo:"https://volunteer.cnpu.org/imgs/wode_02@2x.png"}}'></image>
</view>
<view>{{item.name}}</view>
<!-- 志愿者列表 -->
<view class='index_volunteertitle'>
<view class='title'>志愿者</view>
<navigator url='/pages/more/more' hover-class="none">更多</navigator>
</view>
<view class='volunteerbox'>
<view class='volunteercell' wx:for='{{datalist.volunteer}}' wx:key="index" id='{{item.id}}' wx:if="{{index<=1}}">
<view class='cell_top'>
<view class='cellimg'>
<image src='{{item.photo?item.photo:"https://volunteer.cnpu.org/imgs/wode_02@2x.png"}}' mode="aspectFill" />
</view>
<view>{{item.duty}}</view>
<view class='star_box'>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>0}}'></image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>1}}'></image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>2}}'></image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>3}}'></image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>4}}'></image>
<view class="c_right">
<view class="name">{{item.name}}</view>
<view class="province">{{item.province}}</view>
<view class='star_box'>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>0}}'></image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>1}}'></image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>2}}'></image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>3}}'></image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>4}}'></image>
</view>
</view>
</view>
</view>
<view class='vold_line'></view>
</view>
<view class='vold_line'></view>
<view class='index_newbox'>
<view class='index_newbox'>
<view class='index_volunteertitle'>
<view class='title'>即将开始的活动</view>
<navigator url='/pages/index/active/active' hover-class="none">更多</navigator>
</view>
<view class='index_volunteertitle'>
<view class='title'>活动快讯</view>
<navigator url='/pages/index/active/active' hover-class="none">更多</navigator>
</view>
<view>
<view class='new_box'>
<navigator class='new_cell' wx:for='{{activity}}' wx:key url='/pages/img_txt/img_txt?id={{item.id}}&status=1' hover-class="none">
<view class='new_cellmain'>
<view class='new_img'>
<image src='{{item.thumbnail}}'> </image>
</view>
<view class='new_title'>{{item.activity_name}}</view>
<view class='title_box'>
<view class='wz_box'>
<image src='/imgs/dizhi@2x.png' />
<text>{{item.province_name}}</text>
</view>
<view class='word'>{{item.type_name}}</view>
<view>
<view class='new_box'>
<navigator class='new_cell' wx:for='{{activity}}' wx:key url='/pages/img_txt/img_txt?id={{item.id}}&status=1' hover-class="none">
<view class='new_cellmain'>
<view class='new_img'>
<image src='{{item.thumbnail}}' mode="aspectFill" />
</view>
<view class='new_title'>{{item.activity_name}}</view>
<view class='title_box'>
<view class='wz_box'>
<text>{{item.time}}</text>
</view>
<view>{{item.time}}</view>
<view class='word'>{{item.province_name}}</view>
</view>
</navigator>
</view>
</view>
</navigator>
</view>
</view>
</view>
<view class='index_newbox'>
<view class='title activity_title'>活动快讯</view>
<view>
<view class='new_box'>
<navigator class='new_cell' wx:for='{{news}}' wx:key url='/pages/img_txt/img_txt?id={{item.id}}&status=1&type=1' hover-class="none">
<view class='new_cellmain'>
<view class='new_img'>
<image src='{{item.thumbnail}}'> </image>
</view>
<view class='new_title'>{{item.activity_name}}</view>
<view>{{item.time}}</view>
</view>
</navigator>
<view class='index_newbox' wx:if="{{news.length>0}}">
<view class='title activity_title'>活动回顾</view>
<view class="review_box">
<navigator class="r_item" wx:for='{{news}}' wx:key="index" url='/pages/img_txt/img_txt?id={{item.id}}&status=1&type=1' hover-class="none">
<view class="r_left">
<view class="r_title">{{item.activity_name}}</view>
<view class="r_info">
<text>活动时间:{{item.time}}</text>
<text>地区:{{item.province_name}}</text>
</view>
</view>
</view>
<image src="/imgs/right.png" class="r_right" />
</navigator>
</view>
<!-- </scroll-view> -->
\ No newline at end of file
</view>
\ No newline at end of file
... ...
... ... @@ -42,27 +42,28 @@
font-size: 26rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.volunteercell {
width: 33%;
padding: 30rpx 0;
width: 48%;
padding: 56rpx 0;
box-sizing: border-box;
}
.cell_top {
display: flex;
align-items: center;
color: #333;
font-size: 29rpx;
}
.cellimg {
display: flex;
align-items: cneter;
justify-content: center;
margin: 0 18rpx 16rpx 0;
width: 76rpx;
height: 76rpx;
margin-right: 19rpx;
width: 100rpx;
height: 100rpx;
border-radius: 50%;
overflow: hidden;
}
... ... @@ -73,6 +74,30 @@
display: block;
}
.c_right {
width: 210rpx;
}
.c_right .name {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(51, 51, 51, 1);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.c_right .province {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(153, 153, 153, 1);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.index_newbox {
margin: 32rpx 0rpx 0 0rpx;
}
... ... @@ -137,25 +162,21 @@
.title_box {
margin: 18rpx 0 13rpx 0;
color: #292929;
font-size: 28rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(153, 153, 153, 1);
display: flex;
align-items: center;
justify-content: space-between;
}
.title_box image {
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
}
.wz_box{
overflow: hidden;
.wz_box {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.title_box .word {
max-width: 200rpx;
color: #666;
... ... @@ -168,20 +189,61 @@
.star_box {
width: auto;
height: auto;
margin-top: 16rpx;
}
.star_box image {
width: 28rpx;
height: 26rpx;
padding-left: 5rpx;
padding-right: 5rpx;
}
.star_box image:first-child {
padding-left: 0;
width: 18rpx;
height: 18rpx;
padding-right: 10rpx;
}
.star_box image:last-child {
padding-right: 0;
}
.review_box {
width: 100%;
margin-top: 23rpx;
padding: 0 32rpx;
box-sizing: border-box;
}
.r_item {
width: 100%;
padding: 33rpx 0 27rpx;
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2rpx solid #E6E6E6;
}
.r_item:last-child{
border-bottom: none;
}
.r_item .r_left {
width: 637rpx;
}
.r_item .r_left .r_title {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(41, 41, 41, 1);
}
.r_item .r_left .r_info {
width: 100%;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(153, 153, 153, 1);
}
.r_item .r_left .r_info text:first-child {
margin-right: 78rpx;
}
.r_item .r_right {
width: 14rpx;
height: 24rpx;
}
... ...
// pages/more/more.js
const app = getApp();
Page({
... ... @@ -6,13 +6,16 @@ Page({
* 页面的初始数据
*/
data: {
star_num: 3,
page: 0,
pageNum: 24,
volunteer: ''
volunteer: [],
page_type: false
},
getdatalist() {
let that = this;
wx.showLoading({
title: '加载中',
})
let that = this
let head = {
'XX-Token': wx.getStorageSync('token')
}
... ... @@ -22,27 +25,47 @@ Page({
pageNum: that.data.pageNum
}
app.post(url, params, head).then((res) => {
let volunteer = res.volunteer;
let volunteer = res.volunteer
let datavolunteer = this.data.volunteer;
let tem = [];
let temvolunteer = [];
for (let i = 0; i < volunteer.length; i++) {
tem.push(volunteer[i]);
if ((i + 1) != volunteer.length) {
if ((i + 1) % 3 == 0) {
if (volunteer.length > 0){
for (let i = 0; i < volunteer.length; i++) {
tem.push(volunteer[i]);
if ((i + 1) != volunteer.length) {
if ((i + 1) % 2 == 0) {
temvolunteer.push(tem);
tem = [];
}
} else {
temvolunteer.push(tem);
tem = [];
}
}
let setvolunteer = datavolunteer.concat(temvolunteer)
if (that.data.page == 0){
wx.hideLoading()
that.setData({
volunteer: setvolunteer,
page: res.page
})
} else {
temvolunteer.push(tem);
tem = [];
setTimeout(()=>{
wx.hideLoading()
that.setData({
volunteer: setvolunteer,
page: res.page
})
},1000)
}
} else {
wx.hideLoading()
that.setData({
page_type: true
})
}
let setvolunteer = datavolunteer.concat(temvolunteer);
that.setData({
volunteer: setvolunteer,
page: res.page
})
}).catch((err) => {
})
... ... @@ -51,11 +74,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
let windowHeight = wx.getSystemInfoSync().windowHeight; // 屏幕的高度
let windowWidth = wx.getSystemInfoSync().windowWidth // 屏幕的宽度
this.setData({
scroll_height: windowHeight * 750 / windowWidth
})
this.getdatalist()
},
/**
... ... @@ -69,12 +88,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {
let that = this;
that.setData({
volunteer: [],
page: 0
})
that.getdatalist();
},
... ... @@ -103,7 +117,16 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
let that = this
if (that.data.page_type) {
wx.showToast({
title: '暂无更多数据',
icon: 'none',
duration: 1000
})
return
}
that.getdatalist()
},
/**
... ...
<!--pages/more/more.wxml-->
<scroll-view scroll-y='true' bindscrolltolower='getdatalist' style='height:{{scroll_height}}rpx'>
<bolck wx:for='{{volunteer}}' wx:key>
<view class='volunteerbox'>
<view class='volunteercell' wx:for='{{item}}' wx:key>
<view class='cell_top'>
<view class='cellimg'>
<image src='{{item.photo?item.photo:"https://volunteer.cnpu.org/imgs/wode_02@2x.png"}}'></image>
<image src='{{item.photo?item.photo:"https://volunteer.cnpu.org/imgs/wode_02@2x.png"}}' mode="aspectFill" />
</view>
<view class="c_right">
<view class="name">{{item.name}}</view>
<view class="province">{{item.province}}</view>
<view class='star_box'>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>0}}'></image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>1}}'></image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>2}}'></image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>3}}'></image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>4}}'></image>
</view>
</view>
<view>{{item.name}}</view>
</view>
<view>{{item.duty}}
</view>
<view class='star_box'>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>0}}'></image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>1}}'></image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>2}}'></image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>3}}'></image>
<image src="/imgs/xingxing_xuanzhong_icon@2x.png" mode='scaleToFill' wx:if='{{item.level>4}}'></image>
</view>
</view>
</view>
<view class='vold_line'></view>
</bolck>
</scroll-view>
\ No newline at end of file
... ...
/* pages/more/more.wxss */
@import '../index/index.wxss';
.volunteerbox {
justify-content:space-between;
flex-wrap: wrap;
margin: 0 50rpx;
}
.volunteercell{
width:33.333%;
padding:30rpx 0rpx;
}
.star_box {
width: auto;
height: auto;
margin-top: 16rpx;
}
.star_box image {
width: 28rpx;
height: 26rpx;
padding-left: 5rpx;
padding-right: 5rpx;
}
.star_box image:first-child{
padding-left: 0;
}
.star_box image:last-child{
padding-right: 0;
}
\ No newline at end of file
justify-content: space-between;
flex-wrap: wrap;
margin: 0 50rpx;
}
.volunteercell {
width: 48%;
padding: 48rpx 0 52rpx;
display: flex;
align-items: center;
}
... ...
<!--pages/start/start.wxml-->
<view class='start'>
<view class='start_main'>
<view class='start_mainimg'>
<image src='../../imgs/renwu@2x.png'></image>
</view>
<view class='start_bigtxt'>白求恩志愿者服务队</view>
<view class='start_minitxt'>Bethune Volunteer Service Team</view>
</view>
<button class='start_btn' open-type='getUserInfo' bindgetuserinfo='start'>立即开启</button>
<image src='../../imgs/qidongye_bg@2x.png'></image>
</view>
<view class='start_main'>
<view class='start_mainimg'>
<image src='../../imgs/renwu@2x.png'></image>
</view>
<view class='start_bigtxt'>白求恩志愿者服务队</view>
<view class='start_minitxt'>Bethune Volunteer Service Team</view>
</view>
<button class='start_btn' open-type='getUserInfo' bindgetuserinfo='start'>立即开启</button>
<image src='../../imgs/qidongye_bg@2x.png'></image>
</view>
\ No newline at end of file
... ...
// pages/word_report/word_report.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"navigationBarTitleText": "工作汇报表"
}
\ No newline at end of file
... ...
<view class="info_box">
<view class="item">
<text>姓名</text>
<text>小房房</text>
</view>
<view class="item">
<text>工作内容</text>
<text>摄影(设备自带) 爱心车队</text>
</view>
<view class="item">
<text>参加日期</text>
<text>2019-07-27</text>
</view>
<view class="item">
<text>参加时间</text>
<text>上午</text>
</view>
</view>
<view class="img_box">
<view class="title">图片上传</view>
<view class="img_arr">
<image class="img_item" src="/imgs/add_img.png" mode="aspectFill" />
<image class="img_item" src="/imgs/add_img.png" mode="aspectFill" />
<image class="img_item" src="/imgs/add_img.png" mode="aspectFill" />
<image class="img_item" src="/imgs/add_img.png" mode="aspectFill" />
</view>
</view>
<view class="word_box">
<view class="title">
<image src="/imgs/must.png" /> 感想汇报
</view>
<textarea class="word" placeholder="请输入内容,内容最多500字" bindinput="get_word" value="{{word}}" />
</view>
<view class="submit" bindtap="submit">确认</view>
\ No newline at end of file
... ...
page{
padding-bottom: 120rpx;
}
.info_box {
width: 100%;
padding: 0 32rpx;
border-bottom: 16rpx solid #f5f6f8;
box-sizing: border-box;
}
.item {
width: 100%;
height: 100rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(51, 51, 51, 1);
border-bottom: 2rpx solid #e6e6e6;
box-sizing: border-box;
}
.item:last-child {
border: none;
}
.item text:last-child {
color: #666;
}
.img_box, .word_box {
widows: 100%;
padding: 0 32rpx;
box-sizing: border-box;
}
.title {
width: 100%;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(51, 51, 51, 1);
padding: 37rpx 0;
box-sizing: border-box;
display: flex;
align-items: center;
}
.title image {
width: 18rpx;
height: 18rpx;
margin-right: 10rpx;
}
.img_arr {
width: 100%;
}
.img_item {
width: 200rpx;
height: 200rpx;
margin-right: 42rpx;
margin-bottom: 42rpx;
}
.img_item:nth-child(3n) {
margin-right: 0;
}
.word {
width: 100%;
height: 273rpx;
border: 1px solid rgba(229, 229, 229, 1);
border-radius: 10rpx;
padding: 28rpx;
box-sizing: border-box;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(204, 204, 204, 1);
}
.submit{
width:686rpx;
height:88rpx;
background:rgba(65,205,121,1);
border-radius:10rpx;
font-size:32rpx;
font-family:PingFang SC;
font-weight:500;
color:rgba(255,255,255,1);
display: flex;
justify-content: center;
align-items: center;
margin: 164rpx auto 0;
}
\ No newline at end of file
... ...
... ... @@ -38,9 +38,27 @@
"currentL": -1,
"list": []
},
"miniprogram": {
"gamePlugin": {
"current": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": [
{
"id": -1,
"name": "工作计划表",
"pathName": "pages/word_report/word_report",
"query": "",
"scene": null
},
{
"id": -1,
"name": "dada",
"pathName": "pages/enroll/enroll",
"scene": null
}
]
}
}
}
\ No newline at end of file
... ...
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}
\ No newline at end of file
... ...