From 6fd1abc88875f1a72c133a38bb41e8dcd3170ade Mon Sep 17 00:00:00 2001
From: 安瑾然 <m17681517455@outlook.com>
Date: 星期五, 03 三月 2023 16:04:15 +0800
Subject: [PATCH] 修改用户端首页样式 添加vant组件库支持 添加群组列表空状态展示
---
miniprogram/pages/user/group/index.ts | 35 ++++++++++++++++++-----------------
1 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/miniprogram/pages/user/group/index.ts b/miniprogram/pages/user/group/index.ts
index 3d4f850..4e8e5b2 100644
--- a/miniprogram/pages/user/group/index.ts
+++ b/miniprogram/pages/user/group/index.ts
@@ -6,19 +6,22 @@
data: {
groupList: []
},
- openGroup(e){
+ toHome(){
+ wx.navigateTo({url:"../../user/index"})
+ },
+ openGroup(e) {
console.log(e)
wx.navigateTo({
- url:"../../user/group/message/index?id="+e.currentTarget.id+"&&ban="+e.currentTarget.dataset.ban+"&&reportId="+e.currentTarget.dataset.rptid
+ url: "../../user/group/message/index?id=" + e.currentTarget.id + "&&ban=" + e.currentTarget.dataset.ban + "&&reportId=" + e.currentTarget.dataset.rptid
})
},
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
@@ -35,29 +38,27 @@
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: userGroup.globalData.url + "/wx/user/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)
+ console.log(res.data.data)
this.setData({
groupList: res.data.data
})
}
-
+
})
-
-
}
})
--
Gitblit v1.8.0