完善访问链接;

This commit is contained in:
2022-02-12 19:50:10 +08:00
parent 84ba6f145e
commit bc828f73e0
2 changed files with 2 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ declare(strict_types=1);
namespace app\model;
use think\facade\Cache;
use think\facade\Request;
use think\Model;
use think\model\concern\SoftDelete;
use think\Paginator;
@@ -155,9 +156,8 @@ class Post extends Model
public function getReadUrlAttr()
{
$url_info = parse_url((string)url('index/Index/index')->domain('www'));
return $url_info['scheme'] . '://' . $url_info['host'] . '/index/a' . $this->getData('uid') . '.html';
return Request::domain() . '/index/a' . $this->getData('uid') . '.html';
}
public function getShareTextAttr()