From 64a58f223e46c8a4c7a4edcd06e4c9528c415fd2 Mon Sep 17 00:00:00 2001 From: xiaohei <11674173+xiaohei102908@user.noreply.gitee.com> Date: Thu, 30 Nov 2023 09:39:13 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC1.0.6=20=202023-11-30=20=20lj?= =?UTF-8?q?d=201=E3=80=81=E4=BC=98=E5=8C=96=E4=BA=86=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E7=9A=84=E6=97=B6=E9=97=B4=E9=80=89=E6=8B=A9?= =?UTF-8?q?=EF=BC=8C=E7=8E=B0=E5=9C=A8=E6=9F=90=E4=B8=AA=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=9A=84=E5=87=AD=E8=AF=81=E5=BD=95=E5=85=A5=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=8F=AA=E8=83=BD=E5=9C=A8=E8=AF=A5=E4=BA=BA=E5=91=98=E5=85=A5?= =?UTF-8?q?=E4=BD=8F=E8=AF=A5=E6=88=BF=E9=97=B4=E7=9A=84=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=86=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/addperson/addperson.js | 7 +++++-- pages/personManger/personManger.js | 20 ++++++++++++++++---- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/pages/addperson/addperson.js b/pages/addperson/addperson.js index 8e4a67a..2c9827b 100644 --- a/pages/addperson/addperson.js +++ b/pages/addperson/addperson.js @@ -239,8 +239,11 @@ Page({ var cgInfo = wx.getStorageSync('cgInfo') var deviceinfo = wx.getStorageSync('deviceinfo') var personLi = wx.getStorageSync('personLi') - let minDate = wx.getStorageSync('minDate') - let minDate1 = wx.getStorageSync('minDate1') + console.log("242",personLi); + let minDate = moment(personLi.startTime).format('YYYY-MM-DD HH:mm:ss') + let minDate1 = moment(personLi.endTime).format('YYYY-MM-DD HH:mm:ss') + // let minDate = wx.getStorageSync('minDate') + // let minDate1 = wx.getStorageSync('minDate1') this.setData({ cgInfo: cgInfo, minDate, diff --git a/pages/personManger/personManger.js b/pages/personManger/personManger.js index dd62bdb..99a2e3e 100644 --- a/pages/personManger/personManger.js +++ b/pages/personManger/personManger.js @@ -110,13 +110,19 @@ Page({ console.log(moment().format("x")) var deviceinfo = wx.getStorageSync('deviceinfo') 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){ this.getSiteTenant(deviceinfo.roomId) } this.setData({ deviceinfo: deviceinfo, roomId: deviceinfo.roomId, - cgInfo: cgInfo + cgInfo: cgInfo, + starttime, + endtime, + minDate: starttime, + minDate1: endtime }) }, onChange1(event) { @@ -295,6 +301,8 @@ Page({ mask:true, duration: 2000 }) + // wx.setStorageSync('minDate', data.startTime) + // wx.setStorageSync('minDate1', data.endTime) WXAPI.sendCommand(data3).then(res6 => { if(res6.success){ var data4 = { @@ -426,6 +434,8 @@ Page({ mask:true, duration: 2000 }) + // wx.setStorageSync('minDate', data.startTime) + // wx.setStorageSync('minDate1', data.endTime) } else { wx.hideLoading() wx.showToast({ @@ -525,6 +535,8 @@ Page({ icon: 'none', duration: 2000 }) + // wx.setStorageSync('minDate', data.startTime) + // wx.setStorageSync('minDate1', data.endTime) _this.getSiteTenant(_this.data.roomId) }else{ wx.hideLoading() @@ -609,13 +621,13 @@ Page({ let minDate1 = res1.data.list[0].endTime let starttime = moment(minDate).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({ personList: res1.data.list, starttime, endtime, - minDate,minDate1 + // minDate,minDate1 }) } else { wx.showToast({