作者 niufei

消息模板

@@ -491,7 +491,8 @@ Page({ @@ -491,7 +491,8 @@ Page({
491 apply_nav: e.currentTarget.dataset.apply_nav 491 apply_nav: e.currentTarget.dataset.apply_nav
492 }) 492 })
493 }, 493 },
494 - submit() { 494 + submit(e) {
  495 + console.log(e)
495 let that = this; 496 let that = this;
496 let err = ''; 497 let err = '';
497 //匹配中国邮政编码 498 //匹配中国邮政编码
@@ -578,6 +579,7 @@ Page({ @@ -578,6 +579,7 @@ Page({
578 'XX-Token': wx.getStorageSync('token') 579 'XX-Token': wx.getStorageSync('token')
579 } 580 }
580 let params = { 581 let params = {
  582 + form_id: e.detail.formId,
581 name: that.data.name, 583 name: that.data.name,
582 sex: that.data.sex, 584 sex: that.data.sex,
583 birthday: that.data.birthday, 585 birthday: that.data.birthday,
@@ -139,15 +139,7 @@ @@ -139,15 +139,7 @@
139 139
140 140
141 141
142 -<!-- <picker range='{{typearr}}' bindchange="bindtypeChange">  
143 - <view class='apply_item'>  
144 - <view>志愿类别</view>  
145 - <view class='apply_item_input'>  
146 - <view class='iconfont icon-xiangyou'></view>  
147 - <view class='apply_itemtxt {{typearr[type-1]?"color333":""}}'>{{typearr[type-1]?typearr[type-1]:'请选择'}}</view>  
148 - </view>  
149 - </view>  
150 -</picker> --> 142 +
151 143
152 144
153 <view class='apply_nav'> 145 <view class='apply_nav'>
@@ -225,10 +217,11 @@ @@ -225,10 +217,11 @@
225 <view class='apply_bottom' wx:if="{{!page_type}}"> 217 <view class='apply_bottom' wx:if="{{!page_type}}">
226 为继承和弘扬国际主义战士白求恩的伟大风范和高尚情操,传承和弘扬白求恩的伟大精神,本人自愿申请加入白求恩志愿者队伍。 本人愿尽己所能,以“志愿服务”为宗旨,不计报酬、帮助他人、服务社会,恪守国家法律、法规,遵守白求恩志愿者各项规章制度,努力工作,尽职尽责,力争为公益事业做出贡献。 218 为继承和弘扬国际主义战士白求恩的伟大风范和高尚情操,传承和弘扬白求恩的伟大精神,本人自愿申请加入白求恩志愿者队伍。 本人愿尽己所能,以“志愿服务”为宗旨,不计报酬、帮助他人、服务社会,恪守国家法律、法规,遵守白求恩志愿者各项规章制度,努力工作,尽职尽责,力争为公益事业做出贡献。
227 </view> 219 </view>
228 -<view class='apply_btn' bindtap='submit' wx:if="{{!page_type}}">  
229 220
230 - 提交  
231 -</view> 221 +
  222 +<form wx:if="{{!page_type}}" bindsubmit="submit" report-submit='true' class="apply_btn">
  223 + <button class="a_btn" form-type="submit" style="">提交</button>
  224 +</form>
232 225
233 <!-- 服务区域 --> 226 <!-- 服务区域 -->
234 <view class='apply_vold' wx:if='{{showapply}}'> 227 <view class='apply_vold' wx:if='{{showapply}}'>
1 -  
2 -  
3 .upimg { 1 .upimg {
4 position: relative; 2 position: relative;
5 display: flex; 3 display: flex;
@@ -195,19 +193,31 @@ @@ -195,19 +193,31 @@
195 margin: 0 32rpx 32rpx 32rpx; 193 margin: 0 32rpx 32rpx 32rpx;
196 height: 88rpx; 194 height: 88rpx;
197 line-height: 88rpx; 195 line-height: 88rpx;
198 - background: #41cd79;  
199 - color: #fff;  
200 - font-size: 32rpx; 196 + border: none;
201 display: flex; 197 display: flex;
202 align-items: center; 198 align-items: center;
203 justify-content: center; 199 justify-content: center;
204 - border-radius: 8rpx;  
205 } 200 }
206 201
207 .apply_btn:active { 202 .apply_btn:active {
208 opacity: 0.7; 203 opacity: 0.7;
209 } 204 }
210 205
  206 +.a_btn {
  207 + margin: 0;
  208 + padding: 0;
  209 + border: none !important;
  210 + width: 686rpx !important;
  211 + height: 100%;
  212 + background: #41cd79;
  213 + color: #fff;
  214 + font-size: 32rpx;
  215 + display: flex;
  216 + align-items: center;
  217 + justify-content: center;
  218 + border-radius: 8rpx;
  219 +}
  220 +
211 .color333 { 221 .color333 {
212 color: #333; 222 color: #333;
213 } 223 }
@@ -8,6 +8,19 @@ Page({ @@ -8,6 +8,19 @@ Page({
8 imgarr: [], 8 imgarr: [],
9 myimgurl:[] 9 myimgurl:[]
10 }, 10 },
  11 + //图片删除
  12 + del_img(e){
  13 + let that = this
  14 + let index = e.currentTarget.dataset.index
  15 + let myimgurl = that.data.myimgurl
  16 + let imgarr = that.data.imgarr
  17 + myimgurl.splice(index,1)
  18 + imgarr.splice(index, 1)
  19 + that.setData({
  20 + myimgurl: myimgurl,
  21 + imgarr: imgarr
  22 + })
  23 + },
11 //图片添加 24 //图片添加
12 upimg: function () { 25 upimg: function () {
13 let that = this 26 let that = this
@@ -20,11 +20,17 @@ @@ -20,11 +20,17 @@
20 <view class="img_box"> 20 <view class="img_box">
21 <view class="title">图片上传</view> 21 <view class="title">图片上传</view>
22 <view class="img_arr"> 22 <view class="img_arr">
23 - <image class="img_item" src="{{item}}" mode="aspectFill" wx:for="{{imgarr}}" wx:key="index"/>  
24 - <image class="img_item" src="/imgs/add_img.png" mode="aspectFill" bindtap="upimg"/> 23 + <view class="img_item" wx:for="{{imgarr}}" wx:key="index">
  24 + <image src="{{item}}" mode="aspectFill" class="show_img" />
  25 + <image class="del" src="/imgs/del.png" catchtap="del_img" data-index="{{index}}"/>
  26 + </view>
  27 +
  28 + <image class="img_item" src="/imgs/add_img.png" mode="aspectFill" bindtap="upimg" />
25 </view> 29 </view>
26 </view> 30 </view>
27 31
  32 +
  33 +
28 <view class="word_box"> 34 <view class="word_box">
29 <view class="title"> 35 <view class="title">
30 <image src="/imgs/must.png" /> 感想汇报 36 <image src="/imgs/must.png" /> 感想汇报
1 -page{ 1 +page {
2 padding-bottom: 120rpx; 2 padding-bottom: 120rpx;
3 } 3 }
  4 +
4 .info_box { 5 .info_box {
5 width: 100%; 6 width: 100%;
6 padding: 0 32rpx; 7 padding: 0 32rpx;
@@ -56,6 +57,8 @@ page{ @@ -56,6 +57,8 @@ page{
56 57
57 .img_arr { 58 .img_arr {
58 width: 100%; 59 width: 100%;
  60 + display: flex;
  61 + flex-wrap: wrap;
59 } 62 }
60 63
61 .img_item { 64 .img_item {
@@ -63,6 +66,20 @@ page{ @@ -63,6 +66,20 @@ page{
63 height: 200rpx; 66 height: 200rpx;
64 margin-right: 42rpx; 67 margin-right: 42rpx;
65 margin-bottom: 42rpx; 68 margin-bottom: 42rpx;
  69 + position: relative;
  70 +}
  71 +
  72 +.img_item .show_img {
  73 + width: 100%;
  74 + height: 100%;
  75 +}
  76 +
  77 +.img_item .del {
  78 + width: 30rpx;
  79 + height: 30rpx;
  80 + position: absolute;
  81 + right: 10rpx;
  82 + top: 10rpx;
66 } 83 }
67 84
68 .img_item:nth-child(3n) { 85 .img_item:nth-child(3n) {
@@ -81,17 +98,18 @@ page{ @@ -81,17 +98,18 @@ page{
81 font-weight: 500; 98 font-weight: 500;
82 color: rgba(204, 204, 204, 1); 99 color: rgba(204, 204, 204, 1);
83 } 100 }
84 -.submit{  
85 - width:686rpx;  
86 -height:88rpx;  
87 -background:rgba(65,205,121,1);  
88 -border-radius:10rpx;  
89 -font-size:32rpx;  
90 -font-family:PingFang SC;  
91 -font-weight:500;  
92 -color:rgba(255,255,255,1);  
93 -display: flex;  
94 -justify-content: center;  
95 -align-items: center;  
96 -margin: 164rpx auto 0; 101 +
  102 +.submit {
  103 + width: 686rpx;
  104 + height: 88rpx;
  105 + background: rgba(65, 205, 121, 1);
  106 + border-radius: 10rpx;
  107 + font-size: 32rpx;
  108 + font-family: PingFang SC;
  109 + font-weight: 500;
  110 + color: rgba(255, 255, 255, 1);
  111 + display: flex;
  112 + justify-content: center;
  113 + align-items: center;
  114 + margin: 164rpx auto 0;
97 } 115 }