This commit is contained in:
make
2025-05-14 00:50:02 +08:00
parent 453c896bd5
commit c5bd69a120

View File

@@ -10,6 +10,7 @@ use app\model\VideoCategoryModel;
use app\model\VideoClicksModel;
use app\model\VideoModel;
use template\page\CusteomPage02;
use think\exception\HttpException;
class VideoService
{
@@ -682,6 +683,10 @@ class VideoService
// 视频详情
$arrVideo = $this->VideoModel->getVideoByVId($intVId);
if (empty($arrVideo)) {
throw new HttpException(404, '视频不存在');
}
// 取前5个元素
$strTopActor = (is_array($arrVideo['v_actor'] ?? null)) ? array_slice($arrVideo['v_actor'], 0, 5) : '';