From a2e40bb7343b64ceaf0ff1f612597cc169cfb0d1 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Tue, 22 Apr 2025 16:02:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=93=81=E7=89=8C=E4=BB=8B=E7=BB=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/controller/AboutUs.php | 42 ++++++++++++ app/index/lang/en-us.php | 6 ++ app/index/lang/zh-cn.php | 6 ++ app/index/route/route.php | 2 + app/index/view/about_us/introduction.html | 65 +++++++++++++++++++ ...roduction.css => aboutus_introduction.css} | 6 +- 6 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 app/index/view/about_us/introduction.html rename public/static/index/css/{introduction.css => aboutus_introduction.css} (95%) diff --git a/app/index/controller/AboutUs.php b/app/index/controller/AboutUs.php index 582ae3e4..afe8415f 100644 --- a/app/index/controller/AboutUs.php +++ b/app/index/controller/AboutUs.php @@ -12,6 +12,48 @@ use think\facade\View; */ class AboutUs extends Common { + /** + * 品牌介绍 + */ + public function introduction() + { + $focus_image = []; + $why = []; + $service = []; + $difference = []; + // 获取品牌介绍banner + $banner = SysBannerModel::with(['items' => function($query) { + $query->withoutField(['status', 'created_at', 'updated_at', 'deleted_at']) + ->where('status', '=', 1) + ->order(['sort' => 'asc', 'id' => 'desc']); + }]) + ->uniqueLabel([ + "BANNER_680744b1d0000", + "BANNER_680744e7cacb3", + "BANNER_680744fd0998d", + "BANNER_68074513b5d20", + ]) + ->language($this->lang_id) + ->enabled(true) + ->select(); + if (!$banner->isEmpty()) { + $banner_map = []; + foreach ($banner as $v) { + $banner_map[$v->unique_label] = $v; + } + $focus_image = data_get($banner_map, 'BANNER_680744b1d0000')?->items->first()?->toArray(); + $why = data_get($banner_map, 'BANNER_680744e7cacb3')?->items->toArray(); + $service = data_get($banner_map, 'BANNER_680744fd0998d')?->items->chunk(4)?->toArray(); + $difference = data_get($banner_map, 'BANNER_68074513b5d20')?->items->chunk(4)?->toArray(); + } + View::assign('focus_image', $focus_image); + View::assign('why', $why); + View::assign('service', $service); + View::assign('difference', $difference); + + return View::fetch('introduction'); + } + /** * 品牌故事 */ diff --git a/app/index/lang/en-us.php b/app/index/lang/en-us.php index 7b060d94..8833ef77 100644 --- a/app/index/lang/en-us.php +++ b/app/index/lang/en-us.php @@ -41,6 +41,12 @@ return [ 'no_data' => 'No Result!', 'no_video' => 'No Video!', ], + 'aboutus_introduction' => [ + 'title' => 'Introduction of the Brand', + 'section_why_title' => 'Why Choose Us', + 'section_service_title' => 'How We Can Help with Customization', + 'section_difference_title' => 'For Different Situation', + ], 'aboutus_mileage' => [ 'achievement' => 'Our Achievement', 'events' => 'Brand Events', diff --git a/app/index/lang/zh-cn.php b/app/index/lang/zh-cn.php index aa344cac..4a517141 100644 --- a/app/index/lang/zh-cn.php +++ b/app/index/lang/zh-cn.php @@ -41,6 +41,12 @@ return [ 'no_data' => '查询无结果!', 'no_video' => '查询无此视频!', ], + 'aboutus_introduction' => [ + 'title' => '品牌介绍', + 'section_why_title' => '选择我们的理由', + 'section_service_title' => '为您提供专属定制服务', + 'section_difference_title' => '对于不同的情况', + ], 'aboutus_mileage' => [ 'achievement' => 'ORICO荣耀', 'events' => '品牌里程', diff --git a/app/index/route/route.php b/app/index/route/route.php index 5edd4edb..70551bf9 100644 --- a/app/index/route/route.php +++ b/app/index/route/route.php @@ -50,6 +50,8 @@ Route::group('faq', function() { // 关于我们 Route::group('aboutus', function() { + // 品牌介绍 + Route::get('introduction', 'AboutUs/introduction'); // 品牌故事 Route::get('story', 'AboutUs/story'); // 品牌里程 diff --git a/app/index/view/about_us/introduction.html b/app/index/view/about_us/introduction.html new file mode 100644 index 00000000..5c5f9f53 --- /dev/null +++ b/app/index/view/about_us/introduction.html @@ -0,0 +1,65 @@ +{extend name="public/base" /} +{block name="title"} +{notempty name=":lang('aboutus_introduction.title')"}{:lang('aboutus_introduction.title')}{else/}{__BLOCK__}{/notempty} +{/block} +{block name="style"} + +{/block} +{block name="main"} +
+ +
+
+ {notempty name="focus_image"} + + {/notempty} +
+

{:lang('aboutus_introduction.section_why_title')}

+
+ {notempty name="why"} + {volist name="why" id="wh"} +
+ +

{$wh.title}

+ {$wh.desc|raw} +
+ {/volist} + {/notempty} +
+
+
+

{:lang('aboutus_introduction.section_service_title')}

+ {notempty name="service"} + {volist name="service" id="se"} +
+ {volist name="se" id="s"} +
+ +
+ {$s.title} +
+ {/volist} +
+ {/volist} + {/notempty} +
+
+
+

{:lang('aboutus_introduction.section_difference_title')}

+ {notempty name="difference"} + {volist name="difference" id="diff"} +
+ {volist name="diff" id="di"} +
+ +
+ {$di.title} +
+ {/volist} +
+ {/volist} + {/notempty} +
+
+
+{/block} diff --git a/public/static/index/css/introduction.css b/public/static/index/css/aboutus_introduction.css similarity index 95% rename from public/static/index/css/introduction.css rename to public/static/index/css/aboutus_introduction.css index 584e6835..df97e98d 100755 --- a/public/static/index/css/introduction.css +++ b/public/static/index/css/aboutus_introduction.css @@ -1,10 +1,11 @@ .orico_Page_introduction { width: 100%; position: relative; - height: 100vh; + min-height: 100vh; overflow-y: auto; overflow-x: hidden; background: #f2f2f2; + padding-bottom: 90px; } .orico_Page_introduction .introductionMain { display: flex; @@ -102,6 +103,9 @@ position: relative; text-align: center; } +.orico_Page_introduction .introductionMain .iotb_part2 .fdimgs.fdimgs1 .fdimgs-div { + height: 405px; +} .orico_Page_introduction .introductionMain .iotb_part2 .fdimgs .fdimgs-div .fdimgs-div-span { position: absolute; bottom: 0px;