diff --git a/addons/official/view/web/official_online_message/list.html b/addons/official/view/web/official_online_message/list.html index 6498e42..d332d5e 100644 --- a/addons/official/view/web/official_online_message/list.html +++ b/addons/official/view/web/official_online_message/list.html @@ -1,190 +1,329 @@ -{extend name="web/official_common/pc/base" /} - -{block name="css"} - -{/block} - -{block name="content"} - -
- - - -
-
- - - - - - - -{/block} - -{block name="js"} - - - +{extend name="web/official_common/pc/base" /} + +{block name="css"} + +{/block} + +{block name="content"} + + + +
+
+
+ 首页 + / + 联系我们 +
+
+ 精诚共赢 · 敏捷响应 +
+

开启确定性数字化技术合作

+

+ 贵阳纳海川科技有限公司技术中台与解决方案架构团队常驻西南核心数谷。我们承诺为每一家意向企业提供经得起白盒审查的架构评估与 24 小时快速响应。 +

+
+
+ + +
+
+
+ + +
+
+ 需求评估 +

预约资深架构师 1 对 1 方案研讨

+

+ 请详细填写您的业务需求与期望指标,我们将在 2 小时内安排专属架构师与您深度对接。 +

+
+ +
+ {:token()} + + +
+ +
+ 企业级中台定制 + APP/小程序定制 + 私有 AI 智能体 + 商业产品选型 +
+ +
+ +
+ +
+ + +
+ +
+ + +
+
+ + +
+ + +
+ + {if $captchaType == 'text'} +
+ +
+ {include file="web/official_common/pc/captcha" event="register" type="$captchaType" /} +
+
+ {/if} + +
+ +
+
+ 纳海川严格执行 ISO 27001 信息安全规范,承诺对您的商业需求与业务数据终身保密。 +
+
+
+ + +
+ + +
+
快速直联
+

业务咨询与技术支持

+ +
+
+ +
+
+
业务咨询专线
+ 13984036826 +
工作日 09:00 - 18:00(资深架构师直连)
+
+
+ +
+
+ +
+
+
技术委员会公用邮箱
+
server@gynhc.com
+
商务合作、白盒技术方案评审接收入口
+
+
+ +
+
SLA 响应承诺
+
工作日 2 小时内快速响应 · 24 小时内出具方案大纲
+
+
+ + +
+

物理实体办公基地

+ + +
+
+ 营销中心 + 花果园中环广场商务基地 +
+

+ 贵州省贵阳市南明区花果园遵义中路中环广场2号楼26楼20-21号 +

+
+ + +
+
+ 技术中心 + 经开区大数据安全产业基地 +
+

+ 贵州省贵阳市经开区数字经济产业园大数据安全产业园数楼4楼02-03号 +

+
+ + +
+
+
+ + 南明营销中心 +
+
+ + 经开技术中心 +
+
+
+ +
+ +
+ +
+ +
+
+
+ + +
+
+
+ +

初次对接常见问题

+

+ 我们以务实坦诚的态度,提前解答您在商务与技术合作中最关注的核心疑问。 +

+
+
+ +
+
+

提交需求后多久能收到初步方案?

+

+ 我们在收到需求后 2 小时内会有资深解决方案架构师进行电话电话回访,并在 24 小时内免费出具针对业务痛点的初步技术拓扑与评估大纲。 +

+
+
+

是否支持前期签署保密协议(NDA)?

+

+ 完全支持。对于涉及敏感商业逻辑、政企业务规范或专属数据的项目,纳海川在深度技术交流前可先行签署具备法律效力的保密协议。 +

+
+
+

是否支持技术架构师现场当面交流?

+

+ 西南地区(贵阳及周边城市)可随时安排资深架构师上门沟通或邀请莅临纳海川基地;全国其他省市可安排腾讯会议/飞书高清视频技术研讨。 +

+
+
+

定制开发的项目如何保障代码自主可控?

+

+ 纳海川提供白盒源码交付协议,不设任何硬件锁、加密狗或暗门,交付全套源码、数据库设计字典及本地化持续集成编译指南。 +

