From e58ed1ee146b9ce3a9e6fc4fbe6d5fced927e965 Mon Sep 17 00:00:00 2001 From: "HESU\\HESU" <1696136552@qq.com> Date: Sat, 22 Mar 2025 17:44:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/model/Follow.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/model/Follow.php b/app/model/Follow.php index 9d81628..8e7ea62 100644 --- a/app/model/Follow.php +++ b/app/model/Follow.php @@ -3,6 +3,7 @@ namespace app\model; +use app\service\OssService; use app\util\Util; use config\constants\Constants; use support\Model; @@ -51,7 +52,9 @@ class Follow extends Model { $follow['type_txt'] = Constants::FOLLOW[$follow['type']]; $follow['firstFollowtime'] = $follow['follow_time']; - $follow['oss_picture'] = $domain.'/'.$follow['picture'].'?OSSAccessKeyId=LTAI5tAGiH7bkVkmrniXnfkA&Signature=qRqclCNyGUdb0UHLy4z9f8gXn5c%3Dg&Expires='.time(); + $ossservice = new OssService(); + $oss_picture = $ossservice->generatePrivateUrl($follow['picture'],86400); + $follow['oss_picture'] = $oss_picture; // $follow = Util::formatDate($follow); return $follow; }