odc.xiaohui
2023-03-14 838d7f41eea9d7e56c14d29cd17b73135a0a9e04
miniprogram/pages/user/group/message/index.ts
@@ -126,8 +126,7 @@
            })
        }
    },
    onLoad(e) {
   getBan(){
        var date = new Date()
        var month = date.getMonth() + 1
        var day = date.getDate()
@@ -151,13 +150,58 @@
            secends = "0" + secends
        }
        time = date.getFullYear() + "-" + month + "-" + day + " " + hours+":"+minutes+":"+secends
        wx.setStorageSync('time',time)
        this.data.groupId=e.id
        this.data.ban=e.ban
    var lastTime = wx.getStorageSync('time')
    wx.request(
        {
            url: userMessage.globalData.url + "/wx/user/group/list",
            method: "GET",
            data: {
                id: wx.getStorageSync('id'),
                newDate: time,
                lastDate: lastTime
            },
            header: { 'token': wx.getStorageSync('token') },
            success: (res) => {
                console.log(res.data.data)
        this.setData({
            ban:e.ban
                    ban:res.data.data[0].ban
        })
        console.log("reoId",e.reportId)
            }
        })
   },
    onLoad(e) {
        let date = new Date()
        let month = date.getMonth() + 1
        let day = date.getDate()
        let hours=date.getHours()
        let minutes=date.getMinutes()
        let secends=date.getSeconds()
        let time
        if (month < 10) {
            month = "0" + month
        }
        if (day < 10) {
            day = "0" + day
        }
        if (minutes < 10) {
            minutes = "0" + minutes
        }
        if (hours < 10) {
            hours = "0" + hours
        }
        if (secends < 10) {
            secends = "0" + secends
        }
        time = date.getFullYear() + "-" + month + "-" + day + " " + hours+":"+minutes+":"+secends
        wx.setStorageSync('time',time)
        this.data.groupId=e.id
        // this.data.ban=e.ban
        // this.setData({
        //     ban:e.ban
        // })
        this.getBan()
        console.log("reoId",e.reportId,e)
        this.data.reportId=e.reportId
        wx.request(
            {
@@ -187,5 +231,9 @@
                      }).exec()
                }
            })
    }
    },
    onShow(){
        console.log('123');
    },
})