+
+
+
+
+ + +{/block} + +{block name="js"} + + + {/block} \ No newline at end of file diff --git a/addons/official/view/web/official_online_message/list_e.html b/addons/official/view/web/official_online_message/list_e.html index 01a0edb..c42d620 100644 --- a/addons/official/view/web/official_online_message/list_e.html +++ b/addons/official/view/web/official_online_message/list_e.html @@ -1,217 +1,204 @@ -{extend name="web/official_common/mobile/base" /} - - -{block name="content"} - -
- - - -
-
- - - - - - - -{/block} - -{block name="js"} - - +{extend name="web/official_common/mobile/base" /} + +{block name="content"} + +
+ + +
+
+ 精诚共赢 · 敏捷响应 +
+

+ 开启确定性数字化技术合作 +

+

+ 贵阳纳海川科技有限公司技术架构团队立足西南数谷,提供经得起白盒审查的架构评估与 24 小时快速对接。 +

+
+ + +
+
+
快速直联通道
+
+
+
业务咨询与架构专线
+
13984036826
+
+ + 立即拨打 + +
+
+ 技术邮箱: server@gynhc.com + 响应承诺: 2小时直连 +
+
+ + +
+
+ 需求评估 +

+ 预约架构师 1 对 1 方案研讨 +

+

+ 提交您的业务需求,架构师将在 2 小时内回访 +

