From bc171cde4e74d1f4cb9147e7fc2fff34a0ec8188 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Wed, 28 May 2025 09:52:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20mobile=E6=89=B9=E9=87=8F=E8=B4=AD?= =?UTF-8?q?=E4=B9=B0=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/config/lang.php | 5 +- app/index/controller/ContactUs.php | 6 +- app/index/lang/en-us/mobile.php | 27 +- app/index/lang/en-us/validate.php | 28 ++ .../validate/ContactUsBulkBuyValidate.php | 28 +- app/index/view/mobile/contact_us/bulkbuy.html | 97 +++++ .../index/mobile/css/contactus_bulkbuy.css | 398 ++++++++++++++++++ 7 files changed, 556 insertions(+), 33 deletions(-) create mode 100644 app/index/lang/en-us/validate.php create mode 100644 app/index/view/mobile/contact_us/bulkbuy.html create mode 100755 public/static/index/mobile/css/contactus_bulkbuy.css diff --git a/app/index/config/lang.php b/app/index/config/lang.php index f5055ebb..ee8705b9 100644 --- a/app/index/config/lang.php +++ b/app/index/config/lang.php @@ -18,7 +18,10 @@ return [ 'header_var' => 'think-lang', // 扩展语言包 'extend_list' => [ - 'en-us' => app()->getAppPath() . '/lang/en-us/' . (request()->isMobile() ? 'mobile' : 'pc') . '.php', + 'en-us' => [ + app()->getAppPath() . '/lang/en-us/' . (request()->isMobile() ? 'mobile' : 'pc') . '.php', + app()->getAppPath() . '/lang/en-us/validate.php', + ], 'zh-cn' => app()->getAppPath() . '/lang/zh-cn/' . (request()->isMobile() ? 'mobile' : 'pc') . '.php', ], // Accept-Language转义为对应语言包名称 diff --git a/app/index/controller/ContactUs.php b/app/index/controller/ContactUs.php index 08167533..4da9e34a 100644 --- a/app/index/controller/ContactUs.php +++ b/app/index/controller/ContactUs.php @@ -218,9 +218,9 @@ class ContactUs extends Common 'ip' => request()->ip(), ]); if ($ret->isEmpty()) { - return error(lang('contact_bulkbuy.send_fail')); + return error(lang('信息提交失败!')); } - return success(lang('contact_bulkbuy.send_success')); + return success(lang('信息已成功提交!')); } // 获取可选产品品类配置 @@ -230,7 +230,7 @@ class ContactUs extends Common ->byName('bulk_purchase_inquiry_interested') ->find(); if (empty($config)) { - return error('当前选定语言的采购可选品类配置出错'); + return error(lang('当前选定语言的采购可选品类配置出错')); } View::assign('interested', explode(',', preg_replace('/\r?\n/', ',', $config->value))); diff --git a/app/index/lang/en-us/mobile.php b/app/index/lang/en-us/mobile.php index 7d848d68..dd3db626 100644 --- a/app/index/lang/en-us/mobile.php +++ b/app/index/lang/en-us/mobile.php @@ -80,19 +80,16 @@ return [ '请输入地址' => 'Enter Address', '留言' => 'Message', '请输入留言' => 'Enter your message', - // 成为分销商验证器提示 - '公司名称不能为空' => 'Company Name is required', - '公司名称不能超过64个字符' => 'Company Name cannot exceed 64 characters', - '邮箱不能为空' => 'Email is required', - '邮箱格式不正确' => 'Email format is incorrect', - '邮箱不能超过128个字符' => 'Email cannot exceed 128 characters', - '电话号码不能为空' => 'Phone Number is required', - '电话号码不能超过64个字符' => 'Phone Number cannot exceed 64 characters', - '业务类型不能为空' => 'Type of Business is required', - '业务类型不能超过128个字符' => 'Type of Business cannot exceed 128 characters', - '企业规模不能为空' => 'Enterprise Size is required', - '企业规模不能超过128个字符' => 'Enterprise Size cannot exceed 128 characters', - '公司地址不能为空' => 'Company Address is required', - '公司地址不能超过255个字符' => 'Company Address cannot exceed 255 characters', - '留言不能为空' => 'Message is required', + // 批量购买页面 + '批量购买' => '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', ]; \ No newline at end of file diff --git a/app/index/lang/en-us/validate.php b/app/index/lang/en-us/validate.php new file mode 100644 index 00000000..9b5f1139 --- /dev/null +++ b/app/index/lang/en-us/validate.php @@ -0,0 +1,28 @@ + 'Company Name is required', + '公司名称不能超过64个字符' => 'Company Name cannot exceed 64 characters', + '邮箱不能为空' => 'Email is required', + '邮箱格式不正确' => 'Email format is incorrect', + '邮箱不能超过128个字符' => 'Email cannot exceed 128 characters', + '电话号码不能为空' => 'Phone Number is required', + '电话号码不能超过64个字符' => 'Phone Number cannot exceed 64 characters', + '业务类型不能为空' => 'Type of Business is required', + '业务类型不能超过128个字符' => 'Type of Business cannot exceed 128 characters', + '企业规模不能为空' => 'Enterprise Size is required', + '企业规模不能超过128个字符' => 'Enterprise Size cannot exceed 128 characters', + '公司地址不能为空' => 'Company Address is required', + '公司地址不能超过255个字符' => 'Company Address cannot exceed 255 characters', + '留言不能为空' => 'Message is required', + '公司名称不能超过128个字符' => 'Company name cannot exceed 128 characters', + '网址不能超过255个字符' => 'URL cannot exceed 255 characters', + '名不能为空' => 'First Name is required', + '名不能超过64个字符' => 'First name cannot exceed 64 characters', + '姓不能为空' => 'Last name is required', + '姓不能超过64个字符' => 'Last name cannot exceed 64 characters', + '电话号码不能超过32个字符' => 'Phone number cannot exceed 32 characters', + '感兴趣的产品种类不能超过255个字符' => 'Interested product categories cannot exceed 255 characters', + '留言内容不能为空' => 'Message content is required', + '留言内容不能超过1024个字符' => 'Message content cannot exceed 1024 characters', +]; \ No newline at end of file diff --git a/app/index/validate/ContactUsBulkBuyValidate.php b/app/index/validate/ContactUsBulkBuyValidate.php index df009494..00cb549b 100644 --- a/app/index/validate/ContactUsBulkBuyValidate.php +++ b/app/index/validate/ContactUsBulkBuyValidate.php @@ -31,19 +31,19 @@ class ContactUsBulkBuyValidate extends Validate * @var array */ protected $message = [ - 'corp_name.require' => 'valudate_corp_name_require', - 'corp_name.max' => 'valudate_corp_name_max', - 'url.max' => 'valudate_url_max', - 'first_name.require' => 'valudate_first_name_require', - 'first_name.max' => 'valudate_first_name_max', - 'last_name.require' => 'valudate_last_name_require', - 'last_name.max' => 'valudate_last_name_max', - 'email.require' => 'valudate_email_require', - 'email.email' => 'valudate_email_email', - 'email.max' => 'valudate_email_max', - 'phone.max' => 'valudate_phone_max', - 'interested.max' => 'valudate_interested_max' , - 'message.require' => 'valudate_message_require', - 'message.max' => 'valudate_message_max', + 'corp_name.require' => '公司名称不能为空', + 'corp_name.max' => '公司名称不能超过128个字符', + 'url.max' => '网址不能超过255个字符', + 'first_name.require' => '名不能为空', + 'first_name.max' => '名不能超过64个字符', + 'last_name.require' => '姓不能为空', + 'last_name.max' => '姓不能超过64个字符', + 'email.require' => '邮箱不能为空', + 'email.email' => '邮箱格式不正确', + 'email.max' => '邮箱不能超过128个字符', + 'phone.max' => '电话号码不能超过32个字符', + 'interested.max' => '感兴趣的产品种类不能超过255个字符', + 'message.require' => '留言内容不能为空', + 'message.max' => '留言内容不能超过1024个字符', ]; } diff --git a/app/index/view/mobile/contact_us/bulkbuy.html b/app/index/view/mobile/contact_us/bulkbuy.html new file mode 100644 index 00000000..8cefd10b --- /dev/null +++ b/app/index/view/mobile/contact_us/bulkbuy.html @@ -0,0 +1,97 @@ +{extend name="public/base" /} +{block name="style"} + +{/block} +{block name="main"} +
+
+
+

{:lang('批量购买')}

+
+ +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ +
+ {notempty name="interested"} + {volist name="interested" id="it"} + + {/volist} + {/notempty} +
+
+
+
+
+ + +
+
+
+
+ +
{:lang('提交')}
+
+
+
+
+{/block} +{block name="script"} + +{/block} \ No newline at end of file diff --git a/public/static/index/mobile/css/contactus_bulkbuy.css b/public/static/index/mobile/css/contactus_bulkbuy.css new file mode 100755 index 00000000..1e2a55db --- /dev/null +++ b/public/static/index/mobile/css/contactus_bulkbuy.css @@ -0,0 +1,398 @@ +.cooperapp_bdpage { + width: 100%; + background: #f2f2f2; + position: relative; +} + +.cooperapp_bd_main { + background: #fff; + border-radius: 8px; + padding: 24px 16px; + margin: 20px; + margin-top: 70px; +} + +.cooperapp_t1 { + font-size: 18px; + color: #004bfa; + text-align: left; + font-family: Montserrat-Bold, Montserrat; + font-weight: 700; + margin-top: 0; + margin-bottom: 12px; +} + +.cooperapp_s1 { + font-size: 12px; + color: #707070; + text-align: center; + text-align: left; + font-family: Montserrat-Medium, Montserrat; + font-weight: 500; +} + +.bd_ct { + width: 100%; + display: flex; + flex-direction: row; + justify-content: space-between; +} + +.cooperapp_bd_ct { + width: 100%; + flex-direction: column; +} + +.cooperapp_bdimg { + width: 100%; +} + +.thimg { + margin-top: 12px; + width: 100%; + margin-bottom: 24px; +} + +.bdimg { + width: 100%; + height: 100%; +} + +.bd_from { + display: flex; + flex: 1; + flex-direction: column; +} + +.theit { + display: flex; + flex-direction: row; + justify-content: space-between; + margin-bottom: 20px; +} + +.bditem { + display: flex; + flex-direction: column; + flex: 1; +} + +.bditem1 { + width: 100%; +} + +.itlable { + font-size: 12.5px; + font-family: Montserrat-Medium, Montserrat; + color: #000000; + font-weight: bold; + padding-bottom: 5px; + width: fit-content; + position: relative; +} + +.redtag { + position: absolute; + right: -10px; + top: 0px; + color: #ee2f53; +} + +.itinp { + font-size: 16px; + background: #f2f2f2; + /*border: none !important;*/ + border-radius: 8px; + height: 48px; + border: none; + box-shadow: none; + font-family: Montserrat-Regular, Montserrat; +} + +.itselectopen { + width: 100%; + height: 48px; + display: flex; + background: #f2f2f2; + border: none !important; + border-radius: 8px; + box-shadow: none; + align-items: center; + justify-content: space-between; +} + +.dropdown-menu { + width: 100%; +} + +.ittextarea { + height: 100px; + padding: 15px; + background: #f2f2f2; + border-radius: 8px; + font-family: Montserrat-Regular, Montserrat; +} + +.bttj { + font-size: 14px; + font-family: Montserrat-Bold, Montserrat; + font-weight: bold; + width: 212px; +/* height: 48px; */ + padding: 15px 60px; + background: #004bfa; + border-radius: 28px; + color: #fff; + text-align: center; + margin: 0 auto; + margin-top: 10px; +} + +.iotbpage { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + position: relative; + overflow: auto; + padding-top: 50px; +} + +.iotb_bgw { + width: 100%; + background-color: #fff; + display: flex; + flex-direction: column; + align-items: center; +} + +.bdimg1 { + width: 100%; +} + +.iotbt1 { + font-size: 18px; + font-family: Montserrat-Bold, Montserrat; + padding-bottom: 24px; + padding-top: 40px; + font-weight: 700; + color: #000; +} + +.iotb_part1 { + padding: 0 20px; + display: flex; + flex-direction: row; + justify-content: space-between; + flex-wrap: wrap; + padding-bottom: 40px; + align-items: baseline; +} + +.iotb_p1_item { + width: 45%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +.iotb_p1_item img { + width: 72px; + height: 72px; +} + +.iotbic1 { + width: 120px; + height: 120px; +} + +.iotbtp1 { + font-size: 14px; + font-family: Montserrat-Bold, Montserrat; + font-weight: bold; + padding-bottom: 11px; + word-break: break-word; +} + +.iotbts1 { + text-align: center; + font-size: 12px; + font-family: Montserrat-Medium, Montserrat; + color: #9e9e9f; + word-break: break-word; +} + +.iotb_part2 { + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +.fdimgs { + padding-bottom: 60px; + margin: 0 auto; + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; +} + +.iotb_part3 { + width: 100%; + padding-bottom: 81px; + display: flex; + background-color: #fff; + flex-direction: column; +} + +.odmmain { + width: 70%; + margin: 0 auto; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; +} + +.odmconten { + width: 81%; + margin: 0 auto; + display: flex; + flex-direction: row; + justify-content: space-between; + flex-wrap: wrap; +} + +.odmitem { + width: 41%; + display: flex; + flex-direction: column; + align-items: center; + padding-bottom: 24px; +} + +.appodmimg { + width: 72px; + height: 72px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 50%; + box-shadow: 0px 2px 5px rgba(124, 162, 207, 0.2); +} + +.odms1 { + color: #202020; + font-size: 14px; + padding-top: 12px; + text-align: center; + font-family: Montserrat-Medium, Montserrat; + overflow-wrap: break-word; + word-break: break-word; +} + +.appcoofootimg { + width: 100%; +} + +.sfbt1 { + text-align: center; + font-size: 18px; + font-family: Montserrat-Bold, Montserrat; + font-weight: bold; + padding-bottom: 24px; + padding-top: 24px; + color: #000; +} + +.sfbchecks { + display: flex; + flex-direction: column; +} + +.sfbcheckboxlist { + width: 100%; + display: flex; + flex-direction: column; + align-items: center; +} + +.sfbcheckboxit { + margin: 0 !important; + border: 1px solid #ccc; + width: 16px !important; + height: 16px !important; + border-radius: 2px !important; + margin-right: 10px !important; +} + +.cit { + width: 100%; + font-size: 14px; + font-family: Montserrat-Regular, Montserrat; + color: #000; + display: flex; + flex-direction: row; + align-items: center; + margin-bottom: 12px; + font-weight: 400; +} + +.bd_main1 { + max-height: none; +} + +.ittextarea2 { + height: 200px; + border: 0; +} + +.bditem select { + border: 1px solid #f2f2f2; +} + +.bd_from .form-control { + display: block; + /*width: 100%;*/ + padding: 2px 12px; + font-size: 14px; + line-height: 1.42857143; + color: #555; + transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; +} + +.wcu_list { + display: flex; + flex-direction: column; + padding: 0 20px; +} + +.wcu_ltem { + width: 100%; + margin-bottom: 12px; + background: #fff; + border-radius: 8px; + display: flex; + flex-direction: column; + /*padding: 0 20px;*/ +} + +.wcu_ltem .fbit { + width: 100%; +} + +.wcu_s1 { + color: #000; + font-size: 16px; + font-family: Montserrat-Medium, Montserrat; + font-weight: 500; + padding: 20px 24px; +} + +.bd_main2 { + padding-bottom: 75px; +}