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 1/7] =?UTF-8?q?feat:=20mobile=20=E8=81=94=E7=B3=BB?= =?UTF-8?q?=E6=88=91=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"} +
{:lang('支持型号')}: {$att.applicable_to}
-{:lang('支持系统')}: {$att.support_platform}
+{:lang_i18n('支持型号')}: {$att.applicable_to}
+{:lang_i18n('支持系统')}: {$att.support_platform}
^D6Wx66A3)Z@K<++_fN$ki7p{FPbQwg0ZCuq{b<=3sNejyzh3o6s?5yOyh{x{
z=%!4HtyE(Kd)lTfB|%#FZ;Vri7TNMeJD-?_t eb=fy&mk?gnkVQ-v(-)5{F!`;{d5
z+pDVUrQom*Y~kxT!xwSC6dQv-miSDBN>IcKf4&C!{H7X2^-t$B(0xMPEvH7N^i-
zTC6AJmT<(Y--4890Rez71%St&fwk>56JAemvu1oshEZ*h8ztPZ1oZ9;u5rHAyM}wL
zoGqQ*Gw!R<%h+_+!me{S1q2DR+U6`29QHC2ijR82FLVDx`o<@FC1S
zN*+4&gM1tb-eQNRhl})9u_AxRIA}WwnI?^Z|I?7?Anp##+x-2&M!g%9j8yqpG`t|Q
zEd_G8p-^uWl=vZ4!;k(i0PSSGo6rvK?3GE^7;Y(3IUjH4l37#Et+e
在下面输入您的详细信息,我们的销售团队将在2个工作日内回复您。' => 'Ready to join us?
Enter your details below and our Sales team will get back to you within 2 business days.',
- '公司名称' => 'Company Name',
- '请输入公司名称' => 'Enter your Company Name',
- '电子邮件' => 'Contact Email',
- '请输入邮箱' => 'Enter your Email',
- '电话号码' => 'Phone Number',
- '请输入电话号码' => 'Enter your Phone Number',
- '业务类型' => 'Type of Business',
- '在线商店网址' => 'Online Store URL',
- '企业规模' => 'Enterprise Size',
- '公司地址' => 'Company Address',
- '请输入地址' => 'Enter Address',
- '留言' => 'Message',
- '请输入留言' => 'Enter your message',
- // 批量购买页面
- '批量购买' => 'Bulk Buy',
- '法定营业名称' => 'Legal business name',
- '官方网站' => 'Official website',
- '请粘贴网址' => 'Please paste the URL',
- '姓名' => 'Your Name',
- '姓' => 'Last name',
- '名' => 'First name',
- '邮箱' => 'Email',
- '电话号码' => 'Phone Number',
- '您对哪个产品品类感兴趣?' => 'Products you are interested in?',
- '当前选定语言的采购可选品类配置出错' => 'The procurement category configuration for the currently selected language is incorrect',
+ // 联系我们批量购买页面
+ 'contactus/bulkbuy' => [
+ '批量购买' => 'Bulk Buy',
+ '公司名称' => 'Company Name',
+ '法定营业名称' => 'Legal business name',
+ '官方网站' => 'Official website',
+ '请粘贴网址' => 'Please paste the URL',
+ '姓名' => 'Your Name',
+ '姓' => 'Last name',
+ '名' => 'First name',
+ '邮箱' => 'Email',
+ '请输入邮箱' => 'Enter your Email',
+ '电话号码' => 'Phone Number',
+ '请输入电话号码' => 'Enter your Phone Number',
+ '您对哪个产品品类感兴趣?' => 'Products you are interested in?',
+ '留言' => 'Message',
+ '请输入留言' => 'Enter your message',
+ '提交' => 'SUBMIT',
+ ],
+ // 联系我们成为分销商页面
+ 'contactus/distributor' => [
+ '成为经销商' => 'Become a Distributor',
+ '准备好加入我们了吗?
在下面输入您的详细信息,我们的销售团队将在2个工作日内回复您。' => 'Ready to join us?
Enter your details below and our Sales team will get back to you within 2 business days.',
+ '公司名称' => 'Company Name',
+ '请输入公司名称' => 'Enter your Company Name',
+ '电子邮件' => 'Contact Email',
+ '请输入邮箱' => 'Enter your Email',
+ '电话号码' => 'Phone Number',
+ '请输入电话号码' => 'Enter your Phone Number',
+ '业务类型' => 'Type of Business',
+ '在线商店网址' => 'Online Store URL',
+ '企业规模' => 'Enterprise Size',
+ '公司地址' => 'Company Address',
+ '请输入地址' => 'Enter Address',
+ '留言' => 'Message',
+ '请输入留言' => 'Enter your message',
+ '提交' => 'SUBMIT',
+ ],
// 联系我们留言页
'contactus/message' => [
'我们的信息' => 'Our Information',
diff --git a/app/index/view/mobile/contact_us/bulkbuy.html b/app/index/view/mobile/contact_us/bulkbuy.html
index 8cefd10b..c1b4bea5 100644
--- a/app/index/view/mobile/contact_us/bulkbuy.html
+++ b/app/index/view/mobile/contact_us/bulkbuy.html
@@ -6,45 +6,45 @@
{:lang('批量购买')}
+ {:lang_i18n('批量购买')}