diff --git a/.workbuddy/memory/2026-04-02.md b/.workbuddy/memory/2026-04-02.md index 873f73a..d5fea57 100644 --- a/.workbuddy/memory/2026-04-02.md +++ b/.workbuddy/memory/2026-04-02.md @@ -1,3 +1,5 @@ # 2026-04-02 工作记录 - 首页布局微调:将品牌画册入口(BrochureEntry)从 Banner 下方移至 NoticeBar 下方;同时注释隐藏 CaseShowcase(成功案例区块)。 +- BrochureEntry 交互改版:点击"查看画册"不再跳转内页,改为复制画册链接到剪贴板,弹出 showModal 提示"链接已复制,请前往浏览器粘贴链接查看画册"。链接优先读后台 config.domain,兜底使用固定链接 https://book.yunzhan365.com/mdfy/tjcs/mobile/index.html。 +- 联系电话更新:ContactSection.tsx 中"客服热线 400-888-9999"改为"联系电话 13367810229";brochure/index.tsx 中的 DEFAULT_HOTLINE 也同步更新为 13367810229。 diff --git a/src/pages/brochure/index.tsx b/src/pages/brochure/index.tsx index 97550ac..c54a9df 100644 --- a/src/pages/brochure/index.tsx +++ b/src/pages/brochure/index.tsx @@ -14,8 +14,8 @@ import type { Config } from '@/api/cms/cmsWebsiteField/model' import './index.scss' const DEFAULT_BRAND_NAME = '南南佐顿门窗' -const DEFAULT_HOTLINE_DISPLAY = '400-888-9999' -const DEFAULT_HOTLINE = '4008889999' +const DEFAULT_HOTLINE_DISPLAY = '13367810229' +const DEFAULT_HOTLINE = '13367810229' const DEFAULT_ADDRESS = '欢迎到店咨询门窗定制方案' const DEFAULT_WORKDAY = '周一至周日 08:30-18:30' diff --git a/src/pages/index/BrochureEntry.tsx b/src/pages/index/BrochureEntry.tsx index eddc481..e708dcb 100644 --- a/src/pages/index/BrochureEntry.tsx +++ b/src/pages/index/BrochureEntry.tsx @@ -1,15 +1,42 @@ -import React from 'react' +import React, { useEffect, useState } from 'react' import Taro from '@tarojs/taro' import { View, Text } from '@tarojs/components' import { ImageRectangle, ArrowRight } from '@nutui/icons-react-taro' +import { configWebsiteField } from '@/api/cms/cmsWebsiteField' +import type { Config } from '@/api/cms/cmsWebsiteField/model' import './BrochureEntry.scss' const BROCHURE_TITLE = '品牌画册' +const DEFAULT_BROCHURE_URL = 'https://book.yunzhan365.com/mdfy/tjcs/mobile/index.html' const BrochureEntry: React.FC = () => { + const [config, setConfig] = useState() + + useEffect(() => { + configWebsiteField({}) + .then((data) => setConfig(data)) + .catch(() => undefined) + }, []) + const handleClick = () => { - Taro.navigateTo({ - url: '/pages/brochure/index' + const url = config?.domain || DEFAULT_BROCHURE_URL + + Taro.setClipboardData({ + data: url, + success: () => { + Taro.showModal({ + title: '链接已复制', + content: '请前往浏览器,粘贴链接即可查看完整画册。', + showCancel: false, + confirmText: '知道了' + }) + }, + fail: () => { + Taro.showToast({ + title: '复制失败,请稍后重试', + icon: 'none' + }) + } }) } diff --git a/src/pages/index/ContactSection.tsx b/src/pages/index/ContactSection.tsx index a418e22..00d4bd4 100644 --- a/src/pages/index/ContactSection.tsx +++ b/src/pages/index/ContactSection.tsx @@ -11,8 +11,8 @@ const ContactSection: React.FC = () => { const contactItems = [ { icon: , - title: '客服热线', - value: '400-888-9999', + title: '联系电话', + value: '13367810229', action: 'call', colorClass: 'contact-item--blue' }, @@ -64,13 +64,13 @@ const ContactSection: React.FC = () => { const handleCallPhone = () => { Taro.showModal({ title: '拨打电话', - content: '是否拨打客服热线 400-888-9999?', + content: '是否拨打联系电话 13367810229?', confirmText: '拨打', cancelText: '取消', success: (res) => { if (res.confirm) { Taro.makePhoneCall({ - phoneNumber: '4008889999', + phoneNumber: '13367810229', success: () => { console.log('拨打电话成功') },