作者 王智

bug

... ... @@ -725,11 +725,10 @@ Page({
},
getpop() {
getpop() {
wx.showModal({
title: '提示',
content: '如需修改个人信息,请在微信公众号申请:关注微信公众号“白求恩志愿者中心”,点击菜单按钮“修改个人信息”,申请提交。',
... ...
... ... @@ -16,9 +16,9 @@ Page({
"门诊服务"
],
time_arr: [
"上午", "下午"
"上午", "下午","全天"
],
t_arr: [{ //选择日期数组
data: '',
time: ''
... ... @@ -31,7 +31,7 @@ Page({
e_arr: [ //申请用餐数组
{
time: '',
night:''
night: ''
}
],
... ... @@ -42,54 +42,67 @@ Page({
zhiyuan: '',
show: false,
shows: false,
shownight:false,
showdate:false,
arr:[],
},
//日历
// 参加日期
onDisplaydate() {
this.setData({
showdate: true
});
},
onClosedate() {
this.setData({
showdate: false
});
},
onConfirmdate(event) {
console.log(event)
var that = this;
var dates = event.detail
console.log(dates);
var list = [];
event.detail.forEach(item => {
var date = new Date(item);
console.log(date)
var year = date.getFullYear();
var m = date.getMonth() + 1;
var d = date.getDate();
var Data = year + "/" + m + "/" + d
list.push(Data);
});
console.log('1111111111111111', list)
this.setData({
shownight: false,
showdate: false,
data: list.join(',')
});
selectdata:[],
arr: [],
lunch: [],
dinner: [],
},
//日历
// 参加日期
onDisplaydate() {
this.setData({
showdate: true
});
},
onClosedate() {
this.setData({
showdate: false
});
},
onConfirmdate(event) {
console.log(event)
var that = this;
var dates = event.detail
console.log(dates);
var list = [];
event.detail.forEach(item => {
var date = new Date(item);
console.log(date)
var year = date.getFullYear();
var m = date.getMonth() + 1;
var d = date.getDate();
var Data = year + "/" + m + "/" + d
list.push(Data);
});
let data = [];
console.log('1111111111111111', list)
list.forEach(item => {
console.log("item-", item);
data.push({
date: item
})
})
console.log("---", data);
console.log('1111111111111111', list)
this.setData({
showdate: false,
data: list.join(','),
selectdata: data
});
},
// 入住日期
},
// 入住日期
onDisplay() {
this.setData({
show: true
... ... @@ -119,23 +132,23 @@ onConfirmdate(event) {
list.push(Data);
});
let data=[];
let data = [];
console.log('1111111111111111', list)
list.forEach(item => {
console.log("item-",item);
console.log("item-", item);
data.push({
date:item
date: item
})
})
console.log("---",data);
console.log("---", data);
this.setData({
show: false,
date: list.join(','),
arr:data,
arr: data,
});
},
//午餐
//午餐
onDisplays() {
this.setData({
shows: true
... ... @@ -167,16 +180,27 @@ onConfirmdate(event) {
list.push(Data);
});
let data = [];
console.log('1111111111111111', list)
list.forEach(item => {
console.log("item-", item);
data.push({
date: item
})
})
console.log("---", data);
console.log('1111111111111111', list)
this.setData({
shows: false,
time: list.join(',')
time: list.join(','),
lunch: data,
});
},
// 晚餐
// 晚餐
onDisplaynight() {
this.setData({
shownight: true
... ... @@ -208,27 +232,26 @@ onConfirmdate(event) {
list.push(Data);
});
let data = [];
console.log('1111111111111111', list)
list.forEach(item => {
console.log("item-", item);
data.push({
date: item
})
})
console.log("---", data);
console.log('1111111111111111', list)
this.setData({
shownight: false,
night: list.join(',')
night: list.join(','),
dinner: data
});
},
//
// 获取到焦点
focus: function (e) {
this.setData({
... ... @@ -345,10 +368,10 @@ onConfirmdate(event) {
let index = e.currentTarget.dataset.index
// let id = e.currentTarget.dataset.id
let zindex = Number(e.detail.value)
that.setData({
[`t_arr[${index}].date`]: that.data.date_arr[zindex]
})
that.setData({
[`t_arr[${index}].date`]: that.data.date_arr[zindex]
})
// else if (id == 2) {
... ... @@ -576,21 +599,21 @@ onConfirmdate(event) {
})
return
}
if (that.data.t_type == false) {
if (that.data.selectdata == '') {
wx.showToast({
title: '请先完善选择日期信息',
icon: 'none'
})
return
}
if (that.data.z_type == false) {
if (that.data.arr == '') {
wx.showToast({
title: '请先完善申请入住信息',
icon: 'none'
})
return
}
if (that.data.e_type == false) {
if (that.data.lunch =='' ) {
wx.showToast({
title: '请先完善申请用餐信息',
icon: 'none'
... ... @@ -654,10 +677,16 @@ onConfirmdate(event) {
form_id: form_id,
type: that.data.type_id,
work_content: that.data.check_id,
select_time: JSON.stringify(that.data.t_arr),
// select_time: JSON.stringify(that.data.t_arr),
select_time: JSON.stringify(that.data.selectdata),
// apply_stay: JSON.stringify(that.data.z_arr),
apply_stay: JSON.stringify(that.data.arr),
apply_food: JSON.stringify(that.data.e_arr)
// apply_food: JSON.stringify(that.data.e_arr)
apply_lunch_food: JSON.stringify(that.data.lunch),
apply_dinner_food: JSON.stringify(that.data.dinner)
}
let header = {
'XX-Token': wx.getStorageSync('token')
... ...
... ... @@ -63,6 +63,7 @@
</view>
<view class="item">
<view class="left">
<image src="/imgs/must.png" /> 参加时间
... ...
... ... @@ -71,11 +71,24 @@ Page({
},
//志愿者详情
getdetail(e) {
var id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/more_other/more_other?id=' + id,
})
},
// 团队详情
getteam(e){
var id = e.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/Volunteer_detail/Volunteer_detail?id=' + id,
})
}
... ...
... ... @@ -15,8 +15,14 @@
<view class="item {{navs==5?'choose':''}}" bindtap="bindtype" data-navs="{{5}}">五星</view>
<view class="item {{navs==6?'choose':''}}" bindtap="bindtype" data-navs="{{6}}">金牌</view>
</view>
<view class="goods_groups">
<view>排名</view>
<view>姓名</view>
<view>地区</view>
<view>工时</view>
</view>
<view wx:if="{{navs}}">
<view class="goods_groups" wx:for="{{list}}">
<view class="goods_groups" wx:for="{{list}}" data-id="{{item.user_id}}" bindtap="getdetail">
<view>{{index+1}}</view>
<view>{{item.name}}</view>
<view>{{item.province}}</view>
... ... @@ -27,7 +33,12 @@
</view>
<view wx:elif="{{nav==2}}">
<view class="goods_groups" wx:for="{{list}}">
<view class="goods_groups">
<view>序号</view>
<view>团队名称</view>
<view>团队总工时</view>
</view>
<view class="goods_groups" wx:for="{{list}}" data-id="{{item.team_id}}" bindtap="getteam">
<view>{{index+1}}</view>
<view>{{item.name}}</view>
<view>{{item.work_time}}</view>
... ...
... ... @@ -5,7 +5,8 @@
datalist: '',
goodsInfo: {},
count: 1,
remark:''
remark: '',
num:''
},
... ... @@ -68,10 +69,10 @@
let head = {
'XX-Token': wx.getStorageSync('token')
}
if(that.data.datalist==null){
if (that.data.datalist == null) {
wx.showToast({
title: '请选择收货地址',
icon:'none'
title: '请选择收货地址',
icon: 'none'
})
return;
}
... ... @@ -79,17 +80,23 @@
good_id: that.data.goodsInfo.id,
num: that.data.count,
address_id: that.data.datalist.id,
remark:that.data.remark
remark: that.data.remark
}, head).then((res) => {
console.log(res)
that.setData({
num: res
})
wx.setStorageSync('goods', that.data.num)
wx.showToast({
title: '兑换成功',
})
setTimeout(function () {
wx.navigateTo({
url: '/pages/myfeedback/myfeedback_list/myfeedback_list'
url: '/pages/myfeedback/myfeedback_list/myfeedback_list'
})
}, 1000)
}, 1000)
... ... @@ -103,7 +110,7 @@
// console.log(e)
type == 'minus' ?
this.setData({
count: this.data.count == 1 ? 1 : this.data.count-1
count: this.data.count == 1 ? 1 : this.data.count - 1
}) :
this.setData({
count: this.data.count + 1
... ... @@ -113,7 +120,7 @@
bindremark(e) {
// console.log(e.detail.value)
this.setData({
remark:e.detail.value
remark: e.detail.value
})
},
... ...
... ... @@ -5,7 +5,7 @@ Page({
* 页面的初始数据
*/
data: {
goods:''
},
getanswer() {
wx.navigateTo({
... ... @@ -18,6 +18,9 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
goods: wx.getStorageSync('goods')
})
},
... ...
... ... @@ -3,10 +3,10 @@
<view class="list_post">
<view class="list_status">兑换申请提交成功 待审核</view>
<view class="list_num">
<image src="/imgs/dingdan.png"></image> 订单编号:12345678910
<image src="/imgs/dingdan.png"></image> 订单编号:{{goods.order_sn}}
</view>
<view class="list_num">
<image src="/imgs/dingdan1.png"></image> 兑换时间:2020-02-21 13:0
<image src="/imgs/dingdan1.png"></image> 兑换时间:{{goods.datetime}}
</view>
</view>
</view>
... ...