From be48d8a951a72fc816f5bfd2eb1d24e3904ce231 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Mon, 21 Apr 2025 17:30:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=81=94=E7=B3=BB=E6=88=91=E4=BB=AC=20?= =?UTF-8?q?-=20=E5=AE=A2=E6=88=B7=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/common.php | 13 +++ app/index/controller/ContactUs.php | 31 +++++++ app/index/lang/en-us.php | 3 + app/index/lang/zh-cn.php | 3 + app/index/view/contact_us/index.html | 56 ++++++++++++ public/static/index/css/contactus_index.css | 96 +++++++++++++++++++++ 6 files changed, 202 insertions(+) create mode 100644 public/static/index/css/contactus_index.css diff --git a/app/index/common.php b/app/index/common.php index 12436156..724ba086 100644 --- a/app/index/common.php +++ b/app/index/common.php @@ -1,2 +1,15 @@ function($query) { + $query->withoutField(['status', 'created_at', 'updated_at', 'deleted_at']) + ->where('status', '=', 1) + ->order(['sort' => 'asc', 'id' => 'desc']); + }]) + ->uniqueLabel(['BANNER_6805e3d32dcc2', 'BANNER_6806090c1838f']) + ->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_6805e3d32dcc2')?->items->first()?->toArray(); + $info_datas = data_get($banner_map, 'BANNER_6806090c1838f')?->items->each(function($item) { + if (Str::contains($item->title, '
')) { + $title = explode('
', $item->title); + $item->title = $title[0]; + $item->title_short = $title[1]; + } + return $item; + })->chunk(4)->toArray(); + } + View::assign('focus_image', $focus_image); + View::assign('info_datas', $info_datas); + return View::fetch('index'); } diff --git a/app/index/lang/en-us.php b/app/index/lang/en-us.php index b154880f..b1e2042a 100644 --- a/app/index/lang/en-us.php +++ b/app/index/lang/en-us.php @@ -46,6 +46,9 @@ return [ 'events' => 'Brand Events', 'development' => 'Tech Development', ], + 'contact_index' => [ + 'title' => 'contact us', + ], 'contact_message' => [ 'title' => 'contact us', 'our_information' => 'Our Information', diff --git a/app/index/lang/zh-cn.php b/app/index/lang/zh-cn.php index fd6c195e..54d68a19 100644 --- a/app/index/lang/zh-cn.php +++ b/app/index/lang/zh-cn.php @@ -46,6 +46,9 @@ return [ 'events' => '品牌里程', 'development' => '品牌活动', ], + 'contact_index' => [ + 'title' => '客户服务', + ], 'contact_message' => [ 'title' => '联系我们', 'our_information' => '我们的信息', diff --git a/app/index/view/contact_us/index.html b/app/index/view/contact_us/index.html index e69de29b..728fb1b7 100644 --- a/app/index/view/contact_us/index.html +++ b/app/index/view/contact_us/index.html @@ -0,0 +1,56 @@ +{extend name="public/base" /} +{block name="title"} +{:lang('contact_index.title')} +{/block} +{block name="style"} + +{/block} +{block name="main"} + +{notempty name="focus_image.image"} +
+ +
+{/notempty} + +
+ {notempty name="info_datas"} +
+ {volist name="info_datas" id="items"} +
+ {gt name=":count($items)" value="2"} + {volist name="items" id="item"} + + + {$item.title} + {notempty name="item.title_short"} + {$item.title_short} + {/notempty} + {notempty name="item.desc"} + {if condition="str_contains($item.desc, ' + {else/} +
+ {/if} + {$item.desc|raw} +
+ {/notempty} +
+ {/volist} + {else/} + {volist name="items" id="item"} +
+ +
+ {$item.title} + {$item.desc|raw} +
+
+ {/volist} + {/gt} +
+ {/volist} +
+ {/notempty} +
+{/block} \ No newline at end of file diff --git a/public/static/index/css/contactus_index.css b/public/static/index/css/contactus_index.css new file mode 100644 index 00000000..228db5c7 --- /dev/null +++ b/public/static/index/css/contactus_index.css @@ -0,0 +1,96 @@ +.narskfPage { + width: 100%; + height: 100%; + background: #F5F5F5; + display: flex; + flex-direction: column; + align-items: center; + overflow-y: auto; +} +.narskfPage .narskf-content { + display: flex; + flex-direction: column; + margin: 0 auto; + padding-top: 3.5rem; + padding-bottom: 9.25rem; +} +.narskfPage .narskf-content .narskf-ct-row { + width: 100%; + display: flex; + flex-direction: row; + justify-content: space-between; +} +.narskfPage .narskf-content .narskf-ct-row .narskfit { + width: 18rem; + height: 17.25rem; + border-radius: 0.125rem; + margin-right: 1rem; + margin-bottom: 1rem; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + background: #fff; + cursor: pointer; + position: relative; +} +.narskfPage .narskf-content .narskf-ct-row .narskfit .narskf-title { + color: #262626; + font-size: 1.125rem; + padding-top: 1.6875rem; + padding-bottom: 0.375rem; +} +.narskfPage .narskf-content .narskf-ct-row .narskfit .narskf-sm { + color: #9a9a9a; + font-size: 1rem; +} +.narskfPage .narskf-content .narskf-ct-row .narskfit .narskf-font-26 { + color: #262626 !important; +} +.narskfPage .narskf-content .narskf-ct-row .narskfit .narskico-img { + width: 3.75rem; + height: 3.75rem; +} +.narskfPage .narskf-content .narskf-ct-row .narskfit .narskfactive-ewm { + width: 100%; + height: 100%; + position: absolute; + top: 0; + z-index: 1; + display: none; + align-items: center; + justify-content: center; +} +.narskfPage .narskf-content .narskf-ct-row .narskfit .narskfactive-ewm p, +.narskfPage .narskf-content .narskf-ct-row .narskfit .narskfactive-ewm img { + width: 11rem; + width: 11rem; +} +.narskfPage .narskf-content .narskf-ct-row .narskfit2 { + width: 37rem; + height: 11.25rem; + flex-direction: row; +} +.narskfPage .narskf-content .narskf-ct-row .narskfit2 .narskico-img { + margin-right: 1.5rem; +} +.narskfPage .narskf-content .narskf-ct-row .narskfit2 .narskfit2-ct { + display: flex; + flex-direction: column; + text-align: left; +} +.narskfPage .narskf-content .narskf-ct-row .narskfit2 .narskfit2-ct .narskf-title { + padding-top: 0; + font-size: 1.5rem; + padding-bottom: 0.375rem; +} +.narskfPage .narskf-content .narskf-ct-row .narskfit2 .narskfit2-ct .narskf-sm { + font-size: 1.25rem; + color: #9A9A9A; +} +.narskfPage .narskf-content .narskf-ct-row .narskfit:last-child { + margin-right: 0rem; +} +.narskfPage .narskf-content .narskf-ct-row .narskfit:hover .narskfactive-ewm { + display: flex; +} \ No newline at end of file