0045939863784
-+004389478327
++86 19895983967
From 5dffe62adcfafecdde21e2d495e63fd0ce318f45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=AB=E5=9C=B0=E5=83=A7?= <357099073@qq.com> Date: Tue, 10 Mar 2026 22:59:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=A8=A1=E6=9D=BF=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/route/routes/file.php | 1 + app/index/controller/BannerController.php | 60 ++++++ app/index/route/app.php | 3 + .../themes/default/assets/css/lindy-uikit.css | 10 +- public/themes/default/index.php | 185 +++++++++++++++--- 5 files changed, 226 insertions(+), 33 deletions(-) create mode 100644 app/index/controller/BannerController.php diff --git a/app/admin/route/routes/file.php b/app/admin/route/routes/file.php index ddd4628..70a462c 100644 --- a/app/admin/route/routes/file.php +++ b/app/admin/route/routes/file.php @@ -6,6 +6,7 @@ Route::get('usercate', 'app\\admin\\controller\\System\\FileController@getUserCa Route::get('allfiles', 'app\\admin\\controller\\System\\FileController@getAllFiles'); Route::get('catefiles/:id', 'app\\admin\\controller\\System\\FileController@getCateFiles'); Route::post('uploadfile', 'app\\admin\\controller\\System\\FileController@uploadFile'); +Route::post('uploadfiles', 'app\\admin\\controller\\System\\FileController@uploadFile'); Route::post('updatefile/:id', 'app\\admin\\controller\\System\\FileController@updateFile'); Route::delete('deletefile/:id', 'app\\admin\\controller\\System\\FileController@deleteFile'); Route::get('movefile/:id', 'app\\admin\\controller\\System\\FileController@moveFile'); diff --git a/app/index/controller/BannerController.php b/app/index/controller/BannerController.php new file mode 100644 index 0000000..01ce7e3 --- /dev/null +++ b/app/index/controller/BannerController.php @@ -0,0 +1,60 @@ +getTenantId(); + + if (empty($tid)) { + return json([ + 'code' => 400, + 'msg' => '无法识别租户信息', + 'list' => [], + ]); + } + + // 查询该租户下的 Banner + $banners = Db::name('mete_apps_cms_banner') + ->where('tid', $tid) + ->whereNull('delete_time') + ->order('sort', 'asc') + ->order('id', 'desc') + ->select() + ->toArray(); + + // 处理图片路径 + foreach ($banners as &$banner) { + if (!empty($banner['image'])) { + // 如果图片路径已经是完整 URL,直接返回 + if (!preg_match('/^https?:\/\//', $banner['image'])) { + // 拼接完整 URL + $banner['image'] = $this->request->scheme() . '://' . $this->request->host() . + (strpos($banner['image'], '/') === 0 ? '' : '/') . $banner['image']; + } + } + } + + return json([ + 'code' => 200, + 'msg' => 'success', + 'list' => $banners, + ]); + } +} diff --git a/app/index/route/app.php b/app/index/route/app.php index 74fb5e3..0d1c507 100644 --- a/app/index/route/app.php +++ b/app/index/route/app.php @@ -14,6 +14,9 @@ Route::get('footerdata', 'app\index\controller\Index@getFooterData'); // --- 文章列表路由 --- Route::get('getCenterNews', 'app\index\controller\Article\NewsCenterController@getCenterNews'); +// --- Banner 路由 --- +Route::get('getBanners', 'app\index\controller\BannerController@getBanners'); + // --- 文章互动路由 --- Route::post('articleViews/:id', 'app\index\controller\Article\ArticleController@articleViews'); Route::post('articleLikes/:id', 'app\index\controller\Article\ArticleController@articleLikes'); diff --git a/public/themes/default/assets/css/lindy-uikit.css b/public/themes/default/assets/css/lindy-uikit.css index f97943e..5f9a40f 100644 --- a/public/themes/default/assets/css/lindy-uikit.css +++ b/public/themes/default/assets/css/lindy-uikit.css @@ -658,7 +658,7 @@ p { .hero-section-wrapper-5 .hero-style-5 { position: relative; z-index: 1; - padding: 270px 0 140px; + padding: 100px 0 100px; } @media only screen and (min-width: 1200px) and (max-width: 1399px) { @@ -758,12 +758,15 @@ p { } .hero-section-wrapper-5 .hero-style-5 .hero-image { - margin-bottom: 100px; + /* margin-bottom: 100px; */ position: relative; } .hero-section-wrapper-5 .hero-style-5 .hero-image img { - width: 100%; + max-height:450px; + width: auto; + max-width: 100%; + object-fit: contain; } .hero-section-wrapper-5 .hero-style-5 .shapes .shape { @@ -964,7 +967,6 @@ p { ABOUT-4 CSS ================================ */ .about-style-4 { - background: #F3F3F3; padding: 100px 0 50px; position: relative; z-index: 1; diff --git a/public/themes/default/index.php b/public/themes/default/index.php index a838ae5..8f0a888 100644 --- a/public/themes/default/index.php +++ b/public/themes/default/index.php @@ -13,6 +13,8 @@ + +
@@ -82,23 +84,14 @@ -Please purchase full version of the template to get all sections and permission to use with commercial projects.
- Get Started -Stop wasting time and money designing and managing a website that doesn’t get results. Happiness guaranteed!
+如果您有任何需求,欢迎联系我们!
0045939863784
-+004389478327
++86 19895983967
yourmail@gmail.com
-admin@yourwebsite.com
+lygyunze@gmail.com
+357099073@qq.com
John's House, 13/5 Road, Sidny United State Of America
+江苏省连云港市海州区润潮国际大厦