From 3b1267a79b1b6787dfad7c7116a67b350c0d0487 Mon Sep 17 00:00:00 2001 From: wong <106998207@qq.com> Date: Fri, 4 Jul 2025 15:12:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ContentLibraryController.php | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Server/application/cunkebao/controller/ContentLibraryController.php b/Server/application/cunkebao/controller/ContentLibraryController.php index 20bccc7e..a18327bf 100644 --- a/Server/application/cunkebao/controller/ContentLibraryController.php +++ b/Server/application/cunkebao/controller/ContentLibraryController.php @@ -1390,8 +1390,25 @@ class ContentLibraryController extends Controller } // 判断内容类型 (0=未知, 1=图片, 2=链接, 3=视频, 4=文本, 5=小程序, 6=图文) - $contentType = $this->determineContentType($moment['content'] ?? '', $resUrls, $urls); - + if($moment['type'] == 1) { + //图文 + $contentType = 6; + }elseif ($moment['type'] == 3){ + //链接 + $contentType = 2; + }elseif ($moment['type'] == 15){ + //视频 + $contentType = 3; + }elseif ($moment['type'] == 2){ + //纯文本 + $contentType = 4; + }elseif ($moment['type'] == 30){ + //小程序 + $contentType = 5; + }else{ + $contentType = 1; + } + // 如果不存在,则创建新的内容项目 $item = new ContentItem(); $item->libraryId = $libraryId;