From 838d7f41eea9d7e56c14d29cd17b73135a0a9e04 Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期二, 14 三月 2023 18:07:47 +0800
Subject: [PATCH] 我要报案参数修改

---
 miniprogram/pages/user/group/message/index.ts |   76 +++++++++++++++++++++++++++++++-------
 1 files changed, 62 insertions(+), 14 deletions(-)

diff --git a/miniprogram/pages/user/group/message/index.ts b/miniprogram/pages/user/group/message/index.ts
index da8b710..f378abb 100644
--- a/miniprogram/pages/user/group/message/index.ts
+++ b/miniprogram/pages/user/group/message/index.ts
@@ -126,15 +126,57 @@
             })
         }
     },
-
+   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
+        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 +194,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 +231,9 @@
                       }).exec()
                 }
             })
-    }
+    },
+    onShow(){
+        console.log('123');
+        
+    },
 })

--
Gitblit v1.8.0