feat(customer): 新增接待人员选择功能
- 为 ShopDealerApply 模型增加接待人员 ID 和姓名字段 - dealer/customer/add 页面引入 Popup、SearchBar 及图标组件 - 实现接待人员选择弹层及搜索功能 - 表单中新增接待人员展示及清除操作 - 编辑模式下回填接待人员信息 - 提交表单时携带接待人员相关字段 feat(index): 新增首页品牌画册展示组件 - 创建 CatalogShowcase 组件及样式文件 - 展示品牌画册封面及标题说明 - “点击查看”按钮复制链接并提示用户打开浏览器查看 - 在首页主视图添加 CatalogShowcase 组件显示 fix(webview): 优化 webview 页面 URL 获取逻辑 - 使用 useRouter Hook 获取参数替代直接调用 Taro.getCurrentPages -
This commit is contained in:
109
src/pages/index/CatalogShowcase.scss
Normal file
109
src/pages/index/CatalogShowcase.scss
Normal file
@@ -0,0 +1,109 @@
|
||||
.catalog-showcase {
|
||||
margin: 16px;
|
||||
padding: 16px;
|
||||
background: #ffffff;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.catalog-header {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.catalog-title-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.catalog-icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
color: #3b82f6;
|
||||
}
|
||||
|
||||
.catalog-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #1f2937;
|
||||
}
|
||||
|
||||
.catalog-subtitle {
|
||||
font-size: 12px;
|
||||
color: #6b7280;
|
||||
margin-left: 28px;
|
||||
}
|
||||
|
||||
.catalog-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.catalog-preview {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.catalog-cover {
|
||||
width: 140px;
|
||||
height: 180px;
|
||||
background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
|
||||
}
|
||||
|
||||
.cover-icon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
.cover-text {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.cover-subtext {
|
||||
font-size: 11px;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
|
||||
.view-catalog-btn {
|
||||
width: 100%;
|
||||
height: 44px;
|
||||
background: linear-gradient(to right, #3b82f6, #2563eb);
|
||||
border-radius: 22px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
border: none;
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.btn-text {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
71
src/pages/index/CatalogShowcase.tsx
Normal file
71
src/pages/index/CatalogShowcase.tsx
Normal file
@@ -0,0 +1,71 @@
|
||||
import { View, Text } from '@tarojs/components'
|
||||
import Taro from '@tarojs/taro'
|
||||
import { Button } from '@nutui/nutui-react-taro'
|
||||
import { File, ArrowRight } from '@nutui/icons-react-taro'
|
||||
import './CatalogShowcase.scss'
|
||||
|
||||
const CATALOG_URL = 'https://book.yunzhan365.com/mdfy/tjcs/mobile/index.html'
|
||||
|
||||
function CatalogShowcase() {
|
||||
const handleViewCatalog = () => {
|
||||
// 复制链接到剪贴板
|
||||
Taro.setClipboardData({
|
||||
data: CATALOG_URL,
|
||||
success: () => {
|
||||
Taro.showToast({
|
||||
title: '链接已复制',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
// 延迟后提示用户到浏览器打开
|
||||
setTimeout(() => {
|
||||
Taro.showModal({
|
||||
title: '提示',
|
||||
content: '链接已复制到剪贴板,请前往浏览器打开查看品牌画册',
|
||||
showCancel: false,
|
||||
confirmText: '知道了'
|
||||
})
|
||||
}, 2100)
|
||||
},
|
||||
fail: () => {
|
||||
Taro.showToast({
|
||||
title: '复制失败,请重试',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<View className="catalog-showcase">
|
||||
<View className="catalog-header">
|
||||
<View className="catalog-title-bar">
|
||||
<File className="catalog-icon" />
|
||||
<Text className="catalog-title">品牌画册</Text>
|
||||
</View>
|
||||
<Text className="catalog-subtitle">了解南南佐顿门窗的产品与服务</Text>
|
||||
</View>
|
||||
|
||||
<View className="catalog-content">
|
||||
<View className="catalog-preview">
|
||||
<View className="catalog-cover">
|
||||
<File className="cover-icon" />
|
||||
<Text className="cover-text">南南佐顿门窗</Text>
|
||||
<Text className="cover-subtext">品牌电子画册</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<Button
|
||||
className="view-catalog-btn"
|
||||
type="primary"
|
||||
onClick={handleViewCatalog}
|
||||
>
|
||||
<Text className="btn-text">点击查看</Text>
|
||||
<ArrowRight className="btn-icon" />
|
||||
</Button>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
export default CatalogShowcase
|
||||
@@ -14,6 +14,7 @@ import PopUpAd from "@/pages/index/PopUpAd";
|
||||
import TrustSection from "./TrustSection";
|
||||
import CaseShowcase from "./CaseShowcase";
|
||||
import ContactSection from "./ContactSection";
|
||||
import CatalogShowcase from "./CatalogShowcase";
|
||||
import {configWebsiteField} from "@/api/cms/cmsWebsiteField";
|
||||
import type {Config} from "@/api/cms/cmsWebsiteField/model";
|
||||
|
||||
@@ -123,6 +124,7 @@ function Home() {
|
||||
<BestSellers/>
|
||||
<TrustSection/>
|
||||
<CaseShowcase/>
|
||||
<CatalogShowcase/>
|
||||
<ContactSection/>
|
||||
</View>
|
||||
<PopUpAd />
|
||||
|
||||
Reference in New Issue
Block a user