From dc2aee03219fa0748a5e06a293948e38f03dd953 Mon Sep 17 00:00:00 2001 From: jianglong Date: Thu, 14 Sep 2023 16:43:42 +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/logic/community/OrganTeamLogic.php | 2 ++ app/admin/view/community/organ/add.html | 7 +++++++ app/admin/view/community/organ/audit.html | 6 ++++++ app/admin/view/community/organ/edit.html | 7 ++++++- app/admin/view/community/organ/lists.html | 1 + app/api/logic/ArticleLogic.php | 4 ++++ app/api/logic/HelpLogic.php | 6 ++++++ app/api/logic/ResourceLogic.php | 4 ++++ app/shop/logic/goods/GoodsLogic.php | 4 ++-- public/static/lib/likeedit/likeedit.js | 2 +- runtime/cache/9f/d2f37875d1da637002182ec566f162.php | 2 +- 11 files changed, 40 insertions(+), 5 deletions(-) diff --git a/app/admin/logic/community/OrganTeamLogic.php b/app/admin/logic/community/OrganTeamLogic.php index 618b59b..6a94e6a 100644 --- a/app/admin/logic/community/OrganTeamLogic.php +++ b/app/admin/logic/community/OrganTeamLogic.php @@ -122,6 +122,7 @@ class OrganTeamLogic extends Logic 'province_id' => $post['province_id'] ?? 0, 'city_id' => $post['city_id'] ?? 0, 'district_id' => $post['district_id'] ?? 0, + 'address_detail' => $post['address_detail'] ?? '', 'visit' => 0, 'contact' => $post['contact'] ?? '', 'sort' => $post['sort'] ?? 0, @@ -157,6 +158,7 @@ class OrganTeamLogic extends Logic 'province_id' => $post['province_id'] ?? 0, 'city_id' => $post['city_id'] ?? 0, 'district_id' => $post['district_id'] ?? 0, + 'address_detail' => $post['address_detail'] ?? '', 'visit' => 0, 'contact' => $post['contact'] ?? '', 'sort' => $post['sort'] ?? 0, diff --git a/app/admin/view/community/organ/add.html b/app/admin/view/community/organ/add.html index 26be57c..73f71a3 100644 --- a/app/admin/view/community/organ/add.html +++ b/app/admin/view/community/organ/add.html @@ -111,6 +111,13 @@
+ +
+ +
+
+ +
diff --git a/app/admin/view/community/organ/audit.html b/app/admin/view/community/organ/audit.html index bb4e86b..9279bf1 100644 --- a/app/admin/view/community/organ/audit.html +++ b/app/admin/view/community/organ/audit.html @@ -91,6 +91,12 @@
+
+ +
+ +
+
diff --git a/app/admin/view/community/organ/edit.html b/app/admin/view/community/organ/edit.html index 5e6a043..a2e4f74 100644 --- a/app/admin/view/community/organ/edit.html +++ b/app/admin/view/community/organ/edit.html @@ -91,7 +91,12 @@
- +
+ +
+ +
+
diff --git a/app/admin/view/community/organ/lists.html b/app/admin/view/community/organ/lists.html index 1b79cfe..e1d1ea9 100644 --- a/app/admin/view/community/organ/lists.html +++ b/app/admin/view/community/organ/lists.html @@ -109,6 +109,7 @@ ,{field:"image", width:100, align:"center", title:"封面图", templet:"#table-image"} ,{field:"company", width:180, align:"center", title:"企业名称"} ,{field:"address", width:180, align:"center", title:"区域"} + ,{field:"address_detail", width:180, align:"center", title:"位置"} ,{field:"contact", width:150, align:"center", title:"联系方式"} ,{field:"intro", width:100, align:"center", title:"简介"} ,{field:"visit", width:100, align:"center", title:"浏览量"} diff --git a/app/api/logic/ArticleLogic.php b/app/api/logic/ArticleLogic.php index 4f21512..de558f1 100644 --- a/app/api/logic/ArticleLogic.php +++ b/app/api/logic/ArticleLogic.php @@ -113,6 +113,10 @@ class ArticleLogic extends Logic $article->visit = $article->visit + 1; $article->save(); $article = $article->toArray(); + // 使用正则表达式进行替换 + $pattern = '/]+href=["\'](.*?\.(?:mp4|wav))["\'][^>]*>(.*?)<\/a>/i'; + $replacement = ''; + $article['content'] = preg_replace($pattern, $replacement, $article['content']); } return $article; } diff --git a/app/api/logic/HelpLogic.php b/app/api/logic/HelpLogic.php index a095470..187b81f 100644 --- a/app/api/logic/HelpLogic.php +++ b/app/api/logic/HelpLogic.php @@ -88,8 +88,14 @@ class HelpLogic extends Logic foreach ($recommend_list as $key => $recommend){ $recommend_list[$key]['image'] = empty($recommend['image']) ? "" : UrlServer::getFileUrl($recommend['image']); + } + // 使用正则表达式进行替换 + $pattern = '/]+href=["\'](.*?\.(?:mp4|wav))["\'][^>]*>/i'; + $replacement = ''; + $help['content'] = preg_replace($pattern, $replacement, $help['content']); + $help['recommend_list'] = $recommend_list; return $help; } diff --git a/app/api/logic/ResourceLogic.php b/app/api/logic/ResourceLogic.php index d766677..10d34fd 100644 --- a/app/api/logic/ResourceLogic.php +++ b/app/api/logic/ResourceLogic.php @@ -190,6 +190,10 @@ class ResourceLogic extends Logic $article['city_id'], $article['district_id']]):'全国'; + // 使用正则表达式进行替换 + $pattern = '/]+href=["\'](.*?\.(?:mp4|wav))["\'][^>]*>(.*?)<\/a>/i'; + $replacement = ''; + $article['content'] = preg_replace($pattern, $replacement, $article['content']); } return $article; diff --git a/app/shop/logic/goods/GoodsLogic.php b/app/shop/logic/goods/GoodsLogic.php index 8e79aa4..ebb3464 100644 --- a/app/shop/logic/goods/GoodsLogic.php +++ b/app/shop/logic/goods/GoodsLogic.php @@ -842,8 +842,8 @@ class GoodsLogic extends Logic } // 替换内容中图片地址 - $domain = UrlServer::getFileUrl('/'); - $data['content'] = str_replace($domain, '/', $data['content']); +// $domain = UrlServer::getFileUrl('/'); +// $data['content'] = str_replace($domain, '/', $data['content']); // 运费处理 $data['express_money'] = $data['express_type'] == GoodsEnum::EXPRESS_TYPE_UNIFIED ? $data['express_money'] : 0; diff --git a/public/static/lib/likeedit/likeedit.js b/public/static/lib/likeedit/likeedit.js index e63396c..d668e56 100644 --- a/public/static/lib/likeedit/likeedit.js +++ b/public/static/lib/likeedit/likeedit.js @@ -304,7 +304,7 @@ layui.define(["layer", "form", "layedit"], function (t) { image: '', code: '', help: '', - video: '' + // video: '' }, w = new c; t("likeedit", w) diff --git a/runtime/cache/9f/d2f37875d1da637002182ec566f162.php b/runtime/cache/9f/d2f37875d1da637002182ec566f162.php index 99c2af3..2a59ecd 100644 --- a/runtime/cache/9f/d2f37875d1da637002182ec566f162.php +++ b/runtime/cache/9f/d2f37875d1da637002182ec566f162.php @@ -1,4 +1,4 @@ -a:4:{i:0;s:75:"E:\waibao\ahbcqz\server\runtime\cache\ad\710db81cabed7a4fc183cdbe36b098.php";i:1;s:75:"E:\waibao\ahbcqz\server\runtime\cache\b0\2f627ee37a64f2b7a2192d33ffb6ce.php";i:2;s:75:"E:\waibao\ahbcqz\server\runtime\cache\a5\132d23a4f708efcceee81162e0d944.php";i:3;s:75:"E:\waibao\ahbcqz\server\runtime\cache\51\5060a84cc9236c33edb430c07bcd5d.php";} \ No newline at end of file +a:5:{i:0;s:75:"E:\waibao\ahbcqz\server\runtime\cache\ad\710db81cabed7a4fc183cdbe36b098.php";i:1;s:75:"E:\waibao\ahbcqz\server\runtime\cache\b0\2f627ee37a64f2b7a2192d33ffb6ce.php";i:2;s:75:"E:\waibao\ahbcqz\server\runtime\cache\a5\132d23a4f708efcceee81162e0d944.php";i:3;s:75:"E:\waibao\ahbcqz\server\runtime\cache\51\5060a84cc9236c33edb430c07bcd5d.php";i:4;s:75:"E:\waibao\ahbcqz\server\runtime\cache\15\7f97380bf9d6dd15b8de122c49579f.php";} \ No newline at end of file