From 2ef7136c3133142126dbf311e962a5a8216ea969 Mon Sep 17 00:00:00 2001 From: jianglong Date: Fri, 18 Aug 2023 13:35:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Upload.php | 22 ++++++++- app/admin/view/content/help/add.html | 5 ++- app/admin/view/content/help/edit.html | 5 ++- app/admin/view/file/lists.html | 8 ++-- app/api/controller/Community.php | 6 +++ app/api/logic/ArticleLogic.php | 8 ++-- app/api/logic/CommunityLogic.php | 2 +- app/api/logic/ResourceLogic.php | 19 +++++++- public/static/lib/likeedit/likeedit.js | 52 ++++++++++++++++++---- .../temp/5b260d0cf2418d25963f5356b8c5e275.php | 8 ++-- 10 files changed, 109 insertions(+), 26 deletions(-) diff --git a/app/admin/controller/Upload.php b/app/admin/controller/Upload.php index 371ec27..14ac4bb 100644 --- a/app/admin/controller/Upload.php +++ b/app/admin/controller/Upload.php @@ -37,11 +37,31 @@ class Upload extends AdminBase { try { $cid = $this->request->post('cid'); - $result = FileServer::image($cid, 0); // 0 平台 + if($this->request->get('type') == 20){ + $result = FileServer::video($cid, 0); // 0 平台 + }else{ + $result = FileServer::image($cid, 0); // 0 平台 + } + return JsonServer::success("上传成功", $result); + } catch (Exception $e) { + return JsonServer::error($e->getMessage()); + } + } + + /** + * NOTE: 上传图片 + * @author: 张无忌 + */ + public function video() + { + try { + $cid = $this->request->post('cid'); + $result = FileServer::video($cid, 0); // 0 平台 return JsonServer::success("上传成功", $result); } catch (Exception $e) { return JsonServer::error($e->getMessage()); } } + } \ No newline at end of file diff --git a/app/admin/view/content/help/add.html b/app/admin/view/content/help/add.html index 1338c2b..370f4b8 100644 --- a/app/admin/view/content/help/add.html +++ b/app/admin/view/content/help/add.html @@ -67,7 +67,7 @@ - +