|
@ -110,13 +110,19 @@ Page({ |
|
|
console.log(moment().format("x")) |
|
|
console.log(moment().format("x")) |
|
|
var deviceinfo = wx.getStorageSync('deviceinfo') |
|
|
var deviceinfo = wx.getStorageSync('deviceinfo') |
|
|
var cgInfo = wx.getStorageSync('cgInfo') |
|
|
var cgInfo = wx.getStorageSync('cgInfo') |
|
|
|
|
|
let starttime = moment().format('YYYY-MM-DD HH:mm:ss') |
|
|
|
|
|
let endtime = moment().add(30,'days').format('YYYY-MM-DD HH:mm:ss') |
|
|
if(deviceinfo.roomId){ |
|
|
if(deviceinfo.roomId){ |
|
|
this.getSiteTenant(deviceinfo.roomId) |
|
|
this.getSiteTenant(deviceinfo.roomId) |
|
|
} |
|
|
} |
|
|
this.setData({ |
|
|
this.setData({ |
|
|
deviceinfo: deviceinfo, |
|
|
deviceinfo: deviceinfo, |
|
|
roomId: deviceinfo.roomId, |
|
|
roomId: deviceinfo.roomId, |
|
|
cgInfo: cgInfo |
|
|
|
|
|
|
|
|
cgInfo: cgInfo, |
|
|
|
|
|
starttime, |
|
|
|
|
|
endtime, |
|
|
|
|
|
minDate: starttime, |
|
|
|
|
|
minDate1: endtime |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
onChange1(event) { |
|
|
onChange1(event) { |
|
@ -295,6 +301,8 @@ Page({ |
|
|
mask:true, |
|
|
mask:true, |
|
|
duration: 2000 |
|
|
duration: 2000 |
|
|
}) |
|
|
}) |
|
|
|
|
|
// wx.setStorageSync('minDate', data.startTime)
|
|
|
|
|
|
// wx.setStorageSync('minDate1', data.endTime)
|
|
|
WXAPI.sendCommand(data3).then(res6 => { |
|
|
WXAPI.sendCommand(data3).then(res6 => { |
|
|
if(res6.success){ |
|
|
if(res6.success){ |
|
|
var data4 = { |
|
|
var data4 = { |
|
@ -426,6 +434,8 @@ Page({ |
|
|
mask:true, |
|
|
mask:true, |
|
|
duration: 2000 |
|
|
duration: 2000 |
|
|
}) |
|
|
}) |
|
|
|
|
|
// wx.setStorageSync('minDate', data.startTime)
|
|
|
|
|
|
// wx.setStorageSync('minDate1', data.endTime)
|
|
|
} else { |
|
|
} else { |
|
|
wx.hideLoading() |
|
|
wx.hideLoading() |
|
|
wx.showToast({ |
|
|
wx.showToast({ |
|
@ -525,6 +535,8 @@ Page({ |
|
|
icon: 'none', |
|
|
icon: 'none', |
|
|
duration: 2000 |
|
|
duration: 2000 |
|
|
}) |
|
|
}) |
|
|
|
|
|
// wx.setStorageSync('minDate', data.startTime)
|
|
|
|
|
|
// wx.setStorageSync('minDate1', data.endTime)
|
|
|
_this.getSiteTenant(_this.data.roomId) |
|
|
_this.getSiteTenant(_this.data.roomId) |
|
|
}else{ |
|
|
}else{ |
|
|
wx.hideLoading() |
|
|
wx.hideLoading() |
|
@ -609,13 +621,13 @@ Page({ |
|
|
let minDate1 = res1.data.list[0].endTime |
|
|
let minDate1 = res1.data.list[0].endTime |
|
|
let starttime = moment(minDate).format('YYYY-MM-DD HH:mm:ss') |
|
|
let starttime = moment(minDate).format('YYYY-MM-DD HH:mm:ss') |
|
|
let endtime = moment(minDate1).format('YYYY-MM-DD HH:mm:ss') |
|
|
let endtime = moment(minDate1).format('YYYY-MM-DD HH:mm:ss') |
|
|
wx.setStorageSync('minDate',starttime) |
|
|
|
|
|
wx.setStorageSync('minDate1',endtime) |
|
|
|
|
|
|
|
|
// wx.setStorageSync('minDate',starttime)
|
|
|
|
|
|
// wx.setStorageSync('minDate1',endtime)
|
|
|
this.setData({ |
|
|
this.setData({ |
|
|
personList: res1.data.list, |
|
|
personList: res1.data.list, |
|
|
starttime, |
|
|
starttime, |
|
|
endtime, |
|
|
endtime, |
|
|
minDate,minDate1 |
|
|
|
|
|
|
|
|
// minDate,minDate1
|
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
wx.showToast({ |
|
|
wx.showToast({ |
|
|