完成防采集版权声明;

This commit is contained in:
2022-05-30 11:05:29 +08:00
parent ff353f0d43
commit 8bc73f83de
5 changed files with 69 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace app\model;
use app\common\model\Base;
use app\common\tools\PostShow;
use think\facade\Cache;
use think\facade\Request;
use think\Model;
@@ -151,6 +152,14 @@ class Post extends Base
return trim($value);
}
public function getContentHtmlShowAttr()
{
$content = $this->getAttr('content_html');
return PostShow::handleCopyright($content);
}
public function getContentAttr($value)
{
return json_decode($value, true);