+
+ +
+ {:token()} + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + {if $captchaType == 'text'} +
+ +
+ + +
+
+ {/if} + + +
+ 严格执行 ISO 27001 体系规范 · 客户商业信息与数据终身保密 +
+
+
+ + +
+
物理实体办公基地
+ +
+
+ 营销中心 + 花果园中环广场商务基地 +
+
+ 贵州省贵阳市南明区花果园遵义中路中环广场2号楼26楼20-21号 +
+
+ +
+
+ 技术中心 + 经开区大数据安全产业基地 +
+
+ 贵州省贵阳市经开区数字经济产业园大数据安全产业园数楼4楼02-03号 +
+
+
+ +
+ +
+ +{/block} + +{block name="js"} + + {/block} \ No newline at end of file diff --git a/public/assets/addons/official/css/modern_nhc.css b/public/assets/addons/official/css/modern_nhc.css index 13156f9..e8b0b3f 100644 --- a/public/assets/addons/official/css/modern_nhc.css +++ b/public/assets/addons/official/css/modern_nhc.css @@ -3073,3 +3073,345 @@ img { grid-template-columns: 1fr; } } + +/* ========================================================================== + 纳海川官方网站 · 联系我们独立页 (Contact Us Page) 现代中式专业风样式 + ========================================================================== */ + +/* 1. 两栏网格布局 (7列 + 5列) */ +.nhc-contact-layout { + display: grid; + grid-template-columns: 1.35fr 1fr; + gap: 36px; + align-items: start; +} + +/* 2. 左侧表单外框 */ +.nhc-contact-form-wrap { + background: #FFFFFF; + border: 1px solid var(--border-color); + border-radius: var(--radius-md); + padding: 40px 36px; + box-shadow: var(--shadow-subtle); + position: relative; +} + +.nhc-form-header { + margin-bottom: 24px; +} + +.nhc-form-title { + font-family: var(--font-serif); + font-size: 22px; + font-weight: 700; + color: var(--text-primary); + margin: 6px 0 8px; +} + +.nhc-form-sub { + font-size: 13px; + color: var(--text-muted); + line-height: 1.6; + margin: 0; +} + +/* 快捷意向选择标签 */ +.nhc-tag-selector { + display: flex; + flex-wrap: wrap; + gap: 8px; + margin-bottom: 12px; +} + +.nhc-topic-tag { + font-size: 12px; + padding: 4px 12px; + border-radius: var(--radius-sm); + background: var(--bg-secondary); + border: 1px solid var(--border-color); + color: var(--text-secondary); + cursor: pointer; + transition: all 0.2s ease; +} + +.nhc-topic-tag:hover, +.nhc-topic-tag.active { + background: #EFF6FF; + border-color: #BFDBFE; + color: var(--primary); + font-weight: 600; +} + +/* 表单控件 */ +.nhc-form-row { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 16px; +} + +.nhc-form-group { + margin-bottom: 18px; +} + +.nhc-form-label { + display: block; + font-size: 13px; + font-weight: 600; + color: var(--text-primary); + margin-bottom: 6px; +} + +.nhc-required { + color: #DC2626; + font-weight: 700; +} + +.nhc-form-input, +.nhc-form-textarea { + width: 100%; + box-sizing: border-box; + padding: 10px 14px; + background: #FFFFFF; + border: 1px solid #CBD5E1; + border-radius: var(--radius-sm); + font-size: 13px; + color: var(--text-primary); + transition: border-color 0.2s, box-shadow 0.2s; + outline: none; +} + +.nhc-form-input:focus, +.nhc-form-textarea:focus { + border-color: var(--primary); + box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); +} + +.nhc-form-textarea { + resize: vertical; +} + +.nhc-form-privacy { + text-align: center; + font-size: 11px; + color: var(--text-muted); + margin-top: 14px; + line-height: 1.5; +} + +/* 3. 右侧信息卡片 */ +.nhc-contact-card { + background: #FFFFFF; + border: 1px solid var(--border-color); + border-radius: var(--radius-md); + padding: 32px 28px; + box-shadow: var(--shadow-subtle); + position: relative; +} + +.nhc-info-badge { + position: absolute; + top: 20px; + right: 20px; + font-size: 11px; + font-weight: 600; + color: var(--primary); + background: #EFF6FF; + border: 1px solid #DBEAFE; + padding: 2px 8px; + border-radius: var(--radius-sm); +} + +.nhc-info-card-title { + font-family: var(--font-serif); + font-size: 17px; + font-weight: 700; + color: var(--text-primary); + margin-bottom: 20px; +} + +.nhc-info-item { + display: flex; + gap: 14px; + margin-bottom: 18px; +} + +.nhc-info-icon { + width: 40px; + height: 40px; + border-radius: var(--radius-sm); + background: #EFF6FF; + color: var(--primary); + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; +} + +.nhc-info-text { + flex-grow: 1; +} + +.nhc-info-label { + font-size: 11px; + color: var(--text-muted); + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.5px; +} + +.nhc-info-val { + font-family: var(--font-serif); + font-size: 18px; + font-weight: 700; + color: var(--text-primary); + margin: 2px 0 3px; +} + +.nhc-phone-link { + color: var(--primary); + text-decoration: none; + transition: color 0.2s; +} + +.nhc-phone-link:hover { + color: #1D4ED8; + text-decoration: underline; +} + +.nhc-info-note { + font-size: 12px; + color: var(--text-secondary); +} + +.nhc-sla-bar { + background: var(--bg-secondary); + border: 1px solid var(--border-color); + border-radius: var(--radius-sm); + padding: 12px 14px; + margin-top: 20px; +} + +.nhc-sla-tag { + font-size: 11px; + font-weight: 700; + color: var(--primary); + letter-spacing: 1px; + margin-bottom: 3px; +} + +.nhc-sla-text { + font-size: 12px; + color: var(--text-secondary); +} + +/* 实体办公地点与地图 */ +.nhc-location-item { + margin-bottom: 14px; +} + +.nhc-location-header { + display: flex; + align-items: center; + gap: 8px; + margin-bottom: 4px; +} + +.nhc-location-title { + font-family: var(--font-serif); + font-size: 14px; + font-weight: 700; + color: var(--text-primary); +} + +.nhc-location-addr { + font-size: 12px; + color: var(--text-secondary); + line-height: 1.6; + margin: 0; +} + +/* 地图模拟视窗 */ +.nhc-map-visual { + background: #F8FAFC; + border: 1px solid var(--border-color); + border-radius: var(--radius-sm); + overflow: hidden; +} + +.nhc-map-canvas { + height: 140px; + position: relative; + background: #F1F5F9; + display: flex; + align-items: center; + justify-content: space-around; + padding: 0 20px; +} + +.nhc-map-grid-bg { + position: absolute; + inset: 0; + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px), + linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px); + background-size: 20px 20px; +} + +.nhc-map-pin { + position: relative; + z-index: 2; + display: flex; + flex-direction: column; + align-items: center; + gap: 4px; +} + +.nhc-pin-pulse { + width: 14px; + height: 14px; + border-radius: 50%; + background: var(--primary); + box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2); + display: inline-block; +} + +.pin-2 .nhc-pin-pulse { + background: #06B6D4; + box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.2); +} + +.nhc-pin-label { + font-size: 11px; + font-weight: 600; + background: #FFFFFF; + padding: 2px 6px; + border-radius: 2px; + border: 1px solid var(--border-color); + box-shadow: var(--shadow-subtle); + color: var(--text-primary); + white-space: nowrap; +} + +.nhc-map-footer { + background: #FFFFFF; + padding: 8px 12px; + text-align: center; + font-size: 11px; + color: var(--text-muted); + border-top: 1px solid var(--border-color); +} + +/* 响应式适配 */ +@media (max-width: 1024px) { + .nhc-contact-layout { + grid-template-columns: 1fr; + } +} + +@media (max-width: 768px) { + .nhc-form-row { + grid-template-columns: 1fr; + } + .nhc-contact-form-wrap { + padding: 24px 20px; + } +} diff --git a/tests/ContactPageTest.php b/tests/ContactPageTest.php new file mode 100644 index 0000000..2da87bc --- /dev/null +++ b/tests/ContactPageTest.php @@ -0,0 +1,128 @@ +htmlContent = file_get_contents($contactFile); + } + if (file_exists($mobileContactFile)) { + $this->mobileHtmlContent = file_get_contents($mobileContactFile); + } + if (file_exists($cssFile)) { + $this->cssContent = file_get_contents($cssFile); + } + } + + public function run() + { + echo "=== 开始执行联系我们独立页设计规范与内容完整性测试 (TDD) ===\n"; + + // 1. 品牌名称必须为纳海川 + $this->testBrandName(); + + // 2. 必备板块测试:表单、地图、电话 (AGENTS.md 规范) + $this->testEssentialSections(); + + // 3. 去除 AI 味道:真实具体的办公地址、电话号码与架构师对接承诺 + $this->testNoAiCharacteristics(); + + // 4. 禁止项测试(严禁 emoji) + $this->testForbiddenElements(); + + // 5. 色彩与设计规范 + $this->testDesignTokens(); + + // 6. 移动端模板完整性 + $this->testMobileTemplate(); + + echo "\n测试结果: {$this->passed} 通过, {$this->failed} 失败\n"; + if ($this->failed > 0) { + exit(1); + } + } + + private function assert($condition, $message) + { + if ($condition) { + echo " [PASS] {$message}\n"; + $this->passed++; + } else { + echo " [FAIL] {$message}\n"; + $this->failed++; + } + } + + public function testBrandName() + { + $this->assert(strpos($this->htmlContent, '纳海川') !== false, "联系我们页面必须明确包含品牌名称【纳海川】"); + $hasWrongAbbr = preg_match('/纳川(?![海])/u', $this->htmlContent); + $this->assert(!$hasWrongAbbr, "联系我们页面严禁错误简称为【纳川】"); + } + + public function testEssentialSections() + { + // 按照 AGENTS.md 规范:联系我们含表单、地图、电话 + $hasForm = (strpos($this->htmlContent, 'htmlContent, 'name="phone"') !== false && strpos($this->htmlContent, 'name="title"') !== false); + $this->assert($hasForm, "联系我们页面必须包含【表单】(包含对接人、电话、需求与提交按钮)板块"); + + $hasMap = (strpos($this->htmlContent, 'nhc-contact-map') !== false || strpos($this->htmlContent, '地图') !== false || strpos($this->htmlContent, '园区') !== false || strpos($this->htmlContent, '大厦') !== false); + $this->assert($hasMap, "联系我们页面必须包含【地图】(办公地址与交通指引/地图视窗)板块"); + + $hasPhone = (strpos($this->htmlContent, '13984036826') !== false || strpos($this->htmlContent, 'tel:') !== false); + $this->assert($hasPhone, "联系我们页面必须包含【电话】(业务直通电话)板块"); + } + + public function testNoAiCharacteristics() + { + // 必须具备真实的落地实体地址(南明区花果园、经开区等真实地址) + $hasRealAddress = (strpos($this->htmlContent, '南明区') !== false || strpos($this->htmlContent, '花果园') !== false || strpos($this->htmlContent, '经开区') !== false); + $this->assert($hasRealAddress, "去AI味道:必须展示具体的真实物理实体地址"); + + // 必须具备真实的电子邮箱与服务时间承诺 + $hasContactDetails = (strpos($this->htmlContent, 'server@gynhc.com') !== false || strpos($this->htmlContent, '09:00') !== false || strpos($this->htmlContent, 'SLA') !== false || strpos($this->htmlContent, '小时') !== false); + $this->assert($hasContactDetails, "去AI味道:必须具备真实企业邮箱与明确的响应时效服务承诺"); + } + + public function testForbiddenElements() + { + $hasEmoji = preg_match('/[\x{1F600}-\x{1F64F}\x{1F300}-\x{1F5FF}\x{1F680}-\x{1F6FF}\x{2600}-\x{26FF}\x{2700}-\x{27BF}]/u', $this->htmlContent); + $this->assert(!$hasEmoji, "联系我们页面严禁使用任何 emoji 表情符号"); + } + + public function testDesignTokens() + { + $hasSerif = (stripos($this->cssContent, 'SimSun') !== false || stripos($this->cssContent, 'Songti') !== false || stripos($this->cssContent, 'Noto Serif SC') !== false); + $this->assert($hasSerif, "必须沿用宋体标题规范"); + + $hasPrimary = (stripos($this->cssContent, '#2563EB') !== false || stripos($this->cssContent, '#2563eb') !== false); + $this->assert($hasPrimary, "必须沿用科技蓝 #2563EB 主色规范"); + } + + public function testMobileTemplate() + { + $this->assert(!empty($this->mobileHtmlContent), "移动端联系我们模板 list_e.html 文件必须存在"); + $this->assert(strpos($this->mobileHtmlContent, '纳海川') !== false, "移动端模板必须包含品牌名【纳海川】"); + $this->assert(strpos($this->mobileHtmlContent, 'assert(strpos($this->mobileHtmlContent, '13984036826') !== false || strpos($this->mobileHtmlContent, 'tel:') !== false, "移动端模板必须包含电话直拨"); + } +} + +$test = new ContactPageTest(); +$test->run(); diff --git a/tests/run_tests.py b/tests/run_tests.py index a9b0ee2..b9b7904 100644 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -177,13 +177,50 @@ def test_about_page(): return res.summary() +def test_contact_page(): + res = TestResult("联系我们独立页 (ContactPage)") + contact_path = os.path.join(BASE_DIR, 'addons', 'official', 'view', 'web', 'official_online_message', 'list.html') + contact_e_path = os.path.join(BASE_DIR, 'addons', 'official', 'view', 'web', 'official_online_message', 'list_e.html') + css_path = os.path.join(BASE_DIR, 'public', 'assets', 'addons', 'official', 'css', 'modern_nhc.css') + + html = open(contact_path, 'r', encoding='utf-8').read() if os.path.exists(contact_path) else '' + mobile_html = open(contact_e_path, 'r', encoding='utf-8').read() if os.path.exists(contact_e_path) else '' + css = open(css_path, 'r', encoding='utf-8').read() if os.path.exists(css_path) else '' + + res.assert_true('纳海川' in html, "PC 联系我们页必须明确包含品牌名称【纳海川】") + res.assert_true(not re.search(r'纳川(?!海)', html), "PC 联系我们页严禁错误简称为【纳川】") + + has_form = '