From a59b124e70659e3f3af13e0f9e2d31c7c66704f7 Mon Sep 17 00:00:00 2001 From: augushong Date: Mon, 27 Nov 2023 09:20:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9C=BA=E5=99=A8=E4=BA=BA?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=98=BE=E7=A4=BA=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/model/PostVisit.php | 7 +++++++ view/index/index/visit.html | 1 + view/index/post/read.html | 1 + 3 files changed, 9 insertions(+) diff --git a/app/model/PostVisit.php b/app/model/PostVisit.php index 024e728..448ecee 100644 --- a/app/model/PostVisit.php +++ b/app/model/PostVisit.php @@ -96,4 +96,11 @@ class PostVisit extends Model return "$name $version"; } + + public function getClientBotNameAttr() + { + $client_bot = $this->getAttr('client_bot'); + + return $client_bot->name ?? ''; + } } diff --git a/view/index/index/visit.html b/view/index/index/visit.html index fb96ec0..aa8d698 100644 --- a/view/index/index/visit.html +++ b/view/index/index/visit.html @@ -29,6 +29,7 @@ {$vo.create_time_title} {$vo.client_name} {$vo.client_os_name} + {$vo.client_bot_name} 《{$vo.post.title}》 diff --git a/view/index/post/read.html b/view/index/post/read.html index b70d421..5da222a 100644 --- a/view/index/post/read.html +++ b/view/index/post/read.html @@ -165,6 +165,7 @@ {$vo.create_time_title} {$vo.client_name} {$vo.client_os_name} + {$vo.client_bot_name}