|
@@ -23,8 +23,8 @@ Page({
|
|
|
deviceIndex: 2,
|
|
|
deviceArray: [],
|
|
|
deviceList: '',
|
|
|
- startDate: '2019-10-29',
|
|
|
- endDate: '2019-10-29',
|
|
|
+ startDate: '',
|
|
|
+ endDate: '',
|
|
|
list: []
|
|
|
},
|
|
|
|
|
@@ -148,12 +148,14 @@ Page({
|
|
|
this.setData({
|
|
|
startDate: e.detail.value
|
|
|
})
|
|
|
+ this.getPassInfo();
|
|
|
},
|
|
|
|
|
|
bindendDateChange: function(e) {
|
|
|
this.setData({
|
|
|
endDate: e.detail.value
|
|
|
})
|
|
|
+ this.getPassInfo();
|
|
|
},
|
|
|
|
|
|
getDeviceInfo: function(e) {
|
|
@@ -210,6 +212,20 @@ Page({
|
|
|
return date;
|
|
|
},
|
|
|
|
|
|
+ getCurrentDate: function(e) {
|
|
|
+ let date = new Date();
|
|
|
+ let year = date.getFullYear();
|
|
|
+ let month = date.getMonth() + 1;
|
|
|
+ let day = date.getDate();
|
|
|
+ month = month < 10 ? "0" + month : month;
|
|
|
+ day = day < 10 ? "0" + day : day;
|
|
|
+ date = year + '-' + month + '-' + day
|
|
|
+ this.setData({
|
|
|
+ startDate: date,
|
|
|
+ endDate: date
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
@@ -218,6 +234,7 @@ Page({
|
|
|
that.setData({
|
|
|
apiTotal: api.total.substring(0, api.total.length - 4)
|
|
|
})
|
|
|
+ that.getCurrentDate();
|
|
|
that.data.userInfo = wx.getStorageSync('user');
|
|
|
that.getCollegeInfo();
|
|
|
that.getDeviceInfo();
|