diff --git a/app/pages.go b/app/pages.go index c1ab8b7..13d5fc7 100644 --- a/app/pages.go +++ b/app/pages.go @@ -20,8 +20,28 @@ func Index(ctx *gin.Context) { if err != nil { result["msg"] = fmt.Sprintf("数据获取失败: %s", err.Error()) } - result["friendCount"] = len(friends) - result["groupCount"] = len(groups) + var in, notIn int + for _, d := range friends { + if d.IsOk { + in++ + } else { + notIn++ + } + } + result["friendCount"] = in + result["friendWithoutCount"] = notIn + + var gin, gnotIn int + for _, d := range groups { + if d.IsOk { + gin++ + } else { + gnotIn++ + } + } + result["groupCount"] = gin + result["groupWithoutCount"] = gnotIn + result["vnc"] = config.Conf.Wechat.VncUrl result["isVnc"] = config.Conf.Wechat.VncUrl != "" result["aiModels"] = config.Conf.Ai.Models diff --git a/views/index.html b/views/index.html index 53988cc..d0bfbf7 100644 --- a/views/index.html +++ b/views/index.html @@ -24,11 +24,13 @@
好友数量
-
{{ .friendCount }}
+
{{ .friendCount }}/{{ .friendWithoutCount }}
+
通讯录/已删除
群组数量
-
{{ .groupCount }}
+
{{ .groupCount }}/{{ .groupWithoutCount }}
+
在群聊/已退出
是否配置VNC