作者 王智

bug

@@ -725,11 +725,10 @@ Page({ @@ -725,11 +725,10 @@ Page({
725 725
726 }, 726 },
727 727
728 - getpop() {  
729 -  
730 -  
731 728
  729 +
732 730
  731 + getpop() {
733 wx.showModal({ 732 wx.showModal({
734 title: '提示', 733 title: '提示',
735 content: '如需修改个人信息,请在微信公众号申请:关注微信公众号“白求恩志愿者中心”,点击菜单按钮“修改个人信息”,申请提交。', 734 content: '如需修改个人信息,请在微信公众号申请:关注微信公众号“白求恩志愿者中心”,点击菜单按钮“修改个人信息”,申请提交。',
@@ -16,9 +16,9 @@ Page({ @@ -16,9 +16,9 @@ Page({
16 "门诊服务" 16 "门诊服务"
17 ], 17 ],
18 time_arr: [ 18 time_arr: [
19 - "上午", "下午" 19 + "上午", "下午","全天"
20 ], 20 ],
21 - 21 +
22 t_arr: [{ //选择日期数组 22 t_arr: [{ //选择日期数组
23 data: '', 23 data: '',
24 time: '' 24 time: ''
@@ -31,7 +31,7 @@ Page({ @@ -31,7 +31,7 @@ Page({
31 e_arr: [ //申请用餐数组 31 e_arr: [ //申请用餐数组
32 { 32 {
33 time: '', 33 time: '',
34 - night:'' 34 + night: ''
35 } 35 }
36 ], 36 ],
37 37
@@ -42,54 +42,67 @@ Page({ @@ -42,54 +42,67 @@ Page({
42 zhiyuan: '', 42 zhiyuan: '',
43 show: false, 43 show: false,
44 shows: false, 44 shows: false,
45 - shownight:false,  
46 - showdate:false,  
47 - arr:[],  
48 - },  
49 -  
50 -//日历  
51 -// 参加日期  
52 -onDisplaydate() {  
53 - this.setData({  
54 - showdate: true  
55 - });  
56 -},  
57 -  
58 -onClosedate() {  
59 - this.setData({  
60 - showdate: false  
61 - });  
62 -},  
63 -  
64 -onConfirmdate(event) {  
65 -  
66 - console.log(event)  
67 - var that = this;  
68 - var dates = event.detail  
69 - console.log(dates);  
70 - var list = [];  
71 - event.detail.forEach(item => {  
72 - var date = new Date(item);  
73 - console.log(date)  
74 -  
75 - var year = date.getFullYear();  
76 - var m = date.getMonth() + 1;  
77 - var d = date.getDate();  
78 -  
79 - var Data = year + "/" + m + "/" + d  
80 - list.push(Data);  
81 - });  
82 -  
83 -  
84 - console.log('1111111111111111', list)  
85 - this.setData({ 45 + shownight: false,
86 showdate: false, 46 showdate: false,
87 - data: list.join(',')  
88 - }); 47 + selectdata:[],
  48 + arr: [],
  49 + lunch: [],
  50 + dinner: [],
  51 + },
  52 +
  53 + //日历
  54 + // 参加日期
  55 + onDisplaydate() {
  56 + this.setData({
  57 + showdate: true
  58 + });
  59 + },
  60 +
  61 + onClosedate() {
  62 + this.setData({
  63 + showdate: false
  64 + });
  65 + },
  66 +
  67 + onConfirmdate(event) {
  68 +
  69 + console.log(event)
  70 + var that = this;
  71 + var dates = event.detail
  72 + console.log(dates);
  73 + var list = [];
  74 + event.detail.forEach(item => {
  75 + var date = new Date(item);
  76 + console.log(date)
  77 +
  78 + var year = date.getFullYear();
  79 + var m = date.getMonth() + 1;
  80 + var d = date.getDate();
  81 +
  82 + var Data = year + "/" + m + "/" + d
  83 + list.push(Data);
  84 + });
  85 + let data = [];
  86 + console.log('1111111111111111', list)
  87 + list.forEach(item => {
  88 + console.log("item-", item);
  89 + data.push({
  90 + date: item
  91 + })
  92 + })
  93 + console.log("---", data);
  94 +
  95 + console.log('1111111111111111', list)
  96 + this.setData({
  97 + showdate: false,
  98 + data: list.join(','),
  99 + selectdata: data
89 100
  101 + });
90 102
91 -},  
92 -// 入住日期 103 +
  104 + },
  105 + // 入住日期
93 onDisplay() { 106 onDisplay() {
94 this.setData({ 107 this.setData({
95 show: true 108 show: true
@@ -119,23 +132,23 @@ onConfirmdate(event) { @@ -119,23 +132,23 @@ onConfirmdate(event) {
119 list.push(Data); 132 list.push(Data);
120 }); 133 });
121 134
122 - let data=[]; 135 + let data = [];
123 console.log('1111111111111111', list) 136 console.log('1111111111111111', list)
124 list.forEach(item => { 137 list.forEach(item => {
125 - console.log("item-",item); 138 + console.log("item-", item);
126 data.push({ 139 data.push({
127 - date:item 140 + date: item
128 }) 141 })
129 }) 142 })
130 - console.log("---",data); 143 + console.log("---", data);
131 this.setData({ 144 this.setData({
132 show: false, 145 show: false,
133 date: list.join(','), 146 date: list.join(','),
134 - arr:data, 147 + arr: data,
135 }); 148 });
136 }, 149 },
137 150
138 -//午餐 151 + //午餐
139 onDisplays() { 152 onDisplays() {
140 this.setData({ 153 this.setData({
141 shows: true 154 shows: true
@@ -167,16 +180,27 @@ onConfirmdate(event) { @@ -167,16 +180,27 @@ onConfirmdate(event) {
167 list.push(Data); 180 list.push(Data);
168 }); 181 });
169 182
  183 + let data = [];
  184 + console.log('1111111111111111', list)
  185 + list.forEach(item => {
  186 + console.log("item-", item);
  187 + data.push({
  188 + date: item
  189 + })
  190 + })
  191 + console.log("---", data);
170 192
171 console.log('1111111111111111', list) 193 console.log('1111111111111111', list)
172 this.setData({ 194 this.setData({
173 shows: false, 195 shows: false,
174 - time: list.join(',') 196 + time: list.join(','),
  197 + lunch: data,
  198 +
175 }); 199 });
176 200
177 201
178 }, 202 },
179 -// 晚餐 203 + // 晚餐
180 onDisplaynight() { 204 onDisplaynight() {
181 this.setData({ 205 this.setData({
182 shownight: true 206 shownight: true
@@ -208,27 +232,26 @@ onConfirmdate(event) { @@ -208,27 +232,26 @@ onConfirmdate(event) {
208 list.push(Data); 232 list.push(Data);
209 }); 233 });
210 234
211 - 235 + let data = [];
  236 + console.log('1111111111111111', list)
  237 + list.forEach(item => {
  238 + console.log("item-", item);
  239 + data.push({
  240 + date: item
  241 + })
  242 + })
  243 + console.log("---", data);
212 console.log('1111111111111111', list) 244 console.log('1111111111111111', list)
213 this.setData({ 245 this.setData({
214 shownight: false, 246 shownight: false,
215 - night: list.join(',') 247 + night: list.join(','),
  248 + dinner: data
  249 +
216 }); 250 });
217 251
218 252
219 }, 253 },
220 254
221 -  
222 -  
223 -  
224 -  
225 -  
226 -  
227 -  
228 - //  
229 -  
230 -  
231 -  
232 // 获取到焦点 255 // 获取到焦点
233 focus: function (e) { 256 focus: function (e) {
234 this.setData({ 257 this.setData({
@@ -345,10 +368,10 @@ onConfirmdate(event) { @@ -345,10 +368,10 @@ onConfirmdate(event) {
345 let index = e.currentTarget.dataset.index 368 let index = e.currentTarget.dataset.index
346 // let id = e.currentTarget.dataset.id 369 // let id = e.currentTarget.dataset.id
347 let zindex = Number(e.detail.value) 370 let zindex = Number(e.detail.value)
348 -  
349 - that.setData({  
350 - [`t_arr[${index}].date`]: that.data.date_arr[zindex]  
351 - }) 371 +
  372 + that.setData({
  373 + [`t_arr[${index}].date`]: that.data.date_arr[zindex]
  374 + })
352 375
353 376
354 // else if (id == 2) { 377 // else if (id == 2) {
@@ -576,21 +599,21 @@ onConfirmdate(event) { @@ -576,21 +599,21 @@ onConfirmdate(event) {
576 }) 599 })
577 return 600 return
578 } 601 }
579 - if (that.data.t_type == false) { 602 + if (that.data.selectdata == '') {
580 wx.showToast({ 603 wx.showToast({
581 title: '请先完善选择日期信息', 604 title: '请先完善选择日期信息',
582 icon: 'none' 605 icon: 'none'
583 }) 606 })
584 return 607 return
585 } 608 }
586 - if (that.data.z_type == false) { 609 + if (that.data.arr == '') {
587 wx.showToast({ 610 wx.showToast({
588 title: '请先完善申请入住信息', 611 title: '请先完善申请入住信息',
589 icon: 'none' 612 icon: 'none'
590 }) 613 })
591 return 614 return
592 } 615 }
593 - if (that.data.e_type == false) { 616 + if (that.data.lunch =='' ) {
594 wx.showToast({ 617 wx.showToast({
595 title: '请先完善申请用餐信息', 618 title: '请先完善申请用餐信息',
596 icon: 'none' 619 icon: 'none'
@@ -654,10 +677,16 @@ onConfirmdate(event) { @@ -654,10 +677,16 @@ onConfirmdate(event) {
654 form_id: form_id, 677 form_id: form_id,
655 type: that.data.type_id, 678 type: that.data.type_id,
656 work_content: that.data.check_id, 679 work_content: that.data.check_id,
657 - select_time: JSON.stringify(that.data.t_arr), 680 + // select_time: JSON.stringify(that.data.t_arr),
  681 + select_time: JSON.stringify(that.data.selectdata),
658 // apply_stay: JSON.stringify(that.data.z_arr), 682 // apply_stay: JSON.stringify(that.data.z_arr),
659 apply_stay: JSON.stringify(that.data.arr), 683 apply_stay: JSON.stringify(that.data.arr),
660 - apply_food: JSON.stringify(that.data.e_arr) 684 + // apply_food: JSON.stringify(that.data.e_arr)
  685 + apply_lunch_food: JSON.stringify(that.data.lunch),
  686 + apply_dinner_food: JSON.stringify(that.data.dinner)
  687 +
  688 +
  689 +
661 } 690 }
662 let header = { 691 let header = {
663 'XX-Token': wx.getStorageSync('token') 692 'XX-Token': wx.getStorageSync('token')
@@ -63,6 +63,7 @@ @@ -63,6 +63,7 @@
63 63
64 64
65 </view> 65 </view>
  66 +
66 <view class="item"> 67 <view class="item">
67 <view class="left"> 68 <view class="left">
68 <image src="/imgs/must.png" /> 参加时间 69 <image src="/imgs/must.png" /> 参加时间
@@ -71,11 +71,24 @@ Page({ @@ -71,11 +71,24 @@ Page({
71 71
72 }, 72 },
73 73
  74 + //志愿者详情
  75 + getdetail(e) {
  76 + var id = e.currentTarget.dataset.id
  77 + wx.navigateTo({
  78 + url: '/pages/more_other/more_other?id=' + id,
  79 + })
74 80
75 81
76 82
  83 + },
  84 + // 团队详情
  85 + getteam(e){
  86 + var id = e.currentTarget.dataset.id
  87 + wx.navigateTo({
  88 + url: '/pages/Volunteer_detail/Volunteer_detail?id=' + id,
  89 + })
77 90
78 - 91 + }
79 92
80 93
81 94
@@ -15,8 +15,14 @@ @@ -15,8 +15,14 @@
15 <view class="item {{navs==5?'choose':''}}" bindtap="bindtype" data-navs="{{5}}">五星</view> 15 <view class="item {{navs==5?'choose':''}}" bindtap="bindtype" data-navs="{{5}}">五星</view>
16 <view class="item {{navs==6?'choose':''}}" bindtap="bindtype" data-navs="{{6}}">金牌</view> 16 <view class="item {{navs==6?'choose':''}}" bindtap="bindtype" data-navs="{{6}}">金牌</view>
17 </view> 17 </view>
  18 + <view class="goods_groups">
  19 + <view>排名</view>
  20 + <view>姓名</view>
  21 + <view>地区</view>
  22 + <view>工时</view>
  23 + </view>
18 <view wx:if="{{navs}}"> 24 <view wx:if="{{navs}}">
19 - <view class="goods_groups" wx:for="{{list}}"> 25 + <view class="goods_groups" wx:for="{{list}}" data-id="{{item.user_id}}" bindtap="getdetail">
20 <view>{{index+1}}</view> 26 <view>{{index+1}}</view>
21 <view>{{item.name}}</view> 27 <view>{{item.name}}</view>
22 <view>{{item.province}}</view> 28 <view>{{item.province}}</view>
@@ -27,7 +33,12 @@ @@ -27,7 +33,12 @@
27 </view> 33 </view>
28 34
29 <view wx:elif="{{nav==2}}"> 35 <view wx:elif="{{nav==2}}">
30 - <view class="goods_groups" wx:for="{{list}}"> 36 + <view class="goods_groups">
  37 + <view>序号</view>
  38 + <view>团队名称</view>
  39 + <view>团队总工时</view>
  40 + </view>
  41 + <view class="goods_groups" wx:for="{{list}}" data-id="{{item.team_id}}" bindtap="getteam">
31 <view>{{index+1}}</view> 42 <view>{{index+1}}</view>
32 <view>{{item.name}}</view> 43 <view>{{item.name}}</view>
33 <view>{{item.work_time}}</view> 44 <view>{{item.work_time}}</view>
@@ -5,7 +5,8 @@ @@ -5,7 +5,8 @@
5 datalist: '', 5 datalist: '',
6 goodsInfo: {}, 6 goodsInfo: {},
7 count: 1, 7 count: 1,
8 - remark:'' 8 + remark: '',
  9 + num:''
9 }, 10 },
10 11
11 12
@@ -68,10 +69,10 @@ @@ -68,10 +69,10 @@
68 let head = { 69 let head = {
69 'XX-Token': wx.getStorageSync('token') 70 'XX-Token': wx.getStorageSync('token')
70 } 71 }
71 - if(that.data.datalist==null){ 72 + if (that.data.datalist == null) {
72 wx.showToast({ 73 wx.showToast({
73 - title: '请选择收货地址',  
74 - icon:'none' 74 + title: '请选择收货地址',
  75 + icon: 'none'
75 }) 76 })
76 return; 77 return;
77 } 78 }
@@ -79,17 +80,23 @@ @@ -79,17 +80,23 @@
79 good_id: that.data.goodsInfo.id, 80 good_id: that.data.goodsInfo.id,
80 num: that.data.count, 81 num: that.data.count,
81 address_id: that.data.datalist.id, 82 address_id: that.data.datalist.id,
82 - remark:that.data.remark 83 + remark: that.data.remark
83 }, head).then((res) => { 84 }, head).then((res) => {
84 console.log(res) 85 console.log(res)
  86 + that.setData({
  87 + num: res
  88 +
  89 + })
  90 + wx.setStorageSync('goods', that.data.num)
  91 +
85 wx.showToast({ 92 wx.showToast({
86 title: '兑换成功', 93 title: '兑换成功',
87 }) 94 })
88 setTimeout(function () { 95 setTimeout(function () {
89 wx.navigateTo({ 96 wx.navigateTo({
90 - url: '/pages/myfeedback/myfeedback_list/myfeedback_list' 97 + url: '/pages/myfeedback/myfeedback_list/myfeedback_list'
91 }) 98 })
92 - }, 1000) 99 + }, 1000)
93 100
94 101
95 102
@@ -103,7 +110,7 @@ @@ -103,7 +110,7 @@
103 // console.log(e) 110 // console.log(e)
104 type == 'minus' ? 111 type == 'minus' ?
105 this.setData({ 112 this.setData({
106 - count: this.data.count == 1 ? 1 : this.data.count-1 113 + count: this.data.count == 1 ? 1 : this.data.count - 1
107 }) : 114 }) :
108 this.setData({ 115 this.setData({
109 count: this.data.count + 1 116 count: this.data.count + 1
@@ -113,7 +120,7 @@ @@ -113,7 +120,7 @@
113 bindremark(e) { 120 bindremark(e) {
114 // console.log(e.detail.value) 121 // console.log(e.detail.value)
115 this.setData({ 122 this.setData({
116 - remark:e.detail.value 123 + remark: e.detail.value
117 }) 124 })
118 }, 125 },
119 126
@@ -5,7 +5,7 @@ Page({ @@ -5,7 +5,7 @@ Page({
5 * 页面的初始数据 5 * 页面的初始数据
6 */ 6 */
7 data: { 7 data: {
8 - 8 + goods:''
9 }, 9 },
10 getanswer() { 10 getanswer() {
11 wx.navigateTo({ 11 wx.navigateTo({
@@ -18,6 +18,9 @@ Page({ @@ -18,6 +18,9 @@ Page({
18 * 生命周期函数--监听页面加载 18 * 生命周期函数--监听页面加载
19 */ 19 */
20 onLoad: function (options) { 20 onLoad: function (options) {
  21 + this.setData({
  22 + goods: wx.getStorageSync('goods')
  23 + })
21 24
22 }, 25 },
23 26
@@ -3,10 +3,10 @@ @@ -3,10 +3,10 @@
3 <view class="list_post"> 3 <view class="list_post">
4 <view class="list_status">兑换申请提交成功 待审核</view> 4 <view class="list_status">兑换申请提交成功 待审核</view>
5 <view class="list_num"> 5 <view class="list_num">
6 - <image src="/imgs/dingdan.png"></image> 订单编号:12345678910 6 + <image src="/imgs/dingdan.png"></image> 订单编号:{{goods.order_sn}}
7 </view> 7 </view>
8 <view class="list_num"> 8 <view class="list_num">
9 - <image src="/imgs/dingdan1.png"></image> 兑换时间:2020-02-21 13:0 9 + <image src="/imgs/dingdan1.png"></image> 兑换时间:{{goods.datetime}}
10 </view> 10 </view>
11 </view> 11 </view>
12 </view> 12 </view>