作者 niufei

消息模板

... ... @@ -491,7 +491,8 @@ Page({
apply_nav: e.currentTarget.dataset.apply_nav
})
},
submit() {
submit(e) {
console.log(e)
let that = this;
let err = '';
//匹配中国邮政编码
... ... @@ -578,6 +579,7 @@ Page({
'XX-Token': wx.getStorageSync('token')
}
let params = {
form_id: e.detail.formId,
name: that.data.name,
sex: that.data.sex,
birthday: that.data.birthday,
... ...
... ... @@ -139,15 +139,7 @@
<!-- <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>
</view>
</picker> -->
<view class='apply_nav'>
... ... @@ -225,10 +217,11 @@
<view class='apply_bottom' wx:if="{{!page_type}}">
为继承和弘扬国际主义战士白求恩的伟大风范和高尚情操,传承和弘扬白求恩的伟大精神,本人自愿申请加入白求恩志愿者队伍。 本人愿尽己所能,以“志愿服务”为宗旨,不计报酬、帮助他人、服务社会,恪守国家法律、法规,遵守白求恩志愿者各项规章制度,努力工作,尽职尽责,力争为公益事业做出贡献。
</view>
<view class='apply_btn' bindtap='submit' wx:if="{{!page_type}}">
提交
</view>
<form wx:if="{{!page_type}}" bindsubmit="submit" report-submit='true' class="apply_btn">
<button class="a_btn" form-type="submit" style="">提交</button>
</form>
<!-- 服务区域 -->
<view class='apply_vold' wx:if='{{showapply}}'>
... ...
.upimg {
position: relative;
display: flex;
... ... @@ -195,19 +193,31 @@
margin: 0 32rpx 32rpx 32rpx;
height: 88rpx;
line-height: 88rpx;
background: #41cd79;
color: #fff;
font-size: 32rpx;
border: none;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8rpx;
}
.apply_btn:active {
opacity: 0.7;
}
.a_btn {
margin: 0;
padding: 0;
border: none !important;
width: 686rpx !important;
height: 100%;
background: #41cd79;
color: #fff;
font-size: 32rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8rpx;
}
.color333 {
color: #333;
}
... ...
... ... @@ -8,6 +8,19 @@ Page({
imgarr: [],
myimgurl:[]
},
//图片删除
del_img(e){
let that = this
let index = e.currentTarget.dataset.index
let myimgurl = that.data.myimgurl
let imgarr = that.data.imgarr
myimgurl.splice(index,1)
imgarr.splice(index, 1)
that.setData({
myimgurl: myimgurl,
imgarr: imgarr
})
},
//图片添加
upimg: function () {
let that = this
... ...
... ... @@ -20,11 +20,17 @@
<view class="img_box">
<view class="title">图片上传</view>
<view class="img_arr">
<image class="img_item" src="{{item}}" mode="aspectFill" wx:for="{{imgarr}}" wx:key="index"/>
<image class="img_item" src="/imgs/add_img.png" mode="aspectFill" bindtap="upimg"/>
<view class="img_item" wx:for="{{imgarr}}" wx:key="index">
<image src="{{item}}" mode="aspectFill" class="show_img" />
<image class="del" src="/imgs/del.png" catchtap="del_img" data-index="{{index}}"/>
</view>
<image class="img_item" src="/imgs/add_img.png" mode="aspectFill" bindtap="upimg" />
</view>
</view>
<view class="word_box">
<view class="title">
<image src="/imgs/must.png" /> 感想汇报
... ...
page{
page {
padding-bottom: 120rpx;
}
.info_box {
width: 100%;
padding: 0 32rpx;
... ... @@ -56,6 +57,8 @@ page{
.img_arr {
width: 100%;
display: flex;
flex-wrap: wrap;
}
.img_item {
... ... @@ -63,6 +66,20 @@ page{
height: 200rpx;
margin-right: 42rpx;
margin-bottom: 42rpx;
position: relative;
}
.img_item .show_img {
width: 100%;
height: 100%;
}
.img_item .del {
width: 30rpx;
height: 30rpx;
position: absolute;
right: 10rpx;
top: 10rpx;
}
.img_item:nth-child(3n) {
... ... @@ -81,17 +98,18 @@ page{
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;
.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;
}
... ...