From 34703e5f002724fa3a9e6182ddfc7cc02407f20d Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Thu, 29 May 2025 10:45:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20mobile=20=E8=81=94=E7=B3=BB=E6=88=91?= =?UTF-8?q?=E4=BB=AC=E7=95=99=E8=A8=80=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/common.php | 30 +++- app/index/controller/ContactUs.php | 5 +- app/index/lang/en-us/mobile.php | 12 ++ app/index/view/mobile/contact_us/message.html | 102 ++++++++++++ .../index/mobile/css/contactus_message.css | 156 ++++++++++++++++++ 5 files changed, 300 insertions(+), 5 deletions(-) create mode 100644 app/index/view/mobile/contact_us/message.html create mode 100755 public/static/index/mobile/css/contactus_message.css diff --git a/app/index/common.php b/app/index/common.php index 0610181f..26d0c87f 100644 --- a/app/index/common.php +++ b/app/index/common.php @@ -1,6 +1,8 @@ controller() . '/' . request()->action()); + $lang_key = "{$path}.{$name}"; + if (!Lang::has($lang_key, $lang)) { + return $name; + } + return Lang::get($lang_key, $vars, $lang); + } +} diff --git a/app/index/controller/ContactUs.php b/app/index/controller/ContactUs.php index 4da9e34a..d61da2b1 100644 --- a/app/index/controller/ContactUs.php +++ b/app/index/controller/ContactUs.php @@ -89,10 +89,10 @@ class ContactUs extends Common 'user_agent' => request()->header('user-agent'), ]); if ($msg->isEmpty()) { - return error(lang('contact_message.send_fail')); + return error(lang('信息提交失败!')); } - return success(lang('contact_message.send_success')); + return success(lang('信息已成功提交!')); } $focus_image = []; @@ -103,6 +103,7 @@ class ContactUs extends Common ->where('status', '=', 1) ->order(['sort' => 'asc', 'id' => 'desc']); }]) + ->atPlatform(request()->from) ->uniqueLabel([ 'BANNER_6801be1e7d686', 'BANNER_6801c053ce12e', diff --git a/app/index/lang/en-us/mobile.php b/app/index/lang/en-us/mobile.php index 9caf1bbc..4ea52811 100644 --- a/app/index/lang/en-us/mobile.php +++ b/app/index/lang/en-us/mobile.php @@ -71,4 +71,16 @@ return [ '电话号码' => 'Phone Number', '您对哪个产品品类感兴趣?' => 'Products you are interested in?', '当前选定语言的采购可选品类配置出错' => 'The procurement category configuration for the currently selected language is incorrect', + + // 联系我们留言页 + 'contactus/message' => [ + '我们的信息' => 'Our Information', + '姓名' => 'Your name', + '电子邮箱' => 'Your email', + '您的问题' => 'Your message', + '提交您的问题' => 'Send Us Your Question', + '请输入内容...' => 'This is your placeholder text', + '发送' => 'SEND', + '成为经销商' => 'Become a Distributor', + ], ]; \ No newline at end of file diff --git a/app/index/view/mobile/contact_us/message.html b/app/index/view/mobile/contact_us/message.html new file mode 100644 index 00000000..87343d90 --- /dev/null +++ b/app/index/view/mobile/contact_us/message.html @@ -0,0 +1,102 @@ +{extend name="public/base" /} +{block name="style"} + +{/block} +{block name="main"} +
+ +
+ + {notempty name="focus_image"} + + {/notempty} + +
+
{:lang_i18n('我们的信息')}
+ {notempty name="our_information"} + {assign name="first_info" value="$our_information|array_shift"/} +
+ {notempty name="first_info.image"} +
+ {/notempty} +
+
{$first_info.desc|raw}
+
+
+ {assign name="chunk_info" value="$our_information|array_chunk=2"} + {volist name="chunk_info" id="chunk"} +
+
+ {notempty name="chunk.0.image"} +
+ {/notempty} +
+ {volist name="chunk" id="info" key="k"} +
{$info.title}:
+
{$info.desc|raw}
+ {/volist} +
+
+ {/volist} + {/notempty} +
+ +
+
{:lang_i18n('提交您的问题')}
+
+
+
{:lang_i18n('姓名')} *
+
+ +
+
+
+
{:lang_i18n('电子邮箱')} *
+
+ +
+
+
+
{:lang_i18n('您的问题')} *
+
+ +
+
+
+ {:lang_i18n('发送')} +
+
+
+ + +
+
+{/block} +{block name="script"} + +{/block} \ No newline at end of file diff --git a/public/static/index/mobile/css/contactus_message.css b/public/static/index/mobile/css/contactus_message.css new file mode 100755 index 00000000..d8297815 --- /dev/null +++ b/public/static/index/mobile/css/contactus_message.css @@ -0,0 +1,156 @@ +@charset "UTF-8"; +.oricoEGapp-Contact { + /*新增*/ +} +.oricoEGapp-Contact .banner { + position: relative; + margin-top: 3.3rem; +} +.oricoEGapp-Contact .banner_title { + font-family: "Montserrat-Bold"; + font-size: 1.5rem; + position: absolute; + top: 50%; + margin-top: -0.75rem; + color: #fff; + z-index: 9; + text-align: center; + width: 100%; +} +.oricoEGapp-Contact .content { + background-color: #fff; + margin-top: 0.75rem; + padding: 2rem 1.25rem; + color: #000; +} +.oricoEGapp-Contact .title { + font-family: "Montserrat-Bold"; + font-size: 1rem; +} +.oricoEGapp-Contact .info { + padding-top: 2.125rem; + padding-bottom: 2rem; + display: flex; + justify-content: flex-start; +} +.oricoEGapp-Contact .info .left { + width: 3rem; + height: 3rem; + margin-right: 1rem; +} +.oricoEGapp-Contact .info .left img { + width: 3rem; + height: 3rem; +} +.oricoEGapp-Contact .info .right .des { + font-family: "Montserrat-Regular"; + font-size: 0.875rem; + line-height: 1.25rem; +} +.oricoEGapp-Contact .info_title { + font-family: "Montserrat-Bold"; + font-size: 0.875rem; + line-height: 1.25rem; + margin-bottom: 0.22rem; +} +.oricoEGapp-Contact .m-t-20 { + margin-top: 1.11rem; +} +.oricoEGapp-Contact .question { + margin-top: 1.11rem; +} +.oricoEGapp-Contact .question .title { + margin-top: 0.5rem; + font-family: "Montserrat-Bold"; + font-size: 0.875rem; + line-height: 1.25rem; +} +.oricoEGapp-Contact .question .des { + margin-top: 0.5rem; +} +.oricoEGapp-Contact .question .des input { + background-color: #f2f2f2; + border-radius: 0.5rem; + padding: 1rem; + width: calc(100% - 2rem); + width: -webkit-calc(100% - 2rem); + width: -moz-calc(100% - 2rem); +} +.oricoEGapp-Contact .question .des textarea { + background-color: #f2f2f2; + border-radius: 0.5rem; + padding: 1rem; + width: calc(100% - 2rem); + border: 1px solid transparent; +} +.oricoEGapp-Contact .send { + display: inline-block; + background-color: #004bfa; + font-family: "Montserrat-Bold"; + font-size: 0.875rem; + padding: 0.75rem 1.5rem; + color: #fff; + border-radius: 1.25rem; +} +.oricoEGapp-Contact .red { + color: #ee2f53; +} +.oricoEGapp-Contact .contact_b { + font-family: "Montserrat-SemiBold"; + font-size: 1rem; + padding-top: 1.125rem; + padding-bottom: 1.125rem; + color: #004bfa; + width: 100%; + text-align: center; + background-color: #fff; + margin-top: 0.67rem; +} +.oricoEGapp-Contact .contact_b a { + color: #004bfa; +} +.oricoEGapp-Contact .line { + width: 100%; + height: 1px; + background-color: #f1f1f1; +} +.oricoEGapp-Contact input::-webkit-input-placeholder { + color: #9e9e9f; + font-size: 0.875rem; + font-family: "Montserrat-Regular"; +} +.oricoEGapp-Contact input:-moz-placeholder { + color: #9e9e9f; + font-size: 0.875rem; + font-family: "Montserrat-Regular"; +} +.oricoEGapp-Contact input::-moz-placeholder { + color: #9e9e9f; + font-size: 0.875rem; + font-family: "Montserrat-Regular"; +} +.oricoEGapp-Contact input:-ms-input-placeholder { + color: #9e9e9f; + font-size: 0.875rem; + font-family: "Montserrat-Regular"; +} +.oricoEGapp-Contact textarea::-webkit-input-placeholder { + color: #9e9e9f; + font-size: 0.875rem; + font-family: "Montserrat-Regular"; +} +.oricoEGapp-Contact textarea:-moz-placeholder { + color: #9e9e9f; + font-size: 0.875rem; + font-family: "Montserrat-Regular"; +} +.oricoEGapp-Contact textarea::-moz-placeholder { + color: #9e9e9f; + font-size: 0.875rem; + font-family: "Montserrat-Regular"; +} +.oricoEGapp-Contact textarea:-ms-input-placeholder { + color: #9e9e9f; + font-size: 0.875rem; + font-family: "Montserrat-Regular"; +}