作者 niufei

志愿修改

<!--pages/apply/apply.wxml-->
<view class='upimg' bindtap='{{ifempower?"uploadImages":""}}' data-tem='1'>
<button open-type='getUserInfo' bindgetuserinfo='start' class='inofbtn' if='{{!ifempower}}' data-tem='1'></button>
<image src='{{photo}}' wx:if='{{photo}}'></image>
<view class='iconfont icon-xiangji' wx:if='{{!photo}}' ></view>
<view class='avator_box'>
<view class='upimg' bindtap='{{ifempower?"uploadImages":""}}' data-tem='1'>
<button open-type='getUserInfo' bindgetuserinfo='start' class='inofbtn' if='{{!ifempower}}' data-tem='1'></button>
<image src='{{photo}}' wx:if='{{photo}}'></image>
<view class='iconfont icon-xiangji' wx:if='{{!photo}}'></view>
</view>
<view class='tips_word'>请选择1:1的图像</view>
</view>
<view class='apply_item'>
<view>姓名</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setname' value='{{name}}' ></input>
</view>
</view>
<picker bindchange="bindsex" range="{{arraysex}}">
<view class='apply_item'>
<view >姓别</view>
<view>姓名</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{arraysex[sex-1]?"color333":""}}'>{{arraysex[sex-1]?arraysex[sex-1]:'请选择'}}</view>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setname' value='{{name}}'></input>
</view>
</view>
<picker bindchange="bindsex" range="{{arraysex}}">
<view class='apply_item'>
<view>姓别</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{arraysex[sex-1]?"color333":""}}'>{{arraysex[sex-1]?arraysex[sex-1]:'请选择'}}</view>
</view>
</view>
</view>
</picker>
<picker mode='date' bindchange="bindbirthdayChange" end='{{enddata}}'>
<view class='apply_item'>
<view>出生日期</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{birthday?"color333":""}}'>{{birthday?birthday:'请选择'}}</view>
<view class='apply_item'>
<view>出生日期</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{birthday?"color333":""}}'>{{birthday?birthday:'请选择'}}</view>
</view>
</view>
</view>
</picker>
<picker range='{{nationarr}}' bindchange="bindnationChange">
<view class='apply_item' >
<view>民族</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{nation?"color333":""}}'>{{nation?nation:'请选择'}}</view>
<view class='apply_item'>
<view>民族</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{nation?"color333":""}}'>{{nation?nation:'请选择'}}</view>
</view>
</view>
</view>
</picker>
<picker range='{{educationarr}}' bindchange="bindeducationChange">
<view class='apply_item'>
<view>学历</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{education?"color333":""}}'>{{education?education:'请选择'}}</view>
<view class='apply_item'>
<view>学历</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{education?"color333":""}}'>{{education?education:'请选择'}}</view>
</view>
</view>
</view>
</picker>
<picker range='{{politicsarr}}' bindchange="bindpoliticsChange">
<view class='apply_item'>
<view>政治面貌</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{politics?"color333":""}} '>{{politics?politics:'请选择'}}</view>
<view class='apply_item'>
<view>政治面貌</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{politics?"color333":""}} '>{{politics?politics:'请选择'}}</view>
</view>
</view>
</view>
</picker>
<view class='apply_item'>
<view>工作单位</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setunit' value='{{unit}}'></input>
</view>
<view>工作单位</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setunit' value='{{unit}}'></input>
</view>
</view>
<view class='apply_item'>
<view>职务</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setduty' value='{{duty}}'></input>
</view>
<view>职务</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setduty' value='{{duty}}'></input>
</view>
</view>
<view class='apply_item'>
<view>通讯地址</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setaddr' value='{{addr}}'></input>
</view>
<view>通讯地址</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setaddr' value='{{addr}}'></input>
</view>
</view>
<view class='apply_item'>
<view>邮编</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setpostcode' value='{{postcode}}'></input>
</view>
<view>邮编</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setpostcode' value='{{postcode}}'></input>
</view>
</view>
<view class='apply_item'>
<view>就读/毕业院校</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setschool' value='{{school}}'></input>
</view>
<view>就读/毕业院校</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setschool' value='{{school}}'></input>
</view>
</view>
<view class='apply_item'>
<view>身份证号</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setcard_number' value='{{card_number}}'></input>
</view>
<view>身份证号</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setcard_number' value='{{card_number}}'></input>
</view>
</view>
<!-- <view class='apply_item'>
<view>固定电话</view>
... ... @@ -98,150 +105,149 @@
</view>
</view> -->
<view class='apply_item'>
<view>移动电话</view>
<view class='apply_item_input'>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='setmove_phone' value='{{move_phone}}'></input>
</view>
<view>移动电话</view>
<view class='apply_item_input'>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='setmove_phone' value='{{move_phone}}'></input>
</view>
</view>
<view class='apply_item'>
<view>电子邮箱</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setemail' value='{{email}}'></input>
</view>
<view>电子邮箱</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' bindinput='setemail' value='{{email}}'></input>
</view>
</view>
<view class='apply_item big_item'>
<view>紧急联系人及电话</view>
<view class='apply_item_input'>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='seturgency_phone' value='{{urgency_phone}}'></input>
</view>
<view>紧急联系人及电话</view>
<view class='apply_item_input'>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='seturgency_phone' value='{{urgency_phone}}'></input>
</view>
</view>
<view class='apply_item'>
<view>QQ号码</view>
<view class='apply_item_input'>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='setqq' value='{{qq}}'></input>
</view>
<view>QQ号码</view>
<view class='apply_item_input'>
<input placeholder='未填写' type='number' placeholder-class='input_p' bindinput='setqq' value='{{qq}}'></input>
</view>
</view>
<view class='apply_item' bindtap='setshowapply'>
<view class='apply_item' bindtap='setshowapply'>
<view>服务区域</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{address?"color333":""}}'>{{address?address:'请选择'}}</view>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{address?"color333":""}}'>{{address?address:'请选择'}}</view>
</view>
</view>
</view>
<picker range='{{typearr}}' bindchange="bindtypeChange">
<view class='apply_item'>
<view>志愿类别</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{typearr[type-1]?"color333":""}}'>{{typearr[type-1]?typearr[type-1]:'请选择'}}</view>
<view class='apply_item'>
<view>志愿类别</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{typearr[type-1]?"color333":""}}'>{{typearr[type-1]?typearr[type-1]:'请选择'}}</view>
</view>
</view>
</view>
</picker>
<view class='apply_nav'>
<view class='apply_cell {{apply_nav==0?"apply_active":""}}' data-apply_nav='0' bindtap='setapply_nav'>个人履历1</view>
<view class='apply_cell {{apply_nav==1?"apply_active":""}}' data-apply_nav='1' bindtap='setapply_nav'>个人履历2</view>
<view class='apply_cell {{apply_nav==2?"apply_active":""}}' data-apply_nav='2' bindtap='setapply_nav'>个人履历3</view>
<view class='apply_cell {{apply_nav==0?"apply_active":""}}' data-apply_nav='0' bindtap='setapply_nav'>个人履历1</view>
<view class='apply_cell {{apply_nav==1?"apply_active":""}}' data-apply_nav='1' bindtap='setapply_nav'>个人履历2</view>
<view class='apply_cell {{apply_nav==2?"apply_active":""}}' data-apply_nav='2' bindtap='setapply_nav'>个人履历3</view>
</view>
<view class='navbox'>
<picker mode='date' bindchange="bindstartChange">
<view class='apply_item'>
<view>开始时间</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{record[apply_nav].record_start_time?"color333":""}}'>{{record[apply_nav].record_start_time?record[apply_nav].record_start_time:'请选择'}}</view>
</view>
</view>
</picker>
<picker mode='date' bindchange="bindendChange">
<view class='apply_item'>
<view>结束时间</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{record[apply_nav].record_end_time?"color333":""}}'>{{record[apply_nav].record_end_time?record[apply_nav].record_end_time:'请选择'}}</view>
</view>
</view>
</picker>
<view class='apply_item'>
<view>单位名称</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_unit}}' bindinput='setrecordunit'></input>
</view>
</view>
<view class='apply_item'>
<view>职务</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_duty}}' bindinput='setrecordduty'></input>
</view>
</view>
<view class='apply_item'>
<view>证明人</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_name}}' bindinput='setrecordname'></input>
</view>
</view>
<view class='apply_item'>
<view>证明人电话</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_phone}}' bindinput='setrecordphone'></input>
<picker mode='date' bindchange="bindstartChange">
<view class='apply_item'>
<view>开始时间</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{record[apply_nav].record_start_time?"color333":""}}'>{{record[apply_nav].record_start_time?record[apply_nav].record_start_time:'请选择'}}</view>
</view>
</view>
</picker>
<picker mode='date' bindchange="bindendChange">
<view class='apply_item'>
<view>结束时间</view>
<view class='apply_item_input'>
<view class='iconfont icon-xiangyou'></view>
<view class='apply_itemtxt {{record[apply_nav].record_end_time?"color333":""}}'>{{record[apply_nav].record_end_time?record[apply_nav].record_end_time:'请选择'}}</view>
</view>
</view>
</picker>
<view class='apply_item'>
<view>单位名称</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_unit}}' bindinput='setrecordunit'></input>
</view>
</view>
<view class='apply_item'>
<view>职务</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_duty}}' bindinput='setrecordduty'></input>
</view>
</view>
<view class='apply_item'>
<view>证明人</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_name}}' bindinput='setrecordname'></input>
</view>
</view>
<view class='apply_item'>
<view>证明人电话</view>
<view class='apply_item_input'>
<input placeholder='未填写' placeholder-class='input_p' value='{{record[apply_nav].record_phone}}' bindinput='setrecordphone'></input>
</view>
</view>
</view>
</view>
<view class='apply_title'>上传身份证照片</view>
<view class='apply_idbox'>
<view class='apply_idimg' bindtap='uploadImages' data-tem='2'>
<view class='apply_idimgmain' wx:if='{{!front_card}}' >
<view class='apply_idupimg'>
<text class='iconfont icon-camera1'></text>
</view>
<view>上传身份证正面</view>
</view>
<image src='{{front_card?front_card:"https://volunteer.cnpu.org/imgs/renzhengxinxi_fanmian_bg@2x.png"}}'></image>
</view>
<view class='apply_idimg' bindtap='uploadImages' data-tem='3'>
<view class='apply_idimgmain' wx:if='{{!reverse_card}}' >
<view class='apply_idupimg'>
<text class='iconfont icon-camera1'></text>
</view>
<view>上传身份证反面</view>
</view>
<image src='{{reverse_card?reverse_card:"https://volunteer.cnpu.org/imgs/renzhengxinxi_zhengmian_bg@2x.png"}}'></image>
</view>
<view class='apply_idimg' bindtap='uploadImages' data-tem='2'>
<view class='apply_idimgmain' wx:if='{{!front_card}}'>
<view class='apply_idupimg'>
<text class='iconfont icon-camera1'></text>
</view>
<view>上传身份证正面</view>
</view>
<image src='{{front_card?front_card:"https://volunteer.cnpu.org/imgs/renzhengxinxi_fanmian_bg@2x.png"}}'></image>
</view>
<view class='apply_idimg' bindtap='uploadImages' data-tem='3'>
<view class='apply_idimgmain' wx:if='{{!reverse_card}}'>
<view class='apply_idupimg'>
<text class='iconfont icon-camera1'></text>
</view>
<view>上传身份证反面</view>
</view>
<image src='{{reverse_card?reverse_card:"https://volunteer.cnpu.org/imgs/renzhengxinxi_zhengmian_bg@2x.png"}}'></image>
</view>
</view>
<view class='apply_bottomtitle'>志愿者申请书
</view>
<view class='apply_bottom'>
为继承和弘扬国际主义战士白求恩的伟大风范和高尚情操,传承和弘扬白求恩的伟大精神,本人自愿申请加入白求恩志愿者队伍。
本人愿尽己所能,以“志愿服务”为宗旨,不计报酬、帮助他人、服务社会,恪守国家法律、法规,遵守白求恩志愿者各项规章制度,努力工作,尽职尽责,力争为公益事业做出贡献。
</view>
<view class='apply_btn' bindtap='submit' >
提交
</view>
为继承和弘扬国际主义战士白求恩的伟大风范和高尚情操,传承和弘扬白求恩的伟大精神,本人自愿申请加入白求恩志愿者队伍。 本人愿尽己所能,以“志愿服务”为宗旨,不计报酬、帮助他人、服务社会,恪守国家法律、法规,遵守白求恩志愿者各项规章制度,努力工作,尽职尽责,力争为公益事业做出贡献。
</view>
<view class='apply_btn' bindtap='submit'>
<!-- 服务区域 -->
<view class='apply_vold' wx:if='{{showapply}}' >
<view class='pickerview'>
<picker-view indicator-style="height: 40px;" class='pickerview_top' value="{{confirmvalarr}}" bindchange="bindChange">
<view class='iconfont icon-guanbi1' catchtap='setshowapply_no'></view>
<picker-view-column>
<view wx:for="{{provincearr}}" wx:key style="line-height: 40px" class='column_view'>{{ item.province_name}}</view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{cityarr}}" wx:key style="line-height: 40px" class='column_view'>{{item.city_name}}</view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{countryarr}}" wx:key style="line-height: 40px" class='column_view'>{{item.country_name}}</view>
</picker-view-column>
</picker-view>
<view class='apply_vold_btn'>
<view class='applybtn' catchtap='setno'>取消</view>
<view class='applybtn yes_applybtn' catchtap='setyes'>确定</view>
</view>
</view>
</view>
\ No newline at end of file
提交
</view>
<!-- 服务区域 -->
<view class='apply_vold' wx:if='{{showapply}}'>
<view class='pickerview'>
<picker-view indicator-style="height: 40px;" class='pickerview_top' value="{{confirmvalarr}}" bindchange="bindChange">
<view class='iconfont icon-guanbi1' catchtap='setshowapply_no'></view>
<picker-view-column>
<view wx:for="{{provincearr}}" wx:key style="line-height: 40px" class='column_view'>{{ item.province_name}}</view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{cityarr}}" wx:key style="line-height: 40px" class='column_view'>{{item.city_name}}</view>
</picker-view-column>
<picker-view-column>
<view wx:for="{{countryarr}}" wx:key style="line-height: 40px" class='column_view'>{{item.country_name}}</view>
</picker-view-column>
</picker-view>
<view class='apply_vold_btn'>
<view class='applybtn' catchtap='setno'>取消</view>
<view class='applybtn yes_applybtn' catchtap='setyes'>确定</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
/* pages/apply/apply.wxss */
.upimg{
position: relative;
display: flex;
align-items: center;
justify-content: center;
color:#fff;
font-size:40rpx;
width:120rpx;
height: 120rpx;
border-radius: 50%;
overflow: hidden;
margin: 24rpx auto 34rpx auto;
background: #CCCCCC;
}
.upimg image{
display: block;
width:100%;
height: 100%;
.upimg {
position: relative;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 40rpx;
width: 120rpx;
height: 120rpx;
border-radius: 50%;
overflow: hidden;
margin: 24rpx auto 34rpx auto;
background: #ccc;
}
.upimg image {
display: block;
width: 100%;
height: 100%;
border-radius: 50%;
}
.upimg .iconfont {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #fff;
font-size: 50rpx;
}
.tips_word {
width: 100%;
text-align: center;
color: #ccc;
font-size: 28rpx;
}
.apply_item {
color: #333;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 32rpx;
border-bottom: 1rpx solid #e6e6e6;
padding: 30rpx 0;
}
.apply_item_input {
display: flex;
align-items: center;
flex-direction: row-reverse;
width: 70%;
color: #333;
font-size: 28rpx;
}
.apply_item_input input {
width: 100%;
}
.apply_item_input .iconfont {
color: #ccc;
}
.big_item .apply_item_input {
width: 60%;
}
.apply_item_input input {
text-align: right;
}
.input_p {
color: #ccc;
font-size: 28rpx;
}
.apply_itemtxt {
color: #ccc;
font-size: 28rpx;
}
.apply_nav {
display: flex;
align-items: center;
margin: 70rpx 32rpx 0rpx 32rpx;
}
.apply_cell {
position: relative;
margin: 0 50rpx 0 0;
color: #999;
font-size: 26rpx;
}
.apply_active {
position: relative;
color: #21ae59;
}
.apply_active::after {
position: absolute;
width: 100%;
bottom: -5rpx;
background: #21ae59;
left: 0;
height: 2rpx;
content: '';
z-index: 10;
}
.apply_title {
margin: 34rpx 32rpx;
color: #333;
font-size: 28rpx;
}
.apply_idbox {
margin: 0 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.apply_idimg {
position: relative;
width: 49%;
height: 202rpx;
border: 1rpx solid #e6e6e6;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8rpx;
}
.apply_idimg image {
height: 100%;
width: 100%;
display: block;
}
.apply_idimgmain {
position: absolute;
top: 50%;
left: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
width: 100%;
height: 100%;
transform: translate(-50%, -50%);
color: #666;
font-size: 26rpx;
}
.apply_idupimg {
display: flex;
align-items: center;
justify-content: center;
width: 74rpx;
height: 74rpx;
border-radius: 50%;
background: #41cd79;
color: #fff;
font-size: 40rpx;
margin: 0 0 20rpx 0;
}
.apply_idupimg .iconfont {
font-size: 30rpx;
}
.apply_bottomtitle {
margin: 74rpx 0 26rpx 0;
text-align: center;
color: #333;
font-size: 33rpx;
font-weight: bold;
}
.apply_bottom {
margin: 0 32rpx 58rpx 32rpx;
color: #666;
font-size: 26rpx;
line-height: 50rpx;
}
.apply_btn {
position: relative;
margin: 0 32rpx 32rpx 32rpx;
height: 88rpx;
line-height: 88rpx;
background: #41cd79;
color: #fff;
font-size: 32rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8rpx;
}
.apply_btn:active {
opacity: 0.7;
}
.color333 {
color: #333;
}
.apply_vold {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.2);
z-index: 10;
display: flex;
/* display: none; */
justify-content: center;
align-items: center;
}
.pickerview {
position: relative;
background: #fff;
width: 100%;
margin: 0 auto;
overflow: hidden;
}
.pickerview .icon-guanbi1 {
position: absolute;
font-weight: bold;
font-size: 40rpx;
top: 20rpx;
right: 50rpx;
color: #333;
z-index: 100;
}
.pickerview_top {
width: 100%;
padding: 0 30rpx;
height: 400rpx;
}
.apply_vold_btn {
display: flex;
align-items: center;
justify-content: space-between;
}
.applybtn {
position: relative;
border: 1rpx solid #f6f6f6;
color: #333;
font-size: 40rpx;
height: 80rpx;
width: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.inofbtn {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 10;
opacity: 0;
}
.applybtn:active {
opacity: 0.7;
}
.yes_applybtn {
background-color: #04be02;
color: #fff;
border: 1rpx solid #04be02;
}
.column_view {
display: flex;
justify-content: center;
align-items: center;
}
.upimg .iconfont{
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
color:#fff;
font-size:50rpx;
}
.apply_item{
color:#333333;
font-size:28rpx;
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 32rpx;
border-bottom:1rpx solid #e6e6e6;
padding:30rpx 0;
}
.apply_item_input{
display: flex;
align-items: center;
flex-direction: row-reverse;
width:70%;
color:#333;
font-size:28rpx;
}
.apply_item_input input{
width:100%;
}
.apply_item_input .iconfont{
color:#ccc;
}
.big_item .apply_item_input{
width:60%;
}
.apply_item_input input{
text-align: right;
}
.input_p{
color:#ccc;
font-size:28rpx;
}
.apply_itemtxt{
color:#ccc;
font-size:28rpx;
}
.apply_nav{
display: flex;
align-items: center;
margin: 70rpx 32rpx 0rpx 32rpx;
}
.apply_cell{
position: relative;
margin: 0 50rpx 0 0;
color:#999;
font-size:26rpx;
}
.apply_active{
position: relative;
color:#21AE59;
}
.apply_active::after{
position: absolute;
width:100%;
bottom:-5rpx;
background:#21AE59;
left:0;
height: 2rpx;
content: '';
z-index:10;
}
.apply_title{
margin: 34rpx 32rpx;
color:#333;
font-size:28rpx;
}
.apply_idbox{
margin: 0 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.apply_idimg{
position: relative;
width:49%;
height: 202rpx;
border:1rpx solid #e6e6e6;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8rpx;
}
.apply_idimg image{
height: 100%;
width:100%;
display: block;
}
.apply_idimgmain{
position: absolute;
top:50%;
left:50%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
width:100%;
height: 100%;
transform: translate(-50%,-50%);
color:#666;
font-size:26rpx;
}
.apply_idupimg{
display: flex;
align-items: center;
justify-content: center;
width:74rpx;
height: 74rpx;
border-radius: 50%;
background: #41CD79;
color:#fff;
font-size:40rpx;
margin: 0 0 20rpx 0;
}
.apply_idupimg .iconfont{
font-size: 30rpx;
}
.apply_bottomtitle{
margin: 74rpx 0 26rpx 0;
text-align: center;
color:#333333;
font-size:33rpx;
font-weight: bold;
}
.apply_bottom{
margin: 0 32rpx 58rpx 32rpx;
color:#666;
font-size:26rpx;
line-height: 50rpx;
}
.apply_btn{
position: relative;
margin: 0 32rpx 32rpx 32rpx;
height: 88rpx;
line-height: 88rpx;
background: #41CD79;
color:#fff;
font-size:32rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8rpx;
}
.apply_btn:active{
opacity: 0.7;
}
.color333{
color:#333;
}
.apply_vold{
position: fixed;
top:0;
left:0;
width:100%;
height: 100%;
background: rgba(0,0,0,0.2);
z-index: 10;
display: flex;
/* display: none; */
justify-content: center;
align-items: center;
}
.pickerview{
position: relative;
background: #fff;
width:100%;
margin: 0 auto;
overflow: hidden;
}
.pickerview .icon-guanbi1{
position: absolute;
font-weight: bold;
font-size: 40rpx;
top:20rpx;
right: 50rpx;
color:#333;
z-index:100;
}
.pickerview_top{
width:100%;
padding:0 30rpx;
height: 400rpx;
}
.apply_vold_btn{
display: flex;
align-items: center;
justify-content: space-between;
}
.applybtn{
position: relative;
border:1rpx solid #f6f6f6;
color:#333;
font-size: 40rpx;
height: 80rpx;
width:50%;
display: flex;
align-items: center;
justify-content: center;
}
.inofbtn{
position: absolute;
top:0;
left:0;
width:100%;
height: 100%;
z-index:10;
opacity: 0;
}
.applybtn:active{
opacity: 0.7;
}
.yes_applybtn{
background-color: #04be02;
color:#fff;
border:1rpx solid #04be02;
}
.column_view{
display: flex;
justify-content: center;
align-items: center;
}
\ No newline at end of file
... ...
... ... @@ -196,40 +196,71 @@ Page({
}).catch((err) => {
})
},
get_news(){
let that = this;
let head = {
'XX-Token': wx.getStorageSync('token')
}
let url = '/index/index/news_info';
let params = {
id: that.data.id
}
app.post(url, params, head).then((res) => {
that.setData({
datalist: res
})
wxParse.wxParse('content', 'html', res.content, that, 5);
}).catch((err) => {
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
console.log(options)
let that = this;
if (options.status == '1') {
that.setData({
id: options.id,
status: options.status
})
if (options.type == 1){
wx.setNavigationBarTitle({
title: '活动详情'
})
that.getdatalist();
} else if (options.status == '2') {
that.setData({
status: options.status
})
wx.setNavigationBarTitle({
title: '关于我们'
})
that.getdatalist();
} else if (options.status == '3') {
that.setData({
type: options.type,
id: options.id,
status: options.status
})
wx.setNavigationBarTitle({
title: '联系我们'
})
that.getdatalist();
that.get_news()
} else {
if (options.status == '1') {
that.setData({
id: options.id,
status: options.status
})
wx.setNavigationBarTitle({
title: '活动详情'
})
that.getdatalist();
} else if (options.status == '2') {
that.setData({
status: options.status
})
wx.setNavigationBarTitle({
title: '关于我们'
})
that.getdatalist();
} else if (options.status == '3') {
that.setData({
status: options.status
})
wx.setNavigationBarTitle({
title: '联系我们'
})
that.getdatalist();
}
that.getSystemInfo()
}
that.getSystemInfo()
},
/**
... ...
<view class='main'>
<view class='top_img'>
<image src='{{datalist.thumbnail}}'></image>
... ... @@ -10,7 +9,7 @@
<import src="../../wxParse/wxParse.wxml" />
<template is='wxParse' data='{{wxParseData:content.nodes}}' />
</view>
<view class='memberbox' wx:if='{{datalist.join.length>0}}'>
<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>
... ... @@ -18,36 +17,39 @@
</view>
</view>
</view>
<view class='foot' bindtap='enroll' wx:if='{{datalist.button_status == 1}}'>报名</view>
<view class='foot' wx:if='{{datalist.button_status == 2}}'>待审核</view>
<view class='foot' bindtap='sign' wx:if='{{datalist.button_status == 3}}'>签到</view>
<view class='foot' wx:if='{{datalist.button_status == 4}}'>已签到</view>
<view class='foot' wx:if='{{datalist.button_status == 5}}'>已结束</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' catchtap=''>
<view class='title'>报名方式</view>
<image src='/imgs/del.png' class='close' bindtap='change_cover'></image>
<picker range='{{enroll_arr}}' bindchange='selectenroll'>
<view class="enroll ">
{{enroll}}
</view>
</picker>
<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}}'>待审核</view>
<view class='foot' bindtap='sign' wx:if='{{datalist.button_status == 3}}'>签到</view>
<view class='foot' wx:if='{{datalist.button_status == 4}}'>已签到</view>
<view class='foot' wx:if='{{datalist.button_status == 5}}'>已结束</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' catchtap=''>
<view class='title'>报名方式</view>
<image src='/imgs/del.png' class='close' bindtap='change_cover'></image>
<picker range='{{enroll_arr}}' bindchange='selectenroll'>
<view class="enroll ">
{{enroll}}
</view>
</picker>
<picker mode='date' bindchange='selecte_startTime' wx:if='{{type}}'>
<view class='time'>
{{starTime}}
</view>
</picker>
<picker mode='date' bindchange='selecte_startTime' wx:if='{{type}}'>
<view class='time'>
{{starTime}}
</view>
</picker>
<picker mode='date' bindchange='selecte_endTime' wx:if='{{type}}'>
<view class='time'>
{{endTime}}
</view>
</picker>
<view class='sub_bnt' bindtap='submit'>确定</view>
<picker mode='date' bindchange='selecte_endTime' wx:if='{{type}}'>
<view class='time'>
{{endTime}}
</view>
</picker>
<view class='sub_bnt' bindtap='submit'>确定</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -5,6 +5,7 @@ Page({
* 页面的初始数据
*/
data: {
city_id: '',
clickIndex: true,
index:0,
datalist: [],
... ... @@ -18,6 +19,7 @@ Page({
category: '选择分类',
},
selecteCtiy(e){
console.log(e)
this.setData({
city: this.data.city_arr[e.detail.value],
city_id: this.data.city_arrid[e.detail.value]
... ... @@ -25,6 +27,7 @@ Page({
this.city_active()
},
selecteClass(e) {
console.log(e)
this.setData({
category: this.data.class_arr[e.detail.value],
type: this.data.class_arrid[e.detail.value]
... ... @@ -35,6 +38,7 @@ Page({
* 切换
*/
clicktab(e) {
console.log(e)
let that = this
let id = e.currentTarget.dataset.id
if (id == '2') {
... ... @@ -42,13 +46,11 @@ Page({
clickIndexs: true,
clickIndex: false
})
this.type_active()
} else if (id == '1') {
that.setData({
clickIndexs: false,
clickIndex: true
})
this.city_active()
}
//调用接口
},
... ... @@ -149,10 +151,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this;
},
/**
... ...
... ... @@ -25,7 +25,7 @@
</view>
<view class='new_title'>{{item.activity_name}}</view>
<view class='title_box'>
<view>
<view class='wz_box'>
<image src='/imgs/dizhi@2x.png' />
<text>{{item.province_name}}</text>
</view>
... ...
... ... @@ -50,7 +50,11 @@
font-size: 28rpx;
}
.wz_box{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.title_box {
margin: 18rpx 0 13rpx 0;
... ... @@ -68,6 +72,9 @@
.title_box .word{
color: #666;
font-size: 24rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tabbar {
width: 100%;
... ...
const app=getApp();
const app = getApp();
Page({
/**
... ... @@ -6,154 +6,166 @@ Page({
*/
data: {
star_num: 3,
datalist:[],
activity_page:0,
activity:[]
datalist: [],
activity_page: 0,
activity: [],
page_type: true
},
getdatalist(){
let that=this;
let url ='index/index/index';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let params={
volunteer_page:0,
volunteer_pageNum:3,
activity_page: that.data.activity_page,
activity_pageNum:4
}
app.post(url, params, head).then((res)=>{
let activity = res.activity;
let tem = [];
let temactivity = [];
for (let i = 0; i < activity.length; i++) {
tem.push(activity[i])
if ((i + 1) != activity.length){
if ((i + 1) % 2 == 0) {
temactivity.push(tem);
tem = [];
}
}else{
temactivity.push(tem);
tem = [];
}
getdatalist() {
let that = this;
let url = 'index/index/index';
let head = {
'XX-Token': wx.getStorageSync('token')
}
let dataactivity = that.data.activity;
let temdataactivity = dataactivity.concat(temactivity);
that.setData({
datalist:res,
activity: temdataactivity,
activity_page: res.activity_page,
begin: res.begin
})
}).catch((err)=>{
})
},
//判断是否登陆
get_token(){
let that=this;
wx.login({
success: function (s) {
let url = 'wxapp/public/getSessionKey';
if (s.code) {
var code = s.code;
var param = {
code: code
}
app.post(url, param).then((res) => {
let url ='wxapp/public/get_token';
let params={
openid: res.openid
let params = {
volunteer_page: 0,
volunteer_pageNum: 3,
activity_page: that.data.activity_page,
activity_pageNum: 4
}
app.post(url, params, head).then((res) => {
console.log(res)
if (res.news.length > 0) {
that.setData({
page_type: true
})
} else {
that.setData({
page_type: false
})
}
app.post(url, params).then((res)=>{
console.log(res);
if(res.data){
wx.setStorageSync('token', res.data);
if (that.data.news == null) {
that.setData({
datalist: [],
activity_page: 0,
activity: []
datalist: res,
activity: res.activity,
// activity_page: res.activity_page,
news: res.news
})
that.getdatalist();
}else{
wx.redirectTo({
url: '/pages/start/start'
} else {
that.setData({
news: that.data.news.concat(res.news)
})
}
}).catch((err)=>{
}
}).catch((err) => {
})
}).catch((errMsg) => {
console.log(errMsg);
})
}
}
});
},
})
},
//判断是否登陆
get_token() {
let that = this;
wx.login({
success: function(s) {
let url = 'wxapp/public/getSessionKey';
if (s.code) {
var code = s.code;
var param = {
code: code
}
app.post(url, param).then((res) => {
let url = 'wxapp/public/get_token';
let params = {
openid: res.openid
}
app.post(url, params).then((res) => {
console.log(res);
if (res.data) {
wx.setStorageSync('token', res.data);
that.setData({
datalist: [],
activity_page: 0,
activity: []
})
that.getdatalist();
} else {
wx.redirectTo({
url: '/pages/start/start'
})
}
}).catch((err) => {
})
}).catch((errMsg) => {
console.log(errMsg);
})
}
}
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let windowHeight = wx.getSystemInfoSync().windowHeight;// 屏幕的高度
let windowWidth = wx.getSystemInfoSync().windowWidth // 屏幕的宽度
this.setData({
scroll_height: windowHeight * 750 / windowWidth
})
onLoad: function(options) {
let that = this;
that.get_token();
// let windowHeight = wx.getSystemInfoSync().windowHeight; // 屏幕的高度
// let windowWidth = wx.getSystemInfoSync().windowWidth // 屏幕的宽度
// this.setData({
// scroll_height: windowHeight * 750 / windowWidth
// })
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this;
that.get_token();
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
let that = this
if (that.data.page_type == false) {
wx.showToast({
title: '暂无更多数据',
icon: 'none',
duration: 1000
})
return false
}
console.log(that.data.activity_page)
that.setData({
activity_page: that.data.activity_page + 1
})
console.log(that.data.activity_page)
that.getdatalist()
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
<!--index.wxml-->
<scroll-view scroll-y='true' bindscrolltolower='getdatalist' style='height:{{scroll_height}}rpx'>
<!-- <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>
... ... @@ -41,14 +41,14 @@
<view>
<view class='new_box'>
<navigator class='new_cell' wx:for='{{begin}}' wx:key url='/pages/img_txt/img_txt?id={{item.id}}&status=1' hover-class="none">
<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>
<view class='wz_box'>
<image src='/imgs/dizhi@2x.png' />
<text>{{item.province_name}}</text>
</view>
... ... @@ -64,8 +64,8 @@
<view class='index_newbox'>
<view class='title activity_title'>活动快讯</view>
<view>
<view class='new_box' wx:for='{{activity}}' wx:key>
<navigator class='new_cell' wx:for='{{item}}' wx:key url='/pages/img_txt/img_txt?id={{item.id}}&status=1' hover-class="none">
<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>
... ... @@ -77,4 +77,4 @@
</view>
</view>
</view>
</scroll-view>
\ No newline at end of file
<!-- </scroll-view> -->
\ No newline at end of file
... ...
/**index.wxss**/
.slide-image {
height: 300rpx;
width: 100%;
... ... @@ -43,7 +41,6 @@
color: #999;
font-size: 26rpx;
display: flex;
/* justify-content: space-between; */
align-items: center;
}
... ... @@ -75,7 +72,7 @@
height: 100%;
display: block;
}
/* 22 */
.index_newbox {
margin: 32rpx 0rpx 0 0rpx;
}
... ... @@ -88,13 +85,12 @@
padding: 0 32rpx;
font-size: 24rpx;
flex-wrap: wrap;
border-bottom: 1rpx solid #e6e6e6;
border-bottom: 2rpx solid #e6e6e6;
}
.new_cell {
width: 48%;
padding: 29rpx 0rpx;
/* border-bottom:1rpx solid #E6E6E6; */
}
.new_cell:nth-child(2n) {
... ... @@ -121,9 +117,12 @@
}
.new_title {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
word-break: break-all;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
margin: 18rpx 0 13rpx 0;
color: #292929;
font-size: 28rpx;
... ... @@ -144,30 +143,45 @@
align-items: center;
justify-content: space-between;
}
.title_box image{
.title_box image {
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
}
.title_box .word{
.wz_box{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.title_box .word {
max-width: 200rpx;
color: #666;
font-size: 24rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.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{
.star_box image:first-child {
padding-left: 0;
}
.star_box image:last-child{
.star_box image:last-child {
padding-right: 0;
}
\ No newline at end of file
}
... ...
... ... @@ -8,11 +8,11 @@
</view>
<view class='new_title'>{{item.activity_name}}</view>
<view class='title_box'>
<view>
<view class='wz_box'>
<image src='/imgs/dizhi@2x.png' />
<text>北京</text>
<text>{{item.province_name}}</text>
</view>
<view class='word'>{{item.type_name}}</view>
<view class='word'>{{item.type_name}}大傻瓜发啊发事发发</view>
</view>
<view>{{item.create_time}}</view>
</view>
... ...
... ... @@ -63,6 +63,7 @@
border: 2rpx solid #999;
font-size: 28rpx;
}
.title_box {
margin: 18rpx 0 13rpx 0;
color: #292929;
... ... @@ -71,14 +72,24 @@
align-items: center;
justify-content: space-between;
}
.title_box image{
.title_box image {
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
}
.title_box .word{
.wz_box{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.title_box .word {
max-width: 200rpx;
color: #666;
font-size: 24rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.empty{
width: 100%;
... ...