From 224885c439f465f7b12209fc769fa628bbda5aad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Wed, 9 Apr 2025 11:04:27 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E4=BC=98=E5=8C=96=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=A4=B4=E5=83=8F=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=98=BE=E7=A4=BA=E7=94=A8=E6=88=B7=E5=A4=B4?= =?UTF-8?q?=E5=83=8F=E6=88=96=E9=BB=98=E8=AE=A4=E5=9B=BE=E6=A0=87=EF=BC=9B?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=97=A5=E5=BF=97=E6=A0=BC=E5=BC=8F=EF=BF=BD?= =?UTF-8?q?=EF=BF=BD=E4=BF=AE=E5=A4=8DIP=E5=9C=B0=E5=9D=80=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/server/server.go | 2 +- internal/view/robot/index.html | 6 +++++- internal/view/robot/show.html | 8 ++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/internal/server/server.go b/internal/server/server.go index c27f87d..62c5823 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -118,7 +118,7 @@ func New(cfg *config.Config) *Server { // 注册中间件 app.Use(recover.New()) app.Use(logger.New(logger.Config{ - Format: "[${time}] ${status} - ${ip} - ${latency} ${method} ${path}\n", + Format: "[${time}] ${status} - ${ips} - ${latency} ${method} ${path}\n", TimeFormat: "2006-01-02 15:04:05", })) app.Use(cors.New()) diff --git a/internal/view/robot/index.html b/internal/view/robot/index.html index c1369a9..a4340fd 100644 --- a/internal/view/robot/index.html +++ b/internal/view/robot/index.html @@ -79,8 +79,12 @@
-
+
+ {{if .Avatar}} + WeChat Avatar + {{else}} + {{end}}

{{.Nickname}}

diff --git a/internal/view/robot/show.html b/internal/view/robot/show.html index 13f588d..08838fb 100644 --- a/internal/view/robot/show.html +++ b/internal/view/robot/show.html @@ -28,8 +28,12 @@
-
- +
+ {{if .Robot.Avatar}} + WeChat Avatar + {{else}} + + {{end}}