优化机器人名称显示;

This commit is contained in:
2023-11-27 09:20:39 +08:00
parent 0b29a5351e
commit a59b124e70
3 changed files with 9 additions and 0 deletions

View File

@@ -96,4 +96,11 @@ class PostVisit extends Model
return "$name $version";
}
public function getClientBotNameAttr()
{
$client_bot = $this->getAttr('client_bot');
return $client_bot->name ?? '';
}
}

View File

@@ -29,6 +29,7 @@
<span>{$vo.create_time_title}</span>
<span>{$vo.client_name}</span>
<span>{$vo.client_os_name}</span>
<span>{$vo.client_bot_name}</span>
<a href="{$vo.post.read_url}" title="{$vo.post.title}">《{$vo.post.title}》</a>
</div>
</div>

View File

@@ -165,6 +165,7 @@
{$vo.create_time_title}
{$vo.client_name}
{$vo.client_os_name}
{$vo.client_bot_name}
</div>
</div>
</div>