作者 王智

bug

... ... @@ -8,6 +8,7 @@ Page({
text: '',
show: false,
data:''
},
/**
... ... @@ -30,7 +31,9 @@ Page({
console.log(event)
var dates = event.detail
console.log(dates);
var date = new Date(event.detail[0]);
var list = [];
event.detail.forEach(item => {
var date = new Date(item);
console.log(date)
var year = date.getFullYear();
... ... @@ -38,14 +41,15 @@ Page({
var d = date.getDate();
var Data = year+"/"+m+"/"+d
console.log(Data)
list.push(Data)
});
console.log(year)
console.log(m)
console.log(d)
console.log('1111111111111111',list)
this.setData({
show: false,
date: `选择了 ${event.detail.length} 个日期`,
// date: `选择了 ${event.detail.length} 个日期`,
// data:Data
});
},
/**
... ...
... ... @@ -6,3 +6,5 @@
bind:close="onClose"
bind:confirm="onConfirm"
/>
<view>{{data}}</view>
\ No newline at end of file
... ...
... ... @@ -389,6 +389,7 @@ Page({
let provincearr = that.data.provincearr;
let cityarr = that.data.cityarr;
let countryarr = that.data.countryarr;
that.setData({
confirmvalarr: valarr,
province: provincearr[i].province_name,
... ... @@ -541,6 +542,7 @@ Page({
apply_nav: e.currentTarget.dataset.apply_nav
})
},
submit(e) {
let that = this;
let err = '';
... ... @@ -663,6 +665,19 @@ Page({
photo: that.data.photo
}
{
wx.requestSubscribeMessage({
tmplIds: ['i32dB8tFiNFYRgRGM6bv79aEe4X2_BZ8HunwaoPw58o'],
success(res) {
console.log(res)
}
})
}
wx.showModal({
title: '请仔细核对信息,确认无误!',
content: '如需修改个人信息,请在微信公众号申请:关注微信公众号“白求恩志愿者中心”,点击菜单按钮“修改个人信息”,申请提交。',
... ... @@ -711,11 +726,17 @@ Page({
},
getpop() {
wx.showModal({
title: '提示',
content: '如需修改个人信息,请在微信公众号申请:关注微信公众号“白求恩志愿者中心”,点击菜单按钮“修改个人信息”,申请提交。',
showCancel: false, //是否显示取消按钮
})
},
... ...
... ... @@ -245,14 +245,14 @@
为继承和弘扬国际主义战士白求恩的伟大风范和高尚情操,传承和弘扬白求恩的伟大精神,本人自愿申请加入白求恩志愿者队伍。本人愿尽己所能,以“志愿服务”为宗旨,不计报酬、帮助他人、服务社会,恪守国家法律、法规,遵守白求恩志愿者各项规章制度,努力工作,尽职尽责,力争为公益事业做出贡献。
</view>
<view wx:if="{{status!==2}}">
<form wx:if="{{!page_type}}" bindsubmit="submit" report-submit='true' class="apply_btn">
<button class="a_btn" form-type="submit" style="">提交</button>
<form wx:if="{{!page_type}}" bindsubmit="submit" bindtap="getxiaoxi" report-submit='true' class="apply_btn">
<button class="a_btn" form-type="submit" >提交</button>
</form>
</view>
<view wx:if="{{status==2}}">
<form wx:if="{{!page_type}}" bindtap="getpop" report-submit='true' class="apply_btn">
<button class="a_btn gray" form-type="submit" style="">提交</button>
<button class="a_btn gray" form-type="submit" >提交</button>
</form>
</view>
... ...
... ... @@ -18,11 +18,9 @@ Page({
time_arr: [
"上午", "下午"
],
eat_arr: [
'午餐', '晚餐'
],
t_arr: [{ //选择日期数组
date: '',
data: '',
time: ''
}],
z_arr: [ //申请入住数组
... ... @@ -32,8 +30,8 @@ Page({
],
e_arr: [ //申请用餐数组
{
date: '',
time: ''
time: '',
night:''
}
],
... ... @@ -41,8 +39,187 @@ Page({
z_type: true,
e_type: true,
cover_type: false,
zhiyuan: ''
zhiyuan: '',
show: false,
shows: false,
shownight:false,
showdate:false
},
//日历
// 参加日期
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({
showdate: false,
data: list.join(',')
});
},
// 入住日期
onDisplay() {
this.setData({
show: true
});
},
onClose() {
this.setData({
show: false
});
},
onConfirm(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({
show: false,
date: list.join(',')
});
},
//午餐
onDisplays() {
this.setData({
shows: true
});
},
onCloses() {
this.setData({
shows: false
});
},
onConfirms(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({
shows: false,
time: list.join(',')
});
},
// 晚餐
onDisplaynight() {
this.setData({
shownight: true
});
},
onClosenight() {
this.setData({
shownight: false
});
},
onConfirmnight(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,
night: list.join(',')
});
},
//
// 获取到焦点
focus: function (e) {
this.setData({
... ... @@ -157,23 +334,28 @@ Page({
change_date(e) {
let that = this
let index = e.currentTarget.dataset.index
let id = e.currentTarget.dataset.id
// let id = e.currentTarget.dataset.id
let zindex = Number(e.detail.value)
if (id == 1) {
that.setData({
[`t_arr[${index}].date`]: that.data.date_arr[zindex]
})
} else if (id == 2) {
that.setData({
[`z_arr[${index}].date`]: that.data.date_arr[zindex]
})
} else if (id == 3) {
that.setData({
[`e_arr[${index}].date`]: that.data.date_arr[zindex]
})
}
that.judge_status(id, index)
// else if (id == 2) {
// that.setData({
// [`z_arr[${index}].date`]: that.data.date_arr[zindex]
// })
// } else if (id == 3) {
// that.setData({
// [`e_arr[${index}].date`]: that.data.date_arr[zindex]
// })
// }
// that.judge_status(id, index)
},
// 信息状态判断
judge_status(type, index) {
let that = this
... ... @@ -369,6 +551,7 @@ Page({
//信息判断过滤
submit(e) {
let that = this
if (!that.data.type_id) {
wx.showToast({
... ... @@ -405,6 +588,7 @@ Page({
})
return
}
if (that.data.zhiyuan == 0) {
wx.showModal({
title: '提示', //提示文字
... ... @@ -429,18 +613,27 @@ Page({
})
return
}
if (that.data.zhiyuan == 3) {
wx.showModal({
title: '提示', //提示文字
content: '无法报名成为正式志愿者才能才能参加活动',
showCancel: false, //是否显示取消按钮
})
return
}
wx.requestSubscribeMessage({
tmplIds: ['i32dB8tFiNFYRgRGM6bv79aEe4X2_BZ8HunwaoPw58o'],
success(res) {
console.log(res)
}
})
that.push(e.detail.formId)
},
//提交
push(form_id) {
wx.showLoading({
title: '提交中',
mask: true
... ...
... ... @@ -45,89 +45,99 @@
<view class="info_box" wx:for="{{t_arr}}" wx:key="index">
<view class="tilte">选择日期
<image class="del" src="/imgs/del.png" wx:if="{{t_arr.length>1 && index == t_arr.length-1 && !status}}" data-index="{{index}}" data-status="1" catchtap="del" />
<image class="del" src="/imgs/del.png" wx:if="{{t_arr.length>1 && index == t_arr.length-1 && !status}}"
data-index="{{index}}" data-status="1" catchtap="del" />
</view>
<view class="item">
<view class="left">
<image src="/imgs/must.png" /> 参加日期
</view>
<picker mode="selector" value="{{item.date}}" bindchange="change_date" range="{{date_arr}}" data-index="{{index}}" data-id="1" disabled="{{status}}">
<view class="right">
<text>{{item.date?item.date:'请选择'}}</text>
<!-- <picker mode="selector" value="{{item.date}}" bindchange="change_date" range="{{date_arr}}" data-index="{{index}}"
data-id="1" disabled="{{status}}"> -->
<view class="right" style="flex: 1;display:flex;justify-content: flex-end;margin-left: 32rpx;overflow: hidden;"
bindtap="onDisplaydate">
<text>{{data?data:'请选择'}}</text>
<image src="/imgs/right.png" />
</view>
</picker>
<van-calendar show="{{ showdate }}" type="multiple" bind:close="onClosedate" bind:confirm="onConfirmdate" />
</view>
<view class="item">
<view class="left">
<image src="/imgs/must.png" /> 参加时间
</view>
<picker mode="selector" value="{{item.time}}" bindchange="change_time" range="{{time_arr}}" data-index="{{index}}" disabled="{{status}}">
<picker mode="selector" value="{{item.time}}" bindchange="change_time" range="{{time_arr}}" data-index="{{index}}"
disabled="{{status}}">
<view class="right">
<text>{{item.time?item.time:'请选择'}}</text>
<image src="/imgs/right.png" />
</view>
</picker>
</view>
<view class="add" bindtap="add_item" data-id="1" wx:if="{{index == t_arr.length -1 && !status}}">+添加</view>
<!-- <view class="add" bindtap="add_item" data-id="1" wx:if="{{index == t_arr.length -1 && !status}}">+添加</view> -->
</view>
<view class="info_box" wx:for="{{z_arr}}" wx:key="index">
<view class="info_box">
<view class="tilte">
<view> 申请入住
<text>*仅限工作人员本人</text>
</view>
<image class="del" src="/imgs/del.png" wx:if="{{z_arr.length>1 && index == z_arr.length-1 && !status}}" data-index="{{index}}" data-status="2" catchtap="del" />
<image class="del" src="/imgs/del.png" wx:if="{{z_arr.length>1 && index == z_arr.length-1 && !status}}"
data-index="{{index}}" data-status="2" catchtap="del" />
</view>
<view class="item">
<view class="left">
入住日期
</view>
<picker mode="selector" value="{{item.date}}" bindchange="change_date" range="{{date_arr}}" data-index="{{index}}" data-id="2" disabled="{{status}}">
<view class="right">
<text>{{item.date?item.date:'请选择'}}</text>
<view class="right" style="flex: 1;display:flex;justify-content: flex-end;margin-left: 32rpx;overflow: hidden;"
bindtap="onDisplay">
<text>{{date?date:'请选择'}}</text>
<image src="/imgs/right.png" />
</view>
</picker>
<van-calendar show="{{ show }}" type="multiple" bind:close="onClose" bind:confirm="onConfirm" />
</view>
<view class="add" bindtap="add_item" data-id="2" wx:if="{{index == z_arr.length -1 && !status}}">+添加</view>
</view>
<view class="info_box" wx:for="{{e_arr}}" wx:key="index">
<view class="tilte">申请用餐
<image class="del" src="/imgs/del.png" wx:if="{{e_arr.length>1 && index == e_arr.length-1 && !status}}" data-index="{{index}}" data-status="3" catchtap="del" />
<image class="del" src="/imgs/del.png" wx:if="{{e_arr.length>1 && index == e_arr.length-1 && !status}}"
data-index="{{index}}" data-status="3" catchtap="del" />
</view>
<view class="item">
<view class="left">
餐日期
餐日期
</view>
<picker mode="selector" value="{{item.date}}" bindchange="change_date" range="{{date_arr}}" data-index="{{index}}" data-id="3" disabled="{{status}}">
<view class="right">
<text>{{item.date?item.date:'请选择'}}</text>
<view class="right" style="flex: 1;display:flex;justify-content: flex-end;margin-left: 32rpx;overflow: hidden;"
bindtap="onDisplays">
<text>{{time?time:'请选择'}}</text>
<image src="/imgs/right.png" />
</view>
</picker>
<van-calendar show="{{ shows }}" type="multiple" bind:close="onCloses" bind:confirm="onConfirms" />
</view>
<view class="item">
<view class="left">
用餐时间
晚餐日期
</view>
<picker mode="selector" value="{{item.time}}" bindchange="eat_time" range="{{eat_arr}}" data-index="{{index}}" disabled="{{status}}">
<view class="right">
<text>{{item.time?item.time:'请选择'}}</text>
<view class="right" style="flex: 1;display:flex;justify-content: flex-end;margin-left: 32rpx;overflow: hidden;"
bindtap="onDisplaynight">
<text>{{night?night:'请选择'}}</text>
<image src="/imgs/right.png" />
</view>
</picker>
<van-calendar show="{{ shownight }}" type="multiple" bind:close="onClosenight" bind:confirm="onConfirmnight" />
</view>
<view class="add" bindtap="add_item" data-id="3" wx:if="{{index == e_arr.length -1 && !status}}">+添加</view>
</view>
<!--确认 -->
<form wx:if="{{!status}}" bindsubmit="submit" report-submit='true' class="submit">
<button class="submit" form-type="submit" style="margin:0;padding:0;">确认</button>
</form>
<view class="btn_box" wx:else>
<view class="look_table" catchtap="{{status == 1 || status == 3?'look_word':'look_register'}}">{{status == 1 || status == 3?'查看工作汇报':'查看注册信息'}}</view>
<view class="look_table" catchtap="{{status == 1 || status == 3?'look_word':'look_register'}}">
{{status == 1 || status == 3?'查看工作汇报':'查看注册信息'}}</view>
<view class="fill_time" catchtap="change_cover" wx:if="{{status == 1 || status == 3}}">输入工时</view>
<view class="two_btn" wx:if="{{status == 0 && !two_type}}">
... ... @@ -141,7 +151,8 @@
<view class="show_box">
<view class="s_title">{{btn_type?'请输入未通过理由':'请输入工时'}}</view>
<textarea placeholder="请输入..." class="word_area" value="{{word}}" bindinput="get_word" wx:if="{{btn_type}}" adjust-position='{{false}}' bindfocus="focus" bindblur='no_focus' />
<textarea placeholder="请输入..." class="word_area" value="{{word}}" bindinput="get_word" wx:if="{{btn_type}}"
adjust-position='{{false}}' bindfocus="focus" bindblur='no_focus' />
<input placeholder="请输入..." class="word_area active" value="{{word}}" bindinput="get_word" type="number" adjust-position='{{false}}' bindfocus="focus" bindblur='no_focus' wx:else/>
<view class="submit" catchtap="{{btn_type?'examine':'add_time'}}">确认</view>
... ...
... ... @@ -44,6 +44,7 @@ Page({
// this.locationAuth();
wx.getLocation({
isHighAccuracy:true,
success: function (res) {
console.log(res)
that.setData({
... ... @@ -69,6 +70,18 @@ Page({
},
fail() {
wx.showModal({
title: '提示',
content: '请打开手机定位功能',
showCancel: false
})
}
})
// 获取时间点
... ... @@ -123,9 +136,7 @@ Page({
layerModel: true
})
}
}
})
} else {
... ... @@ -136,8 +147,8 @@ Page({
}
let d = {
id: that.data.id,
long: that.data.latitude,
lat: that.data.longitude
long: that.data.longitude,
lat: that.data.latitude
}
console.log(d)
... ... @@ -186,8 +197,8 @@ Page({
}
let d = {
id: that.data.id,
long: that.data.latitude,
lat: that.data.longitude
long: that.data.longitude,
lat: that.data.latitude
}
console.log(d)
... ...
... ... @@ -6,7 +6,8 @@ Page({
*/
data: {
datalist: '',
list: ''
list: '',
status:''
},
getdatalist() {
let that = this;
... ... @@ -38,6 +39,25 @@ Page({
})
},
getstatus() {
let that = this;
let url = '/index/second/getUserStatus';
let head = {
'XX-Token': wx.getStorageSync('token')
}
app.post(url, {}, head).then((res) => {
console.log(res)
that.setData({
status: res.code
})
}).catch((err) => {
})
},
// 提示
... ... @@ -80,6 +100,7 @@ Page({
let that = this;
that.getdatalist();
that.getdatalists();
that.getstatus();
},
... ...
... ... @@ -13,7 +13,7 @@
审核通过
</view>
<view class="result_list_wrap">
<view class="result_left" wx:if="{{list.code==2}}">
<view class="result_left" wx:if="{{status==2||status==3||status==4}}">
<view class="circle"></view>
<view class="circle_s"></view>
<view class="circle_line"></view>
... ... @@ -30,12 +30,12 @@
</view>
</view>
<view class="result_list_wrap">
<view class="result_left" wx:if="">
<view class="result_left" wx:if="{{status==3||status==4}}">
<view class="circle"></view>
<view class="circle_s"></view>
<view class="circle_line"></view>
</view>
<view class="result_left_red">
<view class="result_left_red" wx:else>
<view class="circle_red"></view>
<view class="circle_s_red"></view>
<view class="circle_line_red"></view>
... ... @@ -46,12 +46,12 @@
</view>
</view>
<view class="result_list_wrap">
<view class="result_left" wx:if="">
<view class="result_left" wx:if="{{status==4}}">
<view class="circle"></view>
<view class="circle_s"></view>
</view>
<view class="result_left_red">
<view class="result_left_red" wx:else>
<view class="circle_red"></view>
<view class="circle_s_red"></view>
</view>
... ...
... ... @@ -328,6 +328,14 @@
"id": -1,
"name": "pages/1/1",
"pathName": "pages/1/1",
"query": "",
"scene": null
},
{
"id": 37,
"name": "pages/enroll/enroll",
"pathName": "pages/enroll/enroll",
"query": "id=63",
"scene": null
}
]
... ...