From f68f67f34857085d627cc2acdcfe714eb8bbdcb5 Mon Sep 17 00:00:00 2001
From: 安瑾然 <m17681517455@outlook.com>
Date: 星期四, 23 三月 2023 13:58:11 +0800
Subject: [PATCH] 图片预览
---
miniprogram/pages/user/group/message/index.ts | 80 +++++++++++++++++++++++++++++++++-------
1 files changed, 66 insertions(+), 14 deletions(-)
diff --git a/miniprogram/pages/user/group/message/index.ts b/miniprogram/pages/user/group/message/index.ts
index da8b710..725860f 100644
--- a/miniprogram/pages/user/group/message/index.ts
+++ b/miniprogram/pages/user/group/message/index.ts
@@ -126,15 +126,61 @@
})
}
},
-
+ getBan(){
+ 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 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
+ 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:res.data.data[0].ban
+ })
+ }
+ })
+ },
onLoad(e) {
- 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 time
+ console.log(this.data.uid);
+ this.setData({
+ uid:wx.getStorageSync('id')
+ })
+ 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
}
@@ -152,12 +198,14 @@
}
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
- })
- console.log("reoId",e.reportId)
+ // 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 +235,9 @@
}).exec()
}
})
- }
+ },
+ onShow(){
+ console.log('123');
+
+ },
})
--
Gitblit v1.8.0