正在显示
22 个修改的文件
包含
224 行增加
和
186 行删除
@@ -11,25 +11,24 @@ | @@ -11,25 +11,24 @@ | ||
11 | 11 | ||
12 | 12 | ||
13 | <view class='new_box'> | 13 | <view class='new_box'> |
14 | - <view class='new_cell' data-id="{{list.id}}" bindtap="getDetail" > | ||
15 | - <view class='new_cellmain' > | 14 | + <view class='new_cell' wx:for="{{list}}" data-id="{{item.id}}" bindtap="getDetail"> |
15 | + <view class='new_cellmain'> | ||
16 | <view class='new_img'> | 16 | <view class='new_img'> |
17 | - <image src='{{list.pic}}' mode="aspectFill" /> | 17 | + <image src='{{item.pic}}' mode="aspectFill" /> |
18 | <view class="new_num"> | 18 | <view class="new_num"> |
19 | - <view> {{list.work_total_time}}小时</view> | ||
20 | - <view>{{list.people_num}}人</view> | 19 | + <view> {{item.work_total_time}}小时</view> |
20 | + <view>{{item.people_num}}人</view> | ||
21 | </view> | 21 | </view> |
22 | </view> | 22 | </view> |
23 | - <view class='new_title'>{{list.name}}</view> | 23 | + <view class='new_title'>{{item.name}}</view> |
24 | <view class='title_box'> | 24 | <view class='title_box'> |
25 | <view class='wz_box'> | 25 | <view class='wz_box'> |
26 | - <text>{{list.create_time}}</text> | 26 | + <text>{{item.create_time}}</text> |
27 | </view> | 27 | </view> |
28 | - <view class='word'>{{list.city}}</view> | 28 | + <view class='word'>{{item.city}}</view> |
29 | </view> | 29 | </view> |
30 | </view> | 30 | </view> |
31 | </view> | 31 | </view> |
32 | 32 | ||
33 | - | ||
34 | - | 33 | + <!-- <view class='empty' >暂无数据,请去添加</view> --> |
35 | </view> | 34 | </view> |
@@ -139,3 +139,12 @@ page { | @@ -139,3 +139,12 @@ page { | ||
139 | text-overflow: ellipsis; | 139 | text-overflow: ellipsis; |
140 | white-space: nowrap; | 140 | white-space: nowrap; |
141 | } | 141 | } |
142 | +.empty { | ||
143 | + width: 100%; | ||
144 | + font-size: 32rpx; | ||
145 | + font-family: PingFang-SC-Medium; | ||
146 | + font-weight: 500; | ||
147 | + color: #97a0a8; | ||
148 | + text-align: center; | ||
149 | + margin-top: 50rpx; | ||
150 | +} |
@@ -37,25 +37,30 @@ Page({ | @@ -37,25 +37,30 @@ Page({ | ||
37 | }, | 37 | }, |
38 | submit(e) { | 38 | submit(e) { |
39 | let that = this; | 39 | let that = this; |
40 | - // //验证手机号 | ||
41 | - // var AuglyTest_phone = /^1(3|4|5|6|7|8)\d{9}$/; | ||
42 | - // if (that.data.wechat == '') { | ||
43 | - // wx.showToast({ | ||
44 | - // title: '请输入微信号!', | ||
45 | - // icon: 'none' | ||
46 | - // }) | ||
47 | - // } else if (!AuglyTest_phone.test(that.data.move_phone)) { | ||
48 | - // wx.showToast({ | ||
49 | - // title: '请输入正确的电话号码!', | ||
50 | - // icon: 'none' | ||
51 | - // }) | ||
52 | - // } else if (that.data.join_reason == '') { | ||
53 | - // wx.showToast({ | ||
54 | - // title: '请填写加入理由!', | ||
55 | - // icon: 'none' | ||
56 | - // }) | ||
57 | - | ||
58 | - // } | 40 | + //验证手机号 |
41 | + var AuglyTest_phone = /^1(3|4|5|6|7|8|9)\d{9}$/; | ||
42 | + if (that.data.wechat == '') { | ||
43 | + wx.showToast({ | ||
44 | + title: '请输入微信号!', | ||
45 | + icon: 'none' | ||
46 | + }) | ||
47 | + return | ||
48 | + } else if (!AuglyTest_phone.test(that.data.move_phone)) { | ||
49 | + wx.showToast({ | ||
50 | + title: '请输入正确的电话号码!', | ||
51 | + icon: 'none' | ||
52 | + }) | ||
53 | + return | ||
54 | + }else if(that.data.join_reason==''){ | ||
55 | + | ||
56 | + wx.showToast({ | ||
57 | + title: '请输入加入理由', | ||
58 | + icon: 'none' | ||
59 | + }) | ||
60 | + return | ||
61 | + } | ||
62 | + | ||
63 | + | ||
59 | 64 | ||
60 | let url = '/index/second/applyTeam'; | 65 | let url = '/index/second/applyTeam'; |
61 | let head = { | 66 | let head = { |
@@ -75,7 +75,7 @@ Page({ | @@ -75,7 +75,7 @@ Page({ | ||
75 | front_card: '', //身份证正面照 | 75 | front_card: '', //身份证正面照 |
76 | reverse_card: '', //身份证反面照 | 76 | reverse_card: '', //身份证反面照 |
77 | id: '', //用户id, | 77 | id: '', //用户id, |
78 | - status:''//状态 | 78 | + status: '' //状态 |
79 | }, | 79 | }, |
80 | 80 | ||
81 | onShow: function () { | 81 | onShow: function () { |
@@ -108,7 +108,7 @@ Page({ | @@ -108,7 +108,7 @@ Page({ | ||
108 | }) | 108 | }) |
109 | }, | 109 | }, |
110 | 110 | ||
111 | -// 姓名 | 111 | + // 姓名 |
112 | setname(e) { | 112 | setname(e) { |
113 | this.setData({ | 113 | this.setData({ |
114 | name: e.detail.value | 114 | name: e.detail.value |
@@ -536,7 +536,7 @@ Page({ | @@ -536,7 +536,7 @@ Page({ | ||
536 | //匹配身份证 | 536 | //匹配身份证 |
537 | var AuglyTest_ID = /\d{15}|\d{18}/; | 537 | var AuglyTest_ID = /\d{15}|\d{18}/; |
538 | //验证手机号 | 538 | //验证手机号 |
539 | - var AuglyTest_phone = /^1(3|4|5|6|7|8)\d{9}$/; | 539 | + var AuglyTest_phone = /^1(3|4|5|6|7|8|9)\d{9}$/; |
540 | //验证腾讯QQ号 | 540 | //验证腾讯QQ号 |
541 | var AuglyTest_QQ = /^[1-9]*[1-9][0-9]*$/; | 541 | var AuglyTest_QQ = /^[1-9]*[1-9][0-9]*$/; |
542 | //匹配国内电话号码 | 542 | //匹配国内电话号码 |
@@ -650,8 +650,8 @@ Page({ | @@ -650,8 +650,8 @@ Page({ | ||
650 | wx.showModal({ | 650 | wx.showModal({ |
651 | title: '请仔细核对信息,确认无误!', | 651 | title: '请仔细核对信息,确认无误!', |
652 | content: '如需修改个人信息,请在微信公众号申请:关注微信公众号“白求恩志愿者中心”,点击菜单按钮“修改个人信息”,申请提交。', | 652 | content: '如需修改个人信息,请在微信公众号申请:关注微信公众号“白求恩志愿者中心”,点击菜单按钮“修改个人信息”,申请提交。', |
653 | - confirmText:'确认提交', | ||
654 | - cancelText:'我再想想', | 653 | + confirmText: '确认提交', |
654 | + cancelText: '我再想想', | ||
655 | success(res) { | 655 | success(res) { |
656 | if (res.confirm) { | 656 | if (res.confirm) { |
657 | let url = 'index/member_center/submit_form'; | 657 | let url = 'index/member_center/submit_form'; |
@@ -692,10 +692,20 @@ Page({ | @@ -692,10 +692,20 @@ Page({ | ||
692 | }) | 692 | }) |
693 | } | 693 | } |
694 | 694 | ||
695 | + }, | ||
695 | 696 | ||
697 | + getpop() { | ||
698 | + wx.showModal({ | ||
699 | + title: '提示', | ||
700 | + content: '如需修改个人信息,请在微信公众号申请:关注微信公众号“白求恩志愿者中心”,点击菜单按钮“修改个人信息”,申请提交。', | ||
701 | + showCancel: false, //是否显示取消按钮 | ||
702 | + }) | ||
696 | }, | 703 | }, |
697 | 704 | ||
705 | + | ||
698 | getdatalist() { | 706 | getdatalist() { |
707 | + | ||
708 | + | ||
699 | let that = this; | 709 | let that = this; |
700 | let url = '/index/member_center/edit'; | 710 | let url = '/index/member_center/edit'; |
701 | let params = { | 711 | let params = { |
@@ -754,11 +764,14 @@ Page({ | @@ -754,11 +764,14 @@ Page({ | ||
754 | unit: res.unit, | 764 | unit: res.unit, |
755 | urgency_phone: res.urgency_phone, | 765 | urgency_phone: res.urgency_phone, |
756 | type: res.type, | 766 | type: res.type, |
757 | - status:res.status | 767 | + status: res.status |
758 | }) | 768 | }) |
759 | }).catch((err) => { | 769 | }).catch((err) => { |
760 | 770 | ||
761 | }) | 771 | }) |
772 | + | ||
773 | + | ||
774 | + | ||
762 | }, | 775 | }, |
763 | /** | 776 | /** |
764 | * 生命周期函数--监听页面加载 | 777 | * 生命周期函数--监听页面加载 |
@@ -241,7 +241,7 @@ | @@ -241,7 +241,7 @@ | ||
241 | </view> | 241 | </view> |
242 | 242 | ||
243 | <view wx:if="{{status==2}}"> | 243 | <view wx:if="{{status==2}}"> |
244 | - <form wx:if="{{!page_type}}" report-submit='true' class="apply_btn"> | 244 | + <form wx:if="{{!page_type}}" bindtap="getpop" report-submit='true' class="apply_btn"> |
245 | <button class="a_btn gray" form-type="submit" style="">提交</button> | 245 | <button class="a_btn gray" form-type="submit" style="">提交</button> |
246 | </form> | 246 | </form> |
247 | </view> | 247 | </view> |
@@ -5,7 +5,8 @@ Page({ | @@ -5,7 +5,8 @@ Page({ | ||
5 | 5 | ||
6 | data: { | 6 | data: { |
7 | id: '', | 7 | id: '', |
8 | - list: '' | 8 | + list: '', |
9 | + shi:'' | ||
9 | }, | 10 | }, |
10 | // | 11 | // |
11 | getactive() { | 12 | getactive() { |
@@ -20,6 +21,14 @@ Page({ | @@ -20,6 +21,14 @@ Page({ | ||
20 | } | 21 | } |
21 | app.post(url,params, head).then((res) => { | 22 | app.post(url,params, head).then((res) => { |
22 | console.log(res) | 23 | console.log(res) |
24 | + let shi = res.content | ||
25 | + shi = shi.replace(/\<img/gi, '<img style="width:100%;height:auto" ') | ||
26 | + that.setData({ | ||
27 | + shi: shi, | ||
28 | + list: res | ||
29 | + }) | ||
30 | + | ||
31 | + | ||
23 | that.setData({ | 32 | that.setData({ |
24 | list: res | 33 | list: res |
25 | 34 |
@@ -4,11 +4,11 @@ | @@ -4,11 +4,11 @@ | ||
4 | <view class="newinfo_list"> | 4 | <view class="newinfo_list"> |
5 | <view class="goods_title">{{list.activity_name}}</view> | 5 | <view class="goods_title">{{list.activity_name}}</view> |
6 | <view class="goods_name"> | 6 | <view class="goods_name"> |
7 | - <image src="/imgs/zhiyuan1.png"></image> {{list.author==null?'':'list.author'}} | 7 | + <image src="/imgs/zhiyuan1.png"></image> {{list.author==null?'':list.author}} |
8 | <image class="goods_time" src="/imgs/zhiyuan2.png"></image>{{list.create_time}} | 8 | <image class="goods_time" src="/imgs/zhiyuan2.png"></image>{{list.create_time}} |
9 | </view> | 9 | </view> |
10 | <view class="newinfo_text"> | 10 | <view class="newinfo_text"> |
11 | - <rich-text nodes="{{list.content}}"></rich-text> | 11 | + <rich-text nodes="{{shi}}"></rich-text> |
12 | </view> | 12 | </view> |
13 | 13 | ||
14 | </view> | 14 | </view> |
@@ -20,7 +20,7 @@ Page({ | @@ -20,7 +20,7 @@ Page({ | ||
20 | datalist: res | 20 | datalist: res |
21 | }) | 21 | }) |
22 | }).catch((err) => { | 22 | }).catch((err) => { |
23 | - | 23 | + console.log(err) |
24 | }) | 24 | }) |
25 | }, | 25 | }, |
26 | // 我的个人信息 | 26 | // 我的个人信息 |
@@ -53,7 +53,7 @@ Page({ | @@ -53,7 +53,7 @@ Page({ | ||
53 | if (res.code == 40000) { | 53 | if (res.code == 40000) { |
54 | wx.showModal({ | 54 | wx.showModal({ |
55 | title: '提示', | 55 | title: '提示', |
56 | - content: '请先成为志愿者' | 56 | + content: '请先申请成为志愿者' |
57 | 57 | ||
58 | }) | 58 | }) |
59 | } else { | 59 | } else { |
@@ -77,7 +77,7 @@ Page({ | @@ -77,7 +77,7 @@ Page({ | ||
77 | if (res.code == 40000) { | 77 | if (res.code == 40000) { |
78 | wx.showModal({ | 78 | wx.showModal({ |
79 | title: '提示', | 79 | title: '提示', |
80 | - content: '请先成为志愿者' | 80 | + content: '请先申请成为志愿者' |
81 | 81 | ||
82 | }) | 82 | }) |
83 | } else { | 83 | } else { |
@@ -101,7 +101,7 @@ Page({ | @@ -101,7 +101,7 @@ Page({ | ||
101 | if (res.code == 40000) { | 101 | if (res.code == 40000) { |
102 | wx.showModal({ | 102 | wx.showModal({ |
103 | title: '提示', | 103 | title: '提示', |
104 | - content: '请先成为志愿者' | 104 | + content: '请先申请成为志愿者' |
105 | 105 | ||
106 | }) | 106 | }) |
107 | } else { | 107 | } else { |
@@ -125,7 +125,7 @@ Page({ | @@ -125,7 +125,7 @@ Page({ | ||
125 | if (res.code == 40000) { | 125 | if (res.code == 40000) { |
126 | wx.showModal({ | 126 | wx.showModal({ |
127 | title: '提示', | 127 | title: '提示', |
128 | - content: '请先成为志愿者' | 128 | + content: '请先申请成为志愿者' |
129 | 129 | ||
130 | }) | 130 | }) |
131 | 131 | ||
@@ -162,7 +162,7 @@ Page({ | @@ -162,7 +162,7 @@ Page({ | ||
162 | if (res.code == 40000) { | 162 | if (res.code == 40000) { |
163 | wx.showModal({ | 163 | wx.showModal({ |
164 | title: '提示', | 164 | title: '提示', |
165 | - content: '请先成为志愿者' | 165 | + content: '请先申请成为志愿者' |
166 | 166 | ||
167 | }) | 167 | }) |
168 | 168 |
@@ -94,9 +94,10 @@ Page({ | @@ -94,9 +94,10 @@ Page({ | ||
94 | 94 | ||
95 | }, | 95 | }, |
96 | // 提交报告 | 96 | // 提交报告 |
97 | - getreport() { | 97 | + getreport(e) { |
98 | + var id =e.currentTarget.dataset.id | ||
98 | wx.navigateTo({ | 99 | wx.navigateTo({ |
99 | - url: '/pages/myactivity/myactivity_report/myactivity_report', | 100 | + url: '/pages/myactivity/myactivity_report/myactivity_report?id='+id, |
100 | }) | 101 | }) |
101 | 102 | ||
102 | }, | 103 | }, |
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | <view class="item {{navs==2?'choose':''}}" bindtap="bindtype" data-navs="{{2}}">已完成打卡</view> | 15 | <view class="item {{navs==2?'choose':''}}" bindtap="bindtype" data-navs="{{2}}">已完成打卡</view> |
16 | </view> | 16 | </view> |
17 | <!-- 待打卡 --> | 17 | <!-- 待打卡 --> |
18 | - <view wx:if="{{navs==1}}" > | 18 | + <view wx:if="{{navs==1}}"> |
19 | <view class="myactive_wrap" bindtap="getdaka" data-id="{{item.id}}" wx:for="{{list}}"> | 19 | <view class="myactive_wrap" bindtap="getdaka" data-id="{{item.id}}" wx:for="{{list}}"> |
20 | <view class="myactive_time"> | 20 | <view class="myactive_time"> |
21 | <image src="/imgs/shijian-19.png"></image>{{item.date}} | 21 | <image src="/imgs/shijian-19.png"></image>{{item.date}} |
@@ -57,27 +57,29 @@ | @@ -57,27 +57,29 @@ | ||
57 | 57 | ||
58 | 58 | ||
59 | </view> | 59 | </view> |
60 | -<!--待提交报告 --> | 60 | + <!--待提交报告 --> |
61 | <view wx:elif="{{nav==2}}"> | 61 | <view wx:elif="{{nav==2}}"> |
62 | <view class="myactive_wrap" wx:for="{{datalist}}"> | 62 | <view class="myactive_wrap" wx:for="{{datalist}}"> |
63 | <view class="myactive_time"> | 63 | <view class="myactive_time"> |
64 | <image src="/imgs/shijian-19.png"></image>{{item.start_time}} | 64 | <image src="/imgs/shijian-19.png"></image>{{item.start_time}} |
65 | - {{ item.start_clock_time}}-{{item.end_clock_time}} | 65 | + <block wx:if="{{item.start_clock_time}}"> |
66 | + {{ item.start_clock_time==null?'':item.start_clock_time}}-{{item.end_clock_time==null?"":item.end_clock_time}} | ||
67 | + </block> | ||
66 | </view> | 68 | </view> |
67 | <view class="myactive_list"> | 69 | <view class="myactive_list"> |
68 | <image src="{{item.thumbnail}}"></image> | 70 | <image src="{{item.thumbnail}}"></image> |
69 | <view class="myactive_name"> | 71 | <view class="myactive_name"> |
70 | <view>{{item.activity_name}}</view> | 72 | <view>{{item.activity_name}}</view> |
71 | <view class="myactive_gps"> | 73 | <view class="myactive_gps"> |
72 | - 获得5小时工时 | 74 | + 获得{{item.work_time==null?"0":item.work_time}}小时工时 |
73 | </view> | 75 | </view> |
74 | </view> | 76 | </view> |
75 | </view> | 77 | </view> |
76 | - <view class="daka dasubmit" bindtap="getreport">提交报告</view> | 78 | + <view class="daka dasubmit" bindtap="getreport" data-id="{{item.id}}">提交报告</view> |
77 | </view> | 79 | </view> |
78 | </view> | 80 | </view> |
79 | 81 | ||
80 | -<!-- 完成的活动 --> | 82 | + <!-- 完成的活动 --> |
81 | <view wx:elif="{{nav==3}}"> | 83 | <view wx:elif="{{nav==3}}"> |
82 | <view class="myactive_wrap" wx:for="{{datalist}}"> | 84 | <view class="myactive_wrap" wx:for="{{datalist}}"> |
83 | <view class="myactive_time"> | 85 | <view class="myactive_time"> |
@@ -12,6 +12,9 @@ Page({ | @@ -12,6 +12,9 @@ Page({ | ||
12 | longitude: '', | 12 | longitude: '', |
13 | time: '', | 13 | time: '', |
14 | my_address: '', | 14 | my_address: '', |
15 | + timeInterval:{}, | ||
16 | + isshowCIty:'' | ||
17 | + | ||
15 | }, | 18 | }, |
16 | 19 | ||
17 | onLoad: function (options) { | 20 | onLoad: function (options) { |
@@ -30,7 +33,7 @@ Page({ | @@ -30,7 +33,7 @@ Page({ | ||
30 | onShow: function () { | 33 | onShow: function () { |
31 | let that = this; | 34 | let that = this; |
32 | that.getList(); | 35 | that.getList(); |
33 | - that.getaddredss() | 36 | + // that.getaddredss() |
34 | // 获取经纬度 | 37 | // 获取经纬度 |
35 | wx.getLocation({ | 38 | wx.getLocation({ |
36 | success: function (res) { | 39 | success: function (res) { |
@@ -61,10 +64,13 @@ Page({ | @@ -61,10 +64,13 @@ Page({ | ||
61 | }) | 64 | }) |
62 | 65 | ||
63 | // 获取时间点 | 66 | // 获取时间点 |
67 | + this.data.timeInterval = setInterval(()=>{ | ||
64 | var time = util.formathour(new Date()); | 68 | var time = util.formathour(new Date()); |
65 | - this.setData({ | 69 | + that.setData({ |
66 | time: time | 70 | time: time |
67 | }) | 71 | }) |
72 | + }) | ||
73 | + | ||
68 | 74 | ||
69 | 75 | ||
70 | }, | 76 | }, |
@@ -112,8 +118,11 @@ Page({ | @@ -112,8 +118,11 @@ Page({ | ||
112 | app.post(url, d, head).then((res) => { | 118 | app.post(url, d, head).then((res) => { |
113 | console.log(res) | 119 | console.log(res) |
114 | wx.showToast({ | 120 | wx.showToast({ |
115 | - title: '打卡成功', | 121 | + title: '上岗打卡成功', |
116 | }) | 122 | }) |
123 | + setTimeout(()=>{ | ||
124 | + that.getList() | ||
125 | + },1200) | ||
117 | 126 | ||
118 | }).catch((err) => { | 127 | }).catch((err) => { |
119 | 128 | ||
@@ -131,6 +140,9 @@ Page({ | @@ -131,6 +140,9 @@ Page({ | ||
131 | } | 140 | } |
132 | let d = { | 141 | let d = { |
133 | id: that.data.id, | 142 | id: that.data.id, |
143 | + long: that.data.latitude, | ||
144 | + lat: that.data.longitude | ||
145 | + | ||
134 | 146 | ||
135 | 147 | ||
136 | } | 148 | } |
@@ -138,8 +150,11 @@ Page({ | @@ -138,8 +150,11 @@ Page({ | ||
138 | app.post(url, d, head).then((res) => { | 150 | app.post(url, d, head).then((res) => { |
139 | console.log(res) | 151 | console.log(res) |
140 | wx.showToast({ | 152 | wx.showToast({ |
141 | - title: '打卡成功', | 153 | + title: '下岗打卡成功', |
142 | }) | 154 | }) |
155 | + setTimeout(()=>{ | ||
156 | + that.getList() | ||
157 | + },1200) | ||
143 | 158 | ||
144 | }).catch((err) => { | 159 | }).catch((err) => { |
145 | 160 | ||
@@ -147,26 +162,26 @@ Page({ | @@ -147,26 +162,26 @@ Page({ | ||
147 | 162 | ||
148 | }, | 163 | }, |
149 | // 获取当前地址 | 164 | // 获取当前地址 |
150 | - getaddredss() { | 165 | + // getaddredss() { |
151 | 166 | ||
152 | - let that = this; | ||
153 | - let url = '/index/second/clockInfo'; | ||
154 | - let head = { | ||
155 | - 'XX-Token': wx.getStorageSync('token') | ||
156 | - } | ||
157 | - let d = { | ||
158 | - id: that.data.id | 167 | + // let that = this; |
168 | + // let url = '/index/second/clockInfo'; | ||
169 | + // let head = { | ||
170 | + // 'XX-Token': wx.getStorageSync('token') | ||
171 | + // } | ||
172 | + // let d = { | ||
173 | + // id: that.data.id | ||
159 | 174 | ||
160 | - } | ||
161 | - app.post(url, d, head).then((res) => { | ||
162 | - that.setData({ | ||
163 | - adddress: res | ||
164 | - }) | 175 | + // } |
176 | + // app.post(url, d, head).then((res) => { | ||
177 | + // that.setData({ | ||
178 | + // adddress: res | ||
179 | + // }) | ||
165 | 180 | ||
166 | - }).catch((err) => { | 181 | + // }).catch((err) => { |
167 | 182 | ||
168 | - }) | ||
169 | - }, | 183 | + // }) |
184 | + // }, | ||
170 | 185 | ||
171 | 186 | ||
172 | // 提示 | 187 | // 提示 |
@@ -177,7 +192,7 @@ Page({ | @@ -177,7 +192,7 @@ Page({ | ||
177 | }, | 192 | }, |
178 | 193 | ||
179 | onHide: function () { | 194 | onHide: function () { |
180 | - | 195 | + clearInterval(this.data.timeInterval) |
181 | }, | 196 | }, |
182 | 197 | ||
183 | /** | 198 | /** |
@@ -3,55 +3,42 @@ Page({ | @@ -3,55 +3,42 @@ Page({ | ||
3 | 3 | ||
4 | 4 | ||
5 | data: { | 5 | data: { |
6 | + id: '', | ||
6 | textareaNum: 0, | 7 | textareaNum: 0, |
7 | name: '', | 8 | name: '', |
8 | - job: '', | ||
9 | - data: '', | ||
10 | - time: '', | 9 | + work_content: '', |
10 | + date: '', | ||
11 | join_reason: '', //加入理由 | 11 | join_reason: '', //加入理由 |
12 | - | 12 | + imageList: [] |
13 | }, | 13 | }, |
14 | 14 | ||
15 | - | ||
16 | - //姓名 | ||
17 | - setname(e) { | ||
18 | - console.log(e) | 15 | + //获取信息 |
16 | + get_info() { | ||
17 | + let that = this | ||
18 | + let url = 'index/index/workReportInfo' | ||
19 | + let params = { | ||
20 | + id: that.data.id | ||
21 | + } | ||
22 | + if (this.data.user_id) { | ||
23 | + params.user_id = this.data.user_id | ||
24 | + } | ||
25 | + let header = { | ||
26 | + 'XX-Token': wx.getStorageSync('token') | ||
27 | + } | ||
28 | + app.post(url, params, header).then((res) => { | ||
29 | + console.log(res) | ||
19 | this.setData({ | 30 | this.setData({ |
20 | - name: e.detail.value | ||
21 | - }) | 31 | + name: res.name, |
32 | + work_content: res.work_content, | ||
33 | + date: res.time[0], | ||
22 | 34 | ||
23 | - }, | ||
24 | - // 工作内容 | ||
25 | - setmove_job(e) { | ||
26 | - console.log(e) | ||
27 | - | ||
28 | - this.setData({ | ||
29 | - job: e.detail.value | ||
30 | }) | 35 | }) |
31 | - }, | ||
32 | - // 日期 | ||
33 | - setmove_data(e) { | ||
34 | - console.log(e) | ||
35 | - | ||
36 | - this.setData({ | ||
37 | - data: e.detail.value | ||
38 | }) | 36 | }) |
39 | - | ||
40 | }, | 37 | }, |
41 | 38 | ||
42 | - // 参加时间 | ||
43 | - setmove_time(e) { | ||
44 | - console.log(e) | ||
45 | - | ||
46 | - this.setData({ | ||
47 | - time: e.detail.value | ||
48 | - }) | ||
49 | - | ||
50 | - }, | ||
51 | //汇报 | 39 | //汇报 |
52 | textareaIn: function (e) { | 40 | textareaIn: function (e) { |
53 | console.log(e) | 41 | console.log(e) |
54 | - | ||
55 | this.setData({ | 42 | this.setData({ |
56 | textareaNum: e.detail.cursor, | 43 | textareaNum: e.detail.cursor, |
57 | join_reason: e.detail.value | 44 | join_reason: e.detail.value |
@@ -88,59 +75,66 @@ Page({ | @@ -88,59 +75,66 @@ Page({ | ||
88 | 75 | ||
89 | 76 | ||
90 | 77 | ||
78 | + // 提交 | ||
79 | + submit(e) { | ||
80 | + let that = this; | ||
91 | 81 | ||
92 | - // submit(e) { | ||
93 | - // let that = this; | ||
94 | - | ||
95 | - // let url = '/index/second/applyTeam'; | ||
96 | - // let head = { | ||
97 | - // 'XX-Token': wx.getStorageSync('token') | ||
98 | - // } | ||
99 | - // let params = { | ||
100 | - // name: that.data.name, | ||
101 | - // job: that.data.job, | ||
102 | - // data: that.data.data, | ||
103 | - // time: that.data.time, | ||
104 | - // join_reason: that.data.join_reason | ||
105 | - // } | ||
106 | - | ||
107 | - // app.post(url, params, head).then((res) => { | ||
108 | - | ||
109 | - // wx.showModal({ | ||
110 | - // title: '提示', | ||
111 | - // content: '请仔细核对信息,确认无误!', | ||
112 | - // confirmText: '确认提交', | ||
113 | - // cancelText: '我再想想', | ||
114 | - // success(res) { | ||
115 | - // if (res.confirm) { | ||
116 | - | ||
117 | - // wx.showToast({ | ||
118 | - // title: '提交成功,等待审核', | ||
119 | - // mask: true, | ||
120 | - // icon: 'none', | ||
121 | - // // duration: 2000 | ||
122 | - // }) | ||
123 | - // setTimeout(function () { | ||
124 | - // wx.navigateBack({ | ||
125 | - // delta: 0, | ||
126 | - // }) | ||
127 | - // }, 1000) | ||
128 | - // console.log('用户点击确定') | ||
129 | - // } else if (res.cancel) { | ||
130 | - | ||
131 | - // console.log('用户点击取消') | ||
132 | - // } | ||
133 | - // } | ||
134 | - // }) | 82 | + if (that.data.imageList == '') { |
83 | + wx.showToast({ | ||
84 | + title: '请选择图片', | ||
85 | + icon: 'none' | ||
86 | + }) | ||
87 | + return | ||
135 | 88 | ||
89 | + } else if (that.data.join_reason == '') { | ||
90 | + wx.showToast({ | ||
91 | + title: '请输入汇报内容', | ||
92 | + icon: 'none' | ||
93 | + }) | ||
94 | + return | ||
136 | 95 | ||
137 | - // }).catch(() => {}) | 96 | + } |
138 | 97 | ||
139 | 98 | ||
99 | + let head = { | ||
100 | + 'XX-Token': wx.getStorageSync('token') | ||
101 | + } | ||
102 | + let params = { | ||
103 | + id: that.data.id, | ||
104 | + work_report: that.data.join_reason, | ||
105 | + work_pic: that.data.imageList | ||
106 | + } | ||
140 | 107 | ||
108 | + wx.showModal({ | ||
109 | + title: '提示', | ||
110 | + content: '请仔细核对信息,确认无误!', | ||
111 | + confirmText: '确认提交', | ||
112 | + cancelText: '我再想想', | ||
113 | + success(res) { | ||
114 | + if (res.confirm) { | ||
115 | + let url = '/index/index/sginIn'; | ||
116 | + app.post(url, params, head).then((res) => { | ||
117 | + wx.showToast({ | ||
118 | + title: '提交成功', | ||
119 | + mask: true, | ||
120 | + icon: 'none', | ||
121 | + // duration: 2000 | ||
122 | + }) | ||
123 | + setTimeout(function () { | ||
124 | + wx.navigateBack({ | ||
125 | + delta: 0, | ||
126 | + }) | ||
127 | + }, 1000) | ||
128 | + console.log('用户点击确定') | ||
141 | 129 | ||
130 | + }).catch(() => {}) | ||
142 | 131 | ||
143 | - // }, | 132 | + } else if (res.cancel) { |
133 | + console.log('用户点击取消') | ||
134 | + } | ||
135 | + } | ||
136 | + }) | ||
137 | + }, | ||
144 | 138 | ||
145 | 139 | ||
146 | 140 | ||
@@ -149,23 +143,20 @@ Page({ | @@ -149,23 +143,20 @@ Page({ | ||
149 | * 生命周期函数--监听页面加载 | 143 | * 生命周期函数--监听页面加载 |
150 | */ | 144 | */ |
151 | onLoad: function (options) { | 145 | onLoad: function (options) { |
152 | - // console.log(options) | 146 | + console.log(options) |
153 | this.setData({ | 147 | this.setData({ |
154 | id: options.id | 148 | id: options.id |
155 | }) | 149 | }) |
156 | }, | 150 | }, |
157 | 151 | ||
158 | - /** | ||
159 | - * 生命周期函数--监听页面初次渲染完成 | ||
160 | - */ | 152 | + |
161 | onReady: function () { | 153 | onReady: function () { |
162 | 154 | ||
163 | }, | 155 | }, |
164 | 156 | ||
165 | - /** | ||
166 | - * 生命周期函数--监听页面显示 | ||
167 | - */ | ||
168 | onShow: function () { | 157 | onShow: function () { |
158 | + let that = this | ||
159 | + that.get_info() | ||
169 | 160 | ||
170 | }, | 161 | }, |
171 | 162 |
@@ -2,8 +2,7 @@ | @@ -2,8 +2,7 @@ | ||
2 | <view class='apply_item'> | 2 | <view class='apply_item'> |
3 | <view>姓名</view> | 3 | <view>姓名</view> |
4 | <view class='apply_item_input'> | 4 | <view class='apply_item_input'> |
5 | - <input placeholder='请输入姓名' placeholder-class='input_p' bindinput='setname' value='{{name}}' | ||
6 | - disabled="{{page_type}}"></input> | 5 | + {{name}} |
7 | </view> | 6 | </view> |
8 | </view> | 7 | </view> |
9 | <view class="line"> | 8 | <view class="line"> |
@@ -13,8 +12,7 @@ | @@ -13,8 +12,7 @@ | ||
13 | <view class='apply_item'> | 12 | <view class='apply_item'> |
14 | <view>工作内容</view> | 13 | <view>工作内容</view> |
15 | <view class='apply_item_input'> | 14 | <view class='apply_item_input'> |
16 | - <input placeholder='请输入工作内容' placeholder-class='input_p' bindinput='setmove_job' value='{{job}}' | ||
17 | - disabled="{{page_type}}"></input> | 15 | + {{work_content}} |
18 | </view> | 16 | </view> |
19 | </view> | 17 | </view> |
20 | <view class="line"> | 18 | <view class="line"> |
@@ -24,8 +22,7 @@ | @@ -24,8 +22,7 @@ | ||
24 | <view class='apply_item'> | 22 | <view class='apply_item'> |
25 | <view>参加日期</view> | 23 | <view>参加日期</view> |
26 | <view class='apply_item_input'> | 24 | <view class='apply_item_input'> |
27 | - <input placeholder='请输入参加日期' placeholder-class='input_p' bindinput='setmove_data' value='{{data}}' | ||
28 | - disabled="{{page_type}}"></input> | 25 | + {{date.date}} |
29 | </view> | 26 | </view> |
30 | </view> | 27 | </view> |
31 | <view class="line"> | 28 | <view class="line"> |
@@ -35,8 +32,7 @@ | @@ -35,8 +32,7 @@ | ||
35 | <view class='apply_item'> | 32 | <view class='apply_item'> |
36 | <view>参加时间</view> | 33 | <view>参加时间</view> |
37 | <view class='apply_item_input'> | 34 | <view class='apply_item_input'> |
38 | - <input placeholder='请输入参加时间' placeholder-class='input_p' bindinput='setmove_time' value='{{time}}' | ||
39 | - disabled="{{page_type}}"></input> | 35 | + {{date.time}} |
40 | </view> | 36 | </view> |
41 | </view> | 37 | </view> |
42 | 38 | ||
@@ -44,7 +40,6 @@ | @@ -44,7 +40,6 @@ | ||
44 | <!-- 感想汇报 --> | 40 | <!-- 感想汇报 --> |
45 | <view class="doc-listform"> | 41 | <view class="doc-listform"> |
46 | <view>图片上传</view> | 42 | <view>图片上传</view> |
47 | - | ||
48 | <view class="doc-Images"> | 43 | <view class="doc-Images"> |
49 | <view wx:for="{{imageList}}" wx:key="{{item}}" class="doc-ImageList"> | 44 | <view wx:for="{{imageList}}" wx:key="{{item}}" class="doc-ImageList"> |
50 | <image src="{{item}}"> | 45 | <image src="{{item}}"> |
@@ -54,9 +49,6 @@ | @@ -54,9 +49,6 @@ | ||
54 | </view> | 49 | </view> |
55 | <button bindtap="ChooseImage" class="chooseImage">+</button> | 50 | <button bindtap="ChooseImage" class="chooseImage">+</button> |
56 | </view> | 51 | </view> |
57 | - | ||
58 | - | ||
59 | - | ||
60 | <view> 感想汇报</view> | 52 | <view> 感想汇报</view> |
61 | <textarea show-confirm-bar="" placeholder="请输入内容,内容最多为500字" maxlength="500" bindinput="textareaIn" | 53 | <textarea show-confirm-bar="" placeholder="请输入内容,内容最多为500字" maxlength="500" bindinput="textareaIn" |
62 | value='{{join_reason}}'> | 54 | value='{{join_reason}}'> |
@@ -23,7 +23,11 @@ | @@ -23,7 +23,11 @@ | ||
23 | color: #333; | 23 | color: #333; |
24 | font-size: 28rpx; | 24 | font-size: 28rpx; |
25 | } | 25 | } |
26 | +.apply_item_input image{ | ||
26 | 27 | ||
28 | + width: 12rpx; | ||
29 | + height: 20rpx; | ||
30 | +} | ||
27 | .apply_item_input input { | 31 | .apply_item_input input { |
28 | width: 100%; | 32 | width: 100%; |
29 | } | 33 | } |
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | <view>姓名:{{list.name}}</view> | 7 | <view>姓名:{{list.name}}</view> |
8 | <view>身份:{{list.status}}</view> | 8 | <view>身份:{{list.status}}</view> |
9 | <view>编号:{{list.user_num}}</view> | 9 | <view>编号:{{list.user_num}}</view> |
10 | - <view>学时:{{list.work_time==null?'':'list.work_time'}}</view> | 10 | + <view>学时:{{list.work_time==null?'':list.work_time}}</view> |
11 | </view> | 11 | </view> |
12 | <image class="One_inch_photos" src="{{list.avatar}}"></image> | 12 | <image class="One_inch_photos" src="{{list.avatar}}"></image> |
13 | </view> | 13 | </view> |
@@ -15,15 +15,10 @@ Page({ | @@ -15,15 +15,10 @@ Page({ | ||
15 | } | 15 | } |
16 | 16 | ||
17 | app.post(url, '', head).then((res) => { | 17 | app.post(url, '', head).then((res) => { |
18 | - | ||
19 | console.log(res) | 18 | console.log(res) |
20 | that.setData({ | 19 | that.setData({ |
21 | list: res | 20 | list: res |
22 | - | ||
23 | - | ||
24 | }) | 21 | }) |
25 | - | ||
26 | - | ||
27 | }).catch(() => {}) | 22 | }).catch(() => {}) |
28 | 23 | ||
29 | }, | 24 | }, |
@@ -31,7 +26,7 @@ Page({ | @@ -31,7 +26,7 @@ Page({ | ||
31 | // 我的志愿者资料 | 26 | // 我的志愿者资料 |
32 | getmyData() { | 27 | getmyData() { |
33 | wx.navigateTo({ | 28 | wx.navigateTo({ |
34 | - url: '/pages/apply/apply', | 29 | + url: '/pages/apply/apply?id=' + this.data.list.id + "&is_submit=" + this.data.list.is_submit, |
35 | }) | 30 | }) |
36 | }, | 31 | }, |
37 | 32 |
@@ -36,7 +36,7 @@ | @@ -36,7 +36,7 @@ | ||
36 | <view>可用工时</view> | 36 | <view>可用工时</view> |
37 | </view> | 37 | </view> |
38 | <view class="my_active"> | 38 | <view class="my_active"> |
39 | - <view>{{datalist.user.work_time==null?'0':'datalist.user.work_time'}}</view> | 39 | + <view>{{datalist.user.work_time==null?'0':datalist.user.work_time}}</view> |
40 | <view>累计总共工时</view> | 40 | <view>累计总共工时</view> |
41 | </view> | 41 | </view> |
42 | <view class="my_active"> | 42 | <view class="my_active"> |
@@ -38,6 +38,7 @@ Page({ | @@ -38,6 +38,7 @@ Page({ | ||
38 | title: '正在开启', | 38 | title: '正在开启', |
39 | mask: true | 39 | mask: true |
40 | }) | 40 | }) |
41 | + console.log(res.token) | ||
41 | wx.setStorageSync('token', res.token) | 42 | wx.setStorageSync('token', res.token) |
42 | setTimeout(() => { | 43 | setTimeout(() => { |
43 | wx.hideLoading() | 44 | wx.hideLoading() |
@@ -316,6 +316,12 @@ | @@ -316,6 +316,12 @@ | ||
316 | "pathName": "pages/myfeedback_lists/myfeedback_lists", | 316 | "pathName": "pages/myfeedback_lists/myfeedback_lists", |
317 | "query": "", | 317 | "query": "", |
318 | "scene": null | 318 | "scene": null |
319 | + }, | ||
320 | + { | ||
321 | + "id": -1, | ||
322 | + "name": "pages/myactivity/myactivity_report/myactivity_report", | ||
323 | + "pathName": "pages/myactivity/myactivity_report/myactivity_report", | ||
324 | + "scene": null | ||
319 | } | 325 | } |
320 | ] | 326 | ] |
321 | } | 327 | } |
-
请 注册 或 登录 后发表评论