| | |
| | | data: { |
| | | groupList: [] |
| | | }, |
| | | openGroup(e){ |
| | | openGroup(e) { |
| | | |
| | | wx.navigateTo({ |
| | | url:"../../manager/group/message/index?id="+e.currentTarget.id |
| | | url: "../../manager/group/message/index?id=" + e.currentTarget.id |
| | | }) |
| | | }, |
| | | onLoad() { |
| | | var date = new Date() |
| | | var month = date.getMonth() + 1 |
| | | var day = date.getDate() |
| | | var hours=date.getHours() |
| | | var minutes=date.getMinutes() |
| | | var secends=date.getSeconds() |
| | | var hours = date.getHours() |
| | | var minutes = date.getMinutes() |
| | | var secends = date.getSeconds() |
| | | var time |
| | | if (month < 10) { |
| | | month = "0" + month |
| | |
| | | if (secends < 10) { |
| | | secends = "0" + secends |
| | | } |
| | | time = date.getFullYear() + "-" + month + "-" + day + " " + hours+":"+minutes+":"+secends |
| | | console.log(time) |
| | | console.log("lastDate",wx.getStorageSync('time')) |
| | | var lastTime=wx.getStorageSync('time') |
| | | time = date.getFullYear() + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + secends |
| | | console.log(time) |
| | | console.log("lastDate", wx.getStorageSync('time')) |
| | | var lastTime = wx.getStorageSync('time') |
| | | wx.request( |
| | | { |
| | | url: managerGroup.globalData.url + "/wx/manager/group/list", |
| | | method: "GET", |
| | | data:{ |
| | | id:wx.getStorageSync('id'), |
| | | newDate:time, |
| | | lastDate:lastTime |
| | | data: { |
| | | id: wx.getStorageSync('id'), |
| | | newDate: time, |
| | | lastDate: lastTime |
| | | }, |
| | | header: { 'token': wx.getStorageSync('token') }, |
| | | success: (res) => { |
| | | console.log(res.data.data) |
| | | this.setData({ |
| | | console.log(res.data.data) |
| | | res.data.data.map(item=>{ |
| | | item.time = item.time.substr(-8) |
| | | }) |
| | | this.setData({ |
| | | groupList: res.data.data |
| | | }) |
| | | } |
| | | |
| | | |
| | | }) |
| | | |
| | | |