bindtap无法连续出发
需求是点击 ‘后一天’,日期加一天 ++ ,但是只能出发第一次,第二次点击的时不能 ++ ,这是为什么?
4 回复
beforeDate:function(e){
console.log(e)
var before = new Date(app.globalData.checkDay);
if(before <= new Date()){
wx.showToast({
title: ‘不能早于当天’,
icon: ‘loading’,
duration: 1500,
});
return;
}
before.setDate(before.getDate() - 1);
var year = before.getFullYear();
var month = before.getMonth() + 1;
var day = before.getDate();
this.setData({
noNetwork: false,
depDateValue: year + “-” + month+"-"+day
})
},