首次提交
This commit is contained in:
@@ -0,0 +1,828 @@
|
||||
/* 首页样式 - 印美达 Inkreach */
|
||||
|
||||
.home {
|
||||
min-height: 100vh;
|
||||
background: #ffffff;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/* 导航栏 */
|
||||
.nav-bar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1000;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 1rpx 0 rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.nav-content {
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
|
||||
.nav-logo {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 8rpx;
|
||||
}
|
||||
|
||||
.logo-text {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #ff6800;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.logo-cn {
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.nav-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 24rpx;
|
||||
}
|
||||
|
||||
.nav-btn {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.nav-login {
|
||||
font-size: 24rpx;
|
||||
color: #ff6800;
|
||||
border: 2rpx solid #ff6800;
|
||||
padding: 8rpx 24rpx;
|
||||
border-radius: 32rpx;
|
||||
}
|
||||
|
||||
/* Hero 首屏 */
|
||||
.hero {
|
||||
position: relative;
|
||||
padding: 60rpx 32rpx 80rpx;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(180deg, #fff5ee 0%, #ffffff 100%);
|
||||
}
|
||||
|
||||
.hero-bg {
|
||||
position: absolute;
|
||||
top: -100rpx;
|
||||
right: -200rpx;
|
||||
width: 600rpx;
|
||||
height: 600rpx;
|
||||
background: radial-gradient(circle, rgba(255, 104, 0, 0.06) 0%, transparent 70%);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.hero-content {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.hero-title {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8rpx;
|
||||
}
|
||||
|
||||
.hero-title-main {
|
||||
font-size: 72rpx;
|
||||
font-weight: 800;
|
||||
color: #1a1a1a;
|
||||
line-height: 1.2;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
|
||||
.hero-subtitle {
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
|
||||
.hero-tags {
|
||||
display: flex;
|
||||
gap: 16rpx;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
|
||||
.hero-tag {
|
||||
font-size: 22rpx;
|
||||
color: #ff6800;
|
||||
background: rgba(255, 104, 0, 0.08);
|
||||
padding: 8rpx 20rpx;
|
||||
border-radius: 24rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.hero-cta {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #ff6800;
|
||||
color: #ffffff;
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
padding: 24rpx 64rpx;
|
||||
border-radius: 48rpx;
|
||||
margin-top: 48rpx;
|
||||
box-shadow: 0 8rpx 24rpx rgba(255, 104, 0, 0.3);
|
||||
}
|
||||
|
||||
/* 3D插画区 */
|
||||
.hero-illustration {
|
||||
position: relative;
|
||||
height: 400rpx;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.hero-illust-item {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.hero-illist-tshirt {
|
||||
top: 20rpx;
|
||||
left: 20rpx;
|
||||
transform: rotate(-8deg);
|
||||
}
|
||||
|
||||
.hero-illist-bag {
|
||||
top: 60rpx;
|
||||
right: 40rpx;
|
||||
transform: rotate(12deg);
|
||||
}
|
||||
|
||||
.hero-illist-box {
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%) rotate(-3deg);
|
||||
}
|
||||
|
||||
.illust-placeholder {
|
||||
border-radius: 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 80rpx;
|
||||
}
|
||||
|
||||
.illust-placeholder.tshirt {
|
||||
width: 200rpx;
|
||||
height: 220rpx;
|
||||
background: linear-gradient(135deg, #ff6800 0%, #ff8c40 100%);
|
||||
}
|
||||
|
||||
.illust-placeholder.bag {
|
||||
width: 180rpx;
|
||||
height: 200rpx;
|
||||
background: linear-gradient(135deg, #f26522 0%, #ff8855 100%);
|
||||
}
|
||||
|
||||
.illust-placeholder.box {
|
||||
width: 240rpx;
|
||||
height: 180rpx;
|
||||
background: linear-gradient(135deg, #ff6800 0%, #ffa040 100%);
|
||||
}
|
||||
|
||||
/* 通用 section */
|
||||
.section-title {
|
||||
font-size: 40rpx;
|
||||
font-weight: 700;
|
||||
color: #1a1a1a;
|
||||
text-align: center;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.section-subtitle {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
margin-top: 12rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.section-title-small {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
display: block;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
/* 信任指标 */
|
||||
.trust-section {
|
||||
padding: 64rpx 32rpx;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.trust-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 24rpx;
|
||||
}
|
||||
|
||||
.trust-card {
|
||||
flex: 1;
|
||||
min-width: 160rpx;
|
||||
background: #fff8f3;
|
||||
border-radius: 16rpx;
|
||||
padding: 28rpx 16rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.trust-number {
|
||||
font-size: 40rpx;
|
||||
font-weight: 700;
|
||||
color: #ff6800;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.trust-label {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
margin-top: 8rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* 4步流程 */
|
||||
.steps-section {
|
||||
padding: 64rpx 32rpx;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.steps-list {
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.step-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 24rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 16rpx;
|
||||
transition: all 0.3s;
|
||||
border: 2rpx solid transparent;
|
||||
}
|
||||
|
||||
.step-item.active {
|
||||
border-color: #ff6800;
|
||||
box-shadow: 0 4rpx 16rpx rgba(255, 104, 0, 0.1);
|
||||
}
|
||||
|
||||
.step-number {
|
||||
font-size: 36rpx;
|
||||
font-weight: 800;
|
||||
color: #ddd;
|
||||
width: 80rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.step-item.active .step-number {
|
||||
color: #ff6800;
|
||||
}
|
||||
|
||||
.step-info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6rpx;
|
||||
}
|
||||
|
||||
.step-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.step-desc {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.step-visual {
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
|
||||
.step-visual-card {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 48rpx 32rpx;
|
||||
text-align: center;
|
||||
border: 2rpx solid #ff6800;
|
||||
}
|
||||
|
||||
.step-visual-icon {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
background: #fff0e5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 auto 24rpx;
|
||||
}
|
||||
|
||||
.step-visual-emoji {
|
||||
font-size: 56rpx;
|
||||
}
|
||||
|
||||
.step-visual-text {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* 全球POD货盘 */
|
||||
.catalog-section {
|
||||
padding: 64rpx 0;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.catalog-section .section-title {
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
|
||||
.category-tabs {
|
||||
white-space: nowrap;
|
||||
padding: 24rpx 32rpx;
|
||||
}
|
||||
|
||||
.cat-tab {
|
||||
display: inline-block;
|
||||
padding: 12rpx 32rpx;
|
||||
margin-right: 16rpx;
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
background: #f5f5f5;
|
||||
border-radius: 32rpx;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.cat-tab.active {
|
||||
background: #ff6800;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.product-preview-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 0 32rpx;
|
||||
gap: 24rpx;
|
||||
}
|
||||
|
||||
.product-preview-card {
|
||||
width: calc(50% - 12rpx);
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.product-preview-img {
|
||||
width: 100%;
|
||||
height: 280rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.product-preview-emoji {
|
||||
font-size: 80rpx;
|
||||
}
|
||||
|
||||
.product-preview-info {
|
||||
padding: 16rpx;
|
||||
}
|
||||
|
||||
.product-preview-name {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.product-preview-price {
|
||||
font-size: 28rpx;
|
||||
color: #ff6800;
|
||||
font-weight: 600;
|
||||
margin-top: 8rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.see-more {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8rpx;
|
||||
padding: 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #ff6800;
|
||||
}
|
||||
|
||||
.see-more .arrow {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
/* 平台功能 */
|
||||
.features-section {
|
||||
padding: 64rpx 32rpx;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.features-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 24rpx;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.feature-card {
|
||||
width: calc(50% - 12rpx);
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
padding: 32rpx 24rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.feature-icon {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.feature-emoji {
|
||||
font-size: 40rpx;
|
||||
}
|
||||
|
||||
.feature-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.feature-desc {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* 为什么选择 */
|
||||
.why-section {
|
||||
padding: 64rpx 32rpx;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.why-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 24rpx;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
.why-card {
|
||||
width: calc(50% - 12rpx);
|
||||
text-align: center;
|
||||
padding: 32rpx 16rpx;
|
||||
background: #fff8f3;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.why-icon {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
margin: 0 auto 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #ffffff;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.why-emoji {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.why-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
display: block;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.why-desc {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* 公司简介 */
|
||||
.company-section {
|
||||
padding: 64rpx 32rpx;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.company-card {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 40rpx 32rpx;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
|
||||
.company-headline {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
line-height: 1.6;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.company-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24rpx;
|
||||
}
|
||||
|
||||
.company-block-title {
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
color: #ff6800;
|
||||
display: block;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.company-block-text {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.company-stats {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-top: 32rpx;
|
||||
padding-top: 32rpx;
|
||||
border-top: 1rpx solid #eee;
|
||||
}
|
||||
|
||||
.company-stat {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.company-stat-number {
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
color: #ff6800;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.company-stat-label {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
margin-top: 4rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* 用户案例 */
|
||||
.cases-section {
|
||||
padding: 64rpx 0;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.cases-section .section-title {
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
|
||||
.cases-scroll {
|
||||
white-space: nowrap;
|
||||
padding: 32rpx;
|
||||
}
|
||||
|
||||
.case-card {
|
||||
display: inline-block;
|
||||
width: 480rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
margin-right: 24rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.case-image {
|
||||
width: 100%;
|
||||
height: 320rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.case-emoji {
|
||||
font-size: 80rpx;
|
||||
}
|
||||
|
||||
.case-info {
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.case-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
display: block;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.case-tags {
|
||||
display: flex;
|
||||
gap: 8rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.case-tag {
|
||||
font-size: 20rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
background: #fff0e5;
|
||||
color: #ff6800;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.case-metrics {
|
||||
display: flex;
|
||||
gap: 24rpx;
|
||||
padding-top: 16rpx;
|
||||
border-top: 1rpx solid #eee;
|
||||
}
|
||||
|
||||
.case-metric-value {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #ff6800;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.case-metric-label {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* 最终CTA */
|
||||
.cta-section {
|
||||
position: relative;
|
||||
padding: 80rpx 32rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cta-bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: linear-gradient(135deg, #ff6800 0%, #ff8c40 100%);
|
||||
}
|
||||
|
||||
.cta-content {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cta-title {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: 48rpx;
|
||||
font-weight: 700;
|
||||
color: #ffffff;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.cta-desc {
|
||||
font-size: 26rpx;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
margin-top: 16rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.cta-input-wrap {
|
||||
display: flex;
|
||||
gap: 16rpx;
|
||||
margin-top: 40rpx;
|
||||
padding: 0 16rpx;
|
||||
}
|
||||
|
||||
.cta-input {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border-radius: 40rpx;
|
||||
padding: 0 32rpx;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.cta-placeholder {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.cta-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #1a1a1a;
|
||||
color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
padding: 0 40rpx;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
|
||||
/* 底部 */
|
||||
.footer {
|
||||
background: #121212;
|
||||
padding: 48rpx 32rpx;
|
||||
padding-bottom: calc(48rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.footer-top {
|
||||
text-align: center;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.footer-logo {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: center;
|
||||
gap: 8rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.footer-logo-en {
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
color: #ff6800;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.footer-logo-cn {
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.footer-slogan {
|
||||
font-size: 22rpx;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.footer-links {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.footer-col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.footer-col-title {
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.footer-link {
|
||||
font-size: 22rpx;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.footer-bottom {
|
||||
text-align: center;
|
||||
padding-top: 32rpx;
|
||||
border-top: 1rpx solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.footer-copyright {
|
||||
font-size: 20rpx;
|
||||
color: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
@@ -0,0 +1,532 @@
|
||||
<template>
|
||||
<!-- 首页 - 印美达 Inkreach 按需定制平台 -->
|
||||
<view class="home">
|
||||
<!-- 自定义导航栏 -->
|
||||
<view class="nav-bar" :style="'padding-top: ' + statusBarHeight + 'px;'">
|
||||
<view class="nav-content">
|
||||
<view class="nav-logo" @tap="goHome">
|
||||
<text class="logo-text">inkreach</text>
|
||||
<text class="logo-cn">印美达</text>
|
||||
</view>
|
||||
<view class="nav-actions">
|
||||
<text class="nav-btn" @tap="goProducts">产品中心</text>
|
||||
<view class="nav-login" @tap="goProducts">立即开始</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 占位 -->
|
||||
<view :style="'height: ' + (statusBarHeight + 44) + 'px;'"></view>
|
||||
|
||||
<!-- Hero 首屏 -->
|
||||
<view class="hero">
|
||||
<view class="hero-bg"></view>
|
||||
<view class="hero-content">
|
||||
<view class="hero-title">
|
||||
<text class="hero-title-main">一站定制</text>
|
||||
<text class="hero-title-main">链通全球</text>
|
||||
</view>
|
||||
<text class="hero-subtitle">从定制设计到生产发货如此简单</text>
|
||||
<view class="hero-tags">
|
||||
<view class="hero-tag">0库存</view>
|
||||
<view class="hero-tag">1件起订</view>
|
||||
<view class="hero-tag">全球配送</view>
|
||||
</view>
|
||||
<view class="hero-cta" @tap="goProducts">
|
||||
<text>免费开始</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 3D插画区域 -->
|
||||
<view class="hero-illustration">
|
||||
<view class="hero-illust-item hero-illist-tshirt">
|
||||
<view class="illust-placeholder tshirt"></view>
|
||||
</view>
|
||||
<view class="hero-illust-item hero-illist-bag">
|
||||
<view class="illust-placeholder bag"></view>
|
||||
</view>
|
||||
<view class="hero-illust-item hero-illist-box">
|
||||
<view class="illust-placeholder box"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 信任指标 -->
|
||||
<view class="trust-section">
|
||||
<text class="section-title-small">全球5000+卖家信赖我们的平台</text>
|
||||
<view class="trust-grid">
|
||||
<view class="trust-card">
|
||||
<text class="trust-number">1000万+</text>
|
||||
<text class="trust-label">订单履约</text>
|
||||
</view>
|
||||
<view class="trust-card">
|
||||
<text class="trust-number">20+</text>
|
||||
<text class="trust-label">国家覆盖</text>
|
||||
</view>
|
||||
<view class="trust-card">
|
||||
<text class="trust-number">500+</text>
|
||||
<text class="trust-label">合作工厂</text>
|
||||
</view>
|
||||
<view class="trust-card">
|
||||
<text class="trust-number">24H</text>
|
||||
<text class="trust-label">极速发货</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 4步流程 -->
|
||||
<view class="steps-section">
|
||||
<text class="section-title">4步开始你的按需定制生意</text>
|
||||
<view class="steps-list">
|
||||
<view :class="'step-item ' + (currentStep === 1 ? 'active' : '')" @tap="selectStep" data-step="1">
|
||||
<view class="step-number">01</view>
|
||||
<view class="step-info">
|
||||
<text class="step-title">选择产品</text>
|
||||
<text class="step-desc">从全球POD货盘中选择热销产品</text>
|
||||
</view>
|
||||
</view>
|
||||
<view :class="'step-item ' + (currentStep === 2 ? 'active' : '')" @tap="selectStep" data-step="2">
|
||||
<view class="step-number">02</view>
|
||||
<view class="step-info">
|
||||
<text class="step-title">上传设计</text>
|
||||
<text class="step-desc">使用在线设计工具创建专属图案</text>
|
||||
</view>
|
||||
</view>
|
||||
<view :class="'step-item ' + (currentStep === 3 ? 'active' : '')" @tap="selectStep" data-step="3">
|
||||
<view class="step-number">03</view>
|
||||
<view class="step-info">
|
||||
<text class="step-title">在线销售</text>
|
||||
<text class="step-desc">一键上架到Shopify等电商平台</text>
|
||||
</view>
|
||||
</view>
|
||||
<view :class="'step-item ' + (currentStep === 4 ? 'active' : '')" @tap="selectStep" data-step="4">
|
||||
<view class="step-number">04</view>
|
||||
<view class="step-info">
|
||||
<text class="step-title">生产配送</text>
|
||||
<text class="step-desc">自动生产全球发货履约无忧</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="step-visual">
|
||||
<view class="step-visual-card">
|
||||
<view :class="'step-visual-icon step-icon-' + currentStep">
|
||||
<text class="step-visual-emoji">{{ stepEmoji }}</text>
|
||||
</view>
|
||||
<text class="step-visual-text">{{ stepDesc }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 全球POD货盘 -->
|
||||
<view class="catalog-section">
|
||||
<text class="section-title">全球POD货盘</text>
|
||||
<text class="section-subtitle">多元化产品选择,满足场景化需求</text>
|
||||
<scroll-view class="category-tabs" :scroll-x="true" :enhanced="true" :show-scrollbar="false">
|
||||
<view :class="'cat-tab ' + (activeCategory === item.id ? 'active' : '')" @tap="selectCategory" :data-id="item.id" v-for="(item, index) in categories" :key="index">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="product-preview-grid">
|
||||
<view class="product-preview-card" @tap="goProductDetail" :data-id="item.id" v-for="(item, index) in previewProducts" :key="index">
|
||||
<view class="product-preview-img" :style="'background: ' + item.color + ';'">
|
||||
<text class="product-preview-emoji">{{ item.emoji }}</text>
|
||||
</view>
|
||||
|
||||
<view class="product-preview-info">
|
||||
<text class="product-preview-name">{{ item.name }}</text>
|
||||
<text class="product-preview-price">¥{{ item.price }}起</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="see-more" @tap="goProducts">
|
||||
<text>查看更多产品</text>
|
||||
<text class="arrow">></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 平台功能 -->
|
||||
<view class="features-section">
|
||||
<text class="section-title">用强大功能,开启盈利快车道</text>
|
||||
<view class="features-grid">
|
||||
<view class="feature-card" v-for="(item, index) in features" :key="index">
|
||||
<view class="feature-icon" :style="'background: ' + item.bgColor + ';'">
|
||||
<text class="feature-emoji">{{ item.emoji }}</text>
|
||||
</view>
|
||||
|
||||
<text class="feature-title">{{ item.title }}</text>
|
||||
|
||||
<text class="feature-desc">{{ item.desc }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 为什么选择 -->
|
||||
<view class="why-section">
|
||||
<text class="section-title">为什么选择Inkreach?</text>
|
||||
<view class="why-grid">
|
||||
<view class="why-card" v-for="(item, index) in reasons" :key="index">
|
||||
<view class="why-icon">
|
||||
<text class="why-emoji">{{ item.emoji }}</text>
|
||||
</view>
|
||||
|
||||
<text class="why-title">{{ item.title }}</text>
|
||||
|
||||
<text class="why-desc">{{ item.desc }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 公司简介 -->
|
||||
<view class="company-section">
|
||||
<text class="section-title">公司简介</text>
|
||||
<view class="company-card">
|
||||
<view class="company-headline">
|
||||
<text>用科技重新定义服装供应链</text>
|
||||
<text>让每一个创意,都能高效抵达全球</text>
|
||||
</view>
|
||||
<view class="company-content">
|
||||
<view class="company-block">
|
||||
<text class="company-block-title">服务对象与场景</text>
|
||||
<text class="company-block-text">
|
||||
服务于数千家跨境独立站、TikTok、TEMU、SHEIN等平台商家,提供从海外生产到末端物流的一站式供应链服务,让电商创业者专注增长,无惧后端履约。
|
||||
</text>
|
||||
</view>
|
||||
<view class="company-block">
|
||||
<text class="company-block-title">愿景</text>
|
||||
<text class="company-block-text">
|
||||
我们坚信,每一个创意都值得被完美呈现。INKREACH将持续深耕智能供应链生态,用科技消除制造壁垒,让全球创业者专注发挥创造力。
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="company-stats">
|
||||
<view class="company-stat" v-for="(item, index) in companyStats" :key="index">
|
||||
<text class="company-stat-number">{{ item.value }}</text>
|
||||
|
||||
<text class="company-stat-label">{{ item.label }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 用户案例 -->
|
||||
<view class="cases-section">
|
||||
<text class="section-title">用户案例</text>
|
||||
<scroll-view class="cases-scroll" :scroll-x="true" :enhanced="true" :show-scrollbar="false">
|
||||
<view class="case-card" v-for="(item, index) in cases" :key="index">
|
||||
<view class="case-image" :style="'background: ' + item.bgColor + ';'">
|
||||
<text class="case-emoji">{{ item.emoji }}</text>
|
||||
</view>
|
||||
|
||||
<view class="case-info">
|
||||
<text class="case-title">{{ item.title }}</text>
|
||||
<view class="case-tags">
|
||||
<view class="case-tag" v-for="(tag, index1) in item.tags" :key="index1">{{ tag }}</view>
|
||||
</view>
|
||||
<view class="case-metrics">
|
||||
<view class="case-metric">
|
||||
<text class="case-metric-value">{{ item.roi }}</text>
|
||||
<text class="case-metric-label">ROI</text>
|
||||
</view>
|
||||
<view class="case-metric">
|
||||
<text class="case-metric-value">{{ item.revenue }}</text>
|
||||
<text class="case-metric-label">月收入</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 最终CTA -->
|
||||
<view class="cta-section">
|
||||
<view class="cta-bg"></view>
|
||||
<view class="cta-content">
|
||||
<view class="cta-title">
|
||||
<text>开始你的POD生意</text>
|
||||
<text>现在就行动</text>
|
||||
</view>
|
||||
<text class="cta-desc">加入成千上万的成功卖家,开始你的定制商品生意</text>
|
||||
<view class="cta-input-wrap">
|
||||
<input class="cta-input" placeholder="输入邮箱开始免费试用" placeholder-class="cta-placeholder" />
|
||||
<view class="cta-btn" @tap="goProducts">立即注册</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部 -->
|
||||
<view class="footer">
|
||||
<view class="footer-top">
|
||||
<view class="footer-logo">
|
||||
<text class="footer-logo-en">inkreach</text>
|
||||
<text class="footer-logo-cn">印美达</text>
|
||||
</view>
|
||||
<text class="footer-slogan">全球POD定制平台,服务中国卖家出海</text>
|
||||
</view>
|
||||
<view class="footer-links">
|
||||
<view class="footer-col">
|
||||
<text class="footer-col-title">产品</text>
|
||||
<text class="footer-link">定制卫衣</text>
|
||||
<text class="footer-link">定制T恤</text>
|
||||
<text class="footer-link">定制包包</text>
|
||||
</view>
|
||||
<view class="footer-col">
|
||||
<text class="footer-col-title">支持</text>
|
||||
<text class="footer-link">物流说明</text>
|
||||
<text class="footer-link">客服帮助</text>
|
||||
<text class="footer-link">售后客服</text>
|
||||
</view>
|
||||
<view class="footer-col">
|
||||
<text class="footer-col-title">联系</text>
|
||||
<text class="footer-link">联系我们</text>
|
||||
<text class="footer-link">官方公众号</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer-bottom">
|
||||
<text class="footer-copyright">© 2026 INKREACH 印美达全球 All Rights Reserved</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight: 20,
|
||||
currentStep: 2,
|
||||
stepEmoji: '🎨',
|
||||
stepDesc: '使用在线设计工具创建你的专属图案,支持上传图片、添加文字、智能排版',
|
||||
activeCategory: 'all',
|
||||
|
||||
categories: [
|
||||
{
|
||||
id: 'all',
|
||||
name: '全部'
|
||||
},
|
||||
{
|
||||
id: 'tshirt',
|
||||
name: 'T恤'
|
||||
},
|
||||
{
|
||||
id: 'hoodie',
|
||||
name: '卫衣'
|
||||
},
|
||||
{
|
||||
id: 'bag',
|
||||
name: '包包'
|
||||
},
|
||||
{
|
||||
id: 'kids',
|
||||
name: '童装'
|
||||
},
|
||||
{
|
||||
id: 'home',
|
||||
name: '家居'
|
||||
}
|
||||
],
|
||||
|
||||
previewProducts: [
|
||||
{
|
||||
id: 1,
|
||||
name: '180G牛奶丝T恤 DG120',
|
||||
price: '28.00',
|
||||
color: '#F5F5F5',
|
||||
emoji: '👕'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '纯棉连帽卫衣 HD200',
|
||||
price: '59.00',
|
||||
color: '#E8E8E8',
|
||||
emoji: '🧥'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '帆布托特包 BG150',
|
||||
price: '15.00',
|
||||
color: '#F0F0F0',
|
||||
emoji: '👜'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '儿童纯棉T恤 KD100',
|
||||
price: '22.00',
|
||||
color: '#F8F8F8',
|
||||
emoji: '👶'
|
||||
}
|
||||
],
|
||||
|
||||
features: [
|
||||
{
|
||||
id: 1,
|
||||
title: '设计工具',
|
||||
desc: '在线设计器,海量模板自由创作',
|
||||
emoji: '🎨',
|
||||
bgColor: '#FFF0E5'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: '自动化履约',
|
||||
desc: '订单自动分配工厂生产发货',
|
||||
emoji: '⚙️',
|
||||
bgColor: '#E5F5FF'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: '全球配送',
|
||||
desc: '覆盖200+国家地区快速达',
|
||||
emoji: '🌍',
|
||||
bgColor: '#F0FFE5'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
title: '店铺集成',
|
||||
desc: '对接Shopify等主流平台',
|
||||
emoji: '🔗',
|
||||
bgColor: '#FFF5E5'
|
||||
}
|
||||
],
|
||||
|
||||
reasons: [
|
||||
{
|
||||
id: 1,
|
||||
title: '零库存',
|
||||
desc: '无需囤货按需生产',
|
||||
emoji: '📦'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: '快速生产',
|
||||
desc: '48小时极速出货',
|
||||
emoji: '⚡'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: '优质产品',
|
||||
desc: '严格品质管控',
|
||||
emoji: '✨'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
title: '全球配送',
|
||||
desc: '覆盖200+国家',
|
||||
emoji: '🚀'
|
||||
}
|
||||
],
|
||||
|
||||
companyStats: [
|
||||
{
|
||||
value: '5000+',
|
||||
label: '合作卖家'
|
||||
},
|
||||
{
|
||||
value: '500+',
|
||||
label: '合作工厂'
|
||||
},
|
||||
{
|
||||
value: '20+',
|
||||
label: '覆盖国家'
|
||||
},
|
||||
{
|
||||
value: '1000万+',
|
||||
label: '订单履约'
|
||||
}
|
||||
],
|
||||
|
||||
cases: [
|
||||
{
|
||||
id: 1,
|
||||
title: '潮牌T恤定制',
|
||||
tags: ['T恤', '烫画'],
|
||||
roi: '260%',
|
||||
revenue: '$12K',
|
||||
bgColor: '#F5F5F5',
|
||||
emoji: '👕'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: '连帽卫衣品牌',
|
||||
tags: ['卫衣', '刺绣'],
|
||||
roi: '300%',
|
||||
revenue: '$25K',
|
||||
bgColor: '#E8E8E8',
|
||||
emoji: '🧥'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: '环保帆布包',
|
||||
tags: ['包包', '丝印'],
|
||||
roi: '180%',
|
||||
revenue: '$8K',
|
||||
bgColor: '#F0F0F0',
|
||||
emoji: '👜'
|
||||
}
|
||||
],
|
||||
|
||||
tag: ''
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
const app = getApp();
|
||||
this.setData({
|
||||
statusBarHeight: app.globalData.statusBarHeight || 20
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
selectStep(e) {
|
||||
const step = e.currentTarget.dataset.step;
|
||||
const stepData = {
|
||||
1: {
|
||||
emoji: '📦',
|
||||
desc: '从全球POD货盘中选择热销产品,涵盖服装、配饰、家居等多品类'
|
||||
},
|
||||
2: {
|
||||
emoji: '🎨',
|
||||
desc: '使用在线设计工具创建你的专属图案,支持上传图片、添加文字、智能排版'
|
||||
},
|
||||
3: {
|
||||
emoji: '🛒',
|
||||
desc: '一键发布到Shopify、TikTok Shop等主流电商平台,自动同步商品信息'
|
||||
},
|
||||
4: {
|
||||
emoji: '🚚',
|
||||
desc: '订单自动分配至最近工厂生产,全球物流配送直达消费者手中'
|
||||
}
|
||||
};
|
||||
this.setData({
|
||||
currentStep: step,
|
||||
stepEmoji: stepData[step].emoji,
|
||||
stepDesc: stepData[step].desc
|
||||
});
|
||||
},
|
||||
|
||||
selectCategory(e) {
|
||||
this.setData({
|
||||
activeCategory: e.currentTarget.dataset.id
|
||||
});
|
||||
},
|
||||
|
||||
goProducts() {
|
||||
uni.switchTab({
|
||||
url: '/pages/products/products'
|
||||
});
|
||||
},
|
||||
|
||||
goHome() {
|
||||
uni.pageScrollTo({
|
||||
scrollTop: 0,
|
||||
duration: 300
|
||||
});
|
||||
},
|
||||
|
||||
goProductDetail(e) {
|
||||
const id = e.currentTarget.dataset.id;
|
||||
uni.navigateTo({
|
||||
url: `/pages/product-detail/product-detail?id=${id}`
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './index.css';
|
||||
</style>
|
||||
@@ -0,0 +1,327 @@
|
||||
/* 产品详情页样式 */
|
||||
.detail-page {
|
||||
min-height: 100vh;
|
||||
background: #f5f5f5;
|
||||
padding-bottom: 140rpx;
|
||||
}
|
||||
|
||||
/* 图片区 */
|
||||
.detail-images {
|
||||
position: relative;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.detail-swiper {
|
||||
width: 100%;
|
||||
height: 750rpx;
|
||||
}
|
||||
|
||||
.swiper-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.swiper-emoji {
|
||||
font-size: 160rpx;
|
||||
}
|
||||
|
||||
.detail-badges {
|
||||
position: absolute;
|
||||
top: 24rpx;
|
||||
left: 24rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8rpx;
|
||||
}
|
||||
|
||||
.detail-badge {
|
||||
font-size: 20rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
|
||||
/* 产品信息 */
|
||||
.detail-info-section {
|
||||
background: #ffffff;
|
||||
padding: 32rpx 24rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.detail-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8rpx;
|
||||
}
|
||||
|
||||
.detail-name {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.detail-code {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.detail-price-row {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 8rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.detail-price {
|
||||
font-size: 48rpx;
|
||||
font-weight: 700;
|
||||
color: #ff6800;
|
||||
}
|
||||
|
||||
.detail-price-unit {
|
||||
font-size: 24rpx;
|
||||
color: #ff6800;
|
||||
}
|
||||
|
||||
.detail-price-original {
|
||||
font-size: 24rpx;
|
||||
color: #ccc;
|
||||
text-decoration: line-through;
|
||||
margin-left: 12rpx;
|
||||
}
|
||||
|
||||
.detail-meta {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 32rpx;
|
||||
padding-top: 24rpx;
|
||||
border-top: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.meta-item {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.meta-label {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
display: block;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.meta-value {
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* 通用section */
|
||||
.detail-section {
|
||||
background: #ffffff;
|
||||
padding: 32rpx 24rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.section-label {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
display: block;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
/* 颜色选择 */
|
||||
.color-options {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.color-option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
padding: 12rpx 20rpx;
|
||||
border-radius: 32rpx;
|
||||
border: 2rpx solid #eee;
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.color-option.selected {
|
||||
border-color: #ff6800;
|
||||
background: #fff0e5;
|
||||
}
|
||||
|
||||
.color-dot {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid #fff;
|
||||
box-shadow: 0 0 0 1rpx rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.color-name {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.color-option.selected .color-name {
|
||||
color: #ff6800;
|
||||
}
|
||||
|
||||
/* 尺码选择 */
|
||||
.size-options {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.size-option {
|
||||
min-width: 72rpx;
|
||||
text-align: center;
|
||||
padding: 16rpx 24rpx;
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
background: #f5f5f5;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid transparent;
|
||||
}
|
||||
|
||||
.size-option.selected {
|
||||
background: #fff0e5;
|
||||
color: #ff6800;
|
||||
border-color: #ff6800;
|
||||
}
|
||||
|
||||
/* 参数表 */
|
||||
.params-table {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.param-row {
|
||||
display: flex;
|
||||
padding: 16rpx 0;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
}
|
||||
|
||||
.param-label {
|
||||
width: 200rpx;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.param-value {
|
||||
flex: 1;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* 工艺说明 */
|
||||
.craft-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.craft-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
padding: 20rpx;
|
||||
background: #fafafa;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.craft-icon {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.craft-emoji {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.craft-name {
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
flex-shrink: 0;
|
||||
width: 120rpx;
|
||||
}
|
||||
|
||||
.craft-desc {
|
||||
flex: 1;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* 底部操作栏 */
|
||||
.detail-bottom-bar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 120rpx;
|
||||
background: #ffffff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 24rpx;
|
||||
gap: 16rpx;
|
||||
box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.06);
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.bottom-btn-icon {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4rpx;
|
||||
width: 80rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.bottom-icon {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.bottom-icon-text {
|
||||
font-size: 18rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.bottom-btn-cart {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #fff0e5;
|
||||
color: #ff6800;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
|
||||
.bottom-btn-design {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #ff6800;
|
||||
color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
@@ -0,0 +1,303 @@
|
||||
<template>
|
||||
<!-- 产品详情页 -->
|
||||
<view class="detail-page">
|
||||
<!-- 产品图片区 -->
|
||||
<view class="detail-images">
|
||||
<swiper class="detail-swiper" :indicator-dots="true" indicator-color="rgba(255,255,255,0.4)" indicator-active-color="#FF6800" :circular="true">
|
||||
<swiper-item v-for="(item, index) in productImages" :key="index">
|
||||
<view class="swiper-img" :style="'background: ' + item.bg + ';'">
|
||||
<text class="swiper-emoji">{{ item.emoji }}</text>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="detail-badges">
|
||||
<view class="detail-badge" :style="'background: ' + item.bg + '; color: ' + item.color + ';'" v-for="(item, index) in productTags" :key="index">
|
||||
{{ item.text }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 产品信息 -->
|
||||
<view class="detail-info-section">
|
||||
<view class="detail-header">
|
||||
<text class="detail-name">{{ product.name }}</text>
|
||||
<text class="detail-code">SKU: {{ product.code }}</text>
|
||||
</view>
|
||||
<view class="detail-price-row">
|
||||
<text class="detail-price">¥{{ product.price }}</text>
|
||||
<text class="detail-price-unit">起</text>
|
||||
<text class="detail-price-original" v-if="product.originalPrice">¥{{ product.originalPrice }}</text>
|
||||
</view>
|
||||
<view class="detail-meta">
|
||||
<view class="meta-item">
|
||||
<text class="meta-label">起订量</text>
|
||||
<text class="meta-value">{{ product.moq }}件</text>
|
||||
</view>
|
||||
<view class="meta-item">
|
||||
<text class="meta-label">生产周期</text>
|
||||
<text class="meta-value">{{ product.leadTime }}</text>
|
||||
</view>
|
||||
<view class="meta-item">
|
||||
<text class="meta-label">工艺</text>
|
||||
<text class="meta-value">{{ product.craft }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 颜色选择 -->
|
||||
<view class="detail-section">
|
||||
<text class="section-label">颜色选择</text>
|
||||
<view class="color-options">
|
||||
<view :class="'color-option ' + (selectedColor === index ? 'selected' : '')" @tap="selectColor" :data-index="index" v-for="(item, index) in colors" :key="index">
|
||||
<view class="color-dot" :style="'background: ' + item.value + ';'"></view>
|
||||
|
||||
<text class="color-name">{{ item.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 尺码选择 -->
|
||||
<view class="detail-section">
|
||||
<text class="section-label">尺码选择</text>
|
||||
<view class="size-options">
|
||||
<view :class="'size-option ' + (selectedSize === item ? 'selected' : '')" @tap="selectSize" :data-size="item" v-for="(item, index) in sizes" :key="index">
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 产品详情 -->
|
||||
<view class="detail-section">
|
||||
<text class="section-label">产品参数</text>
|
||||
<view class="params-table">
|
||||
<view class="param-row" v-for="(item, index) in productParams" :key="index">
|
||||
<text class="param-label">{{ item.label }}</text>
|
||||
|
||||
<text class="param-value">{{ item.value }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 工艺说明 -->
|
||||
<view class="detail-section">
|
||||
<text class="section-label">工艺说明</text>
|
||||
<view class="craft-info">
|
||||
<view class="craft-card" v-for="(item, index) in crafts" :key="index">
|
||||
<view class="craft-icon" :style="'background: ' + item.bg + ';'">
|
||||
<text class="craft-emoji">{{ item.emoji }}</text>
|
||||
</view>
|
||||
|
||||
<text class="craft-name">{{ item.name }}</text>
|
||||
|
||||
<text class="craft-desc">{{ item.desc }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部操作栏 -->
|
||||
<view class="detail-bottom-bar safe-bottom">
|
||||
<view class="bottom-btn-icon" @tap="toggleFav">
|
||||
<text class="bottom-icon">{{ isFav ? '❤️' : '🤍' }}</text>
|
||||
<text class="bottom-icon-text">收藏</text>
|
||||
</view>
|
||||
<view class="bottom-btn-icon" @tap="contactService">
|
||||
<text class="bottom-icon">💬</text>
|
||||
<text class="bottom-icon-text">客服</text>
|
||||
</view>
|
||||
<view class="bottom-btn-cart" @tap="addToCart">
|
||||
<text>加入清单</text>
|
||||
</view>
|
||||
<view class="bottom-btn-design" @tap="startDesign">
|
||||
<text>立即定制</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
productId: null,
|
||||
product: {
|
||||
name: '180G牛奶丝T恤 DG120',
|
||||
code: 'DG120',
|
||||
price: '28.00',
|
||||
originalPrice: '35.00',
|
||||
moq: 1,
|
||||
leadTime: '48小时',
|
||||
craft: '烫画/数码直喷'
|
||||
},
|
||||
productImages: [
|
||||
{
|
||||
bg: '#F5F5F5',
|
||||
emoji: '👕'
|
||||
},
|
||||
{
|
||||
bg: '#E8E8E8',
|
||||
emoji: '👕'
|
||||
},
|
||||
{
|
||||
bg: '#F0F0F0',
|
||||
emoji: '👕'
|
||||
}
|
||||
],
|
||||
productTags: [
|
||||
{
|
||||
text: '可定制',
|
||||
bg: '#FFF0E5',
|
||||
color: '#FF6800'
|
||||
},
|
||||
{
|
||||
text: '现货',
|
||||
bg: '#E5F5FF',
|
||||
color: '#1890FF'
|
||||
},
|
||||
{
|
||||
text: '快返',
|
||||
bg: '#F0FFE5',
|
||||
color: '#52C41A'
|
||||
}
|
||||
],
|
||||
colors: [
|
||||
{
|
||||
name: '白色',
|
||||
value: '#FFFFFF'
|
||||
},
|
||||
{
|
||||
name: '黑色',
|
||||
value: '#1a1a1a'
|
||||
},
|
||||
{
|
||||
name: '灰色',
|
||||
value: '#999999'
|
||||
},
|
||||
{
|
||||
name: '橙色',
|
||||
value: '#FF6800'
|
||||
},
|
||||
{
|
||||
name: '藏青',
|
||||
value: '#1B365D'
|
||||
},
|
||||
{
|
||||
name: '军绿',
|
||||
value: '#4A5D23'
|
||||
}
|
||||
],
|
||||
selectedColor: 0,
|
||||
sizes: ['XS', 'S', 'M', 'L', 'XL', '2XL', '3XL'],
|
||||
selectedSize: 'M',
|
||||
productParams: [
|
||||
{
|
||||
label: '克重',
|
||||
value: '180g'
|
||||
},
|
||||
{
|
||||
label: '材质',
|
||||
value: '牛奶丝(改性聚酯纤维)'
|
||||
},
|
||||
{
|
||||
label: '版型',
|
||||
value: '常规版'
|
||||
},
|
||||
{
|
||||
label: '领型',
|
||||
value: '圆领'
|
||||
},
|
||||
{
|
||||
label: '袖型',
|
||||
value: '短袖'
|
||||
},
|
||||
{
|
||||
label: '适用工艺',
|
||||
value: '烫画、数码直喷、刺绣'
|
||||
},
|
||||
{
|
||||
label: '可售区域',
|
||||
value: '全球'
|
||||
},
|
||||
{
|
||||
label: '洗涤说明',
|
||||
value: '冷水机洗,不可漂白'
|
||||
}
|
||||
],
|
||||
crafts: [
|
||||
{
|
||||
name: '烫画',
|
||||
desc: '色彩鲜艳,适合复杂图案,成本低',
|
||||
emoji: '🎨',
|
||||
bg: '#FFF0E5'
|
||||
},
|
||||
{
|
||||
name: '数码直喷',
|
||||
desc: '触感柔软,透气性好,适合大面积印花',
|
||||
emoji: '🖨️',
|
||||
bg: '#E5F5FF'
|
||||
},
|
||||
{
|
||||
name: '刺绣',
|
||||
desc: '质感高级,经久耐用,适合logo',
|
||||
emoji: '🪡',
|
||||
bg: '#F0FFE5'
|
||||
}
|
||||
],
|
||||
isFav: false
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.id) {
|
||||
this.setData({
|
||||
productId: options.id
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectColor(e) {
|
||||
this.setData({
|
||||
selectedColor: e.currentTarget.dataset.index
|
||||
});
|
||||
},
|
||||
|
||||
selectSize(e) {
|
||||
this.setData({
|
||||
selectedSize: e.currentTarget.dataset.size
|
||||
});
|
||||
},
|
||||
|
||||
toggleFav() {
|
||||
this.setData({
|
||||
isFav: !this.isFav
|
||||
});
|
||||
uni.showToast({
|
||||
title: this.isFav ? '已收藏' : '已取消',
|
||||
icon: 'none'
|
||||
});
|
||||
},
|
||||
|
||||
contactService() {
|
||||
uni.showToast({
|
||||
title: '客服功能开发中',
|
||||
icon: 'none'
|
||||
});
|
||||
},
|
||||
|
||||
addToCart() {
|
||||
uni.showToast({
|
||||
title: '已加入清单',
|
||||
icon: 'success'
|
||||
});
|
||||
},
|
||||
|
||||
startDesign() {
|
||||
uni.showToast({
|
||||
title: '定制功能开发中',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './product-detail.css';
|
||||
</style>
|
||||
@@ -0,0 +1,500 @@
|
||||
/* 产品列表页样式 */
|
||||
|
||||
.products-page {
|
||||
min-height: 100vh;
|
||||
background: #f5f5f5;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* 搜索栏 */
|
||||
.search-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.search-input-wrap {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #f5f5f5;
|
||||
border-radius: 32rpx;
|
||||
padding: 0 24rpx;
|
||||
height: 64rpx;
|
||||
}
|
||||
|
||||
.search-icon {
|
||||
font-size: 28rpx;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
flex: 1;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.search-placeholder {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.filter-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4rpx;
|
||||
padding: 0 16rpx;
|
||||
}
|
||||
|
||||
.filter-icon {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.filter-text {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* 国家选择条 */
|
||||
.country-bar {
|
||||
white-space: nowrap;
|
||||
background: #ffffff;
|
||||
padding: 16rpx 24rpx;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
}
|
||||
|
||||
.country-item {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
padding: 8rpx 20rpx;
|
||||
margin-right: 12rpx;
|
||||
border-radius: 24rpx;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.country-item.active {
|
||||
background: #fff0e5;
|
||||
}
|
||||
|
||||
.country-flag {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.country-name {
|
||||
font-size: 22rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.country-item.active .country-name {
|
||||
color: #ff6800;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* 已选筛选标签 */
|
||||
.active-filters {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
background: #ffffff;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.active-filter-tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
background: #f2f2f2;
|
||||
border-radius: 8rpx;
|
||||
padding: 6rpx 16rpx;
|
||||
font-size: 22rpx;
|
||||
color: #666;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.filter-remove {
|
||||
font-size: 20rpx;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.clear-all {
|
||||
font-size: 22rpx;
|
||||
color: #ff6800;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* 主体内容 */
|
||||
.content-body {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 左侧分类侧边栏 */
|
||||
.sidebar {
|
||||
width: 180rpx;
|
||||
background: #ffffff;
|
||||
border-right: 1rpx solid #eee;
|
||||
height: 100%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sidebar-item {
|
||||
position: relative;
|
||||
padding: 28rpx 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sidebar-item.active {
|
||||
background: #f5f5f5;
|
||||
color: #ff6800;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.sidebar-indicator {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 6rpx;
|
||||
height: 32rpx;
|
||||
background: #ff6800;
|
||||
border-radius: 0 4rpx 4rpx 0;
|
||||
}
|
||||
|
||||
.sidebar-promo {
|
||||
margin: 24rpx 16rpx;
|
||||
padding: 20rpx 12rpx;
|
||||
background: linear-gradient(135deg, #ff6800 0%, #ff8c40 100%);
|
||||
border-radius: 12rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.promo-title {
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
color: #fff;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.promo-desc {
|
||||
font-size: 20rpx;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
display: block;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
/* 右侧产品列表区 */
|
||||
.product-list-area {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 子分类 */
|
||||
.sub-categories {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12rpx;
|
||||
padding: 16rpx 20rpx;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.sub-cat-item {
|
||||
font-size: 22rpx;
|
||||
padding: 8rpx 20rpx;
|
||||
border-radius: 24rpx;
|
||||
background: #f5f5f5;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.sub-cat-item.active {
|
||||
background: #ff6800;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* 产品网格 */
|
||||
.product-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 16rpx;
|
||||
padding: 16rpx 20rpx;
|
||||
}
|
||||
|
||||
.product-card {
|
||||
width: calc(50% - 8rpx);
|
||||
background: #ffffff;
|
||||
border-radius: 12rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.product-img {
|
||||
width: 100%;
|
||||
height: 300rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.product-emoji {
|
||||
font-size: 80rpx;
|
||||
}
|
||||
|
||||
.product-badges {
|
||||
position: absolute;
|
||||
top: 12rpx;
|
||||
left: 12rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4rpx;
|
||||
}
|
||||
|
||||
.product-badge {
|
||||
font-size: 18rpx;
|
||||
padding: 2rpx 8rpx;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.product-info {
|
||||
padding: 16rpx;
|
||||
}
|
||||
|
||||
.product-name {
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.product-bottom {
|
||||
margin-top: 8rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.product-price {
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
color: #ff6800;
|
||||
}
|
||||
|
||||
.product-price-unit {
|
||||
font-size: 20rpx;
|
||||
font-weight: 400;
|
||||
margin-left: 2rpx;
|
||||
}
|
||||
|
||||
/* 分页 */
|
||||
.pagination {
|
||||
padding: 24rpx 20rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.page-info {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
display: block;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.page-controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8rpx;
|
||||
}
|
||||
|
||||
.page-btn {
|
||||
padding: 8rpx 20rpx;
|
||||
font-size: 22rpx;
|
||||
color: #666;
|
||||
background: #fff;
|
||||
border-radius: 8rpx;
|
||||
border: 1rpx solid #eee;
|
||||
}
|
||||
|
||||
.page-btn.disabled {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.page-num {
|
||||
min-width: 48rpx;
|
||||
height: 48rpx;
|
||||
line-height: 48rpx;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
background: #fff;
|
||||
border-radius: 8rpx;
|
||||
border: 1rpx solid #eee;
|
||||
}
|
||||
|
||||
.page-num.active {
|
||||
background: #ff6800;
|
||||
color: #fff;
|
||||
border-color: #ff6800;
|
||||
}
|
||||
|
||||
.page-size {
|
||||
margin-top: 12rpx;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.loading-more {
|
||||
padding: 24rpx;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* 筛选弹窗 */
|
||||
.filter-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
z-index: 1000;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.filter-overlay.show {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.filter-drawer {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 80%;
|
||||
height: 100%;
|
||||
background: #ffffff;
|
||||
z-index: 1001;
|
||||
transform: translateX(100%);
|
||||
transition: transform 0.3s;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.filter-drawer.show {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
.filter-drawer-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 32rpx 24rpx;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
}
|
||||
|
||||
.filter-drawer-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.filter-drawer-close {
|
||||
font-size: 32rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.filter-drawer-body {
|
||||
flex: 1;
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.filter-group {
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.filter-group-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
display: block;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.filter-options {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.filter-option {
|
||||
padding: 12rpx 24rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
background: #f5f5f5;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid transparent;
|
||||
}
|
||||
|
||||
.filter-option.selected {
|
||||
background: #fff0e5;
|
||||
color: #ff6800;
|
||||
border-color: #ff6800;
|
||||
}
|
||||
|
||||
.filter-price-range {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.price-input {
|
||||
flex: 1;
|
||||
height: 64rpx;
|
||||
background: #f5f5f5;
|
||||
border-radius: 8rpx;
|
||||
padding: 0 20rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.price-divider {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.filter-drawer-footer {
|
||||
display: flex;
|
||||
gap: 16rpx;
|
||||
padding: 24rpx;
|
||||
border-top: 1rpx solid #eee;
|
||||
}
|
||||
|
||||
.filter-reset {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
background: #f5f5f5;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.filter-confirm {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 24rpx;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
background: #ff6800;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
@@ -0,0 +1,760 @@
|
||||
<template>
|
||||
<!-- 产品列表页 - 印美达 Inkreach -->
|
||||
<view class="products-page">
|
||||
<!-- 搜索栏 -->
|
||||
<view class="search-bar">
|
||||
<view class="search-input-wrap">
|
||||
<text class="search-icon">🔍</text>
|
||||
<input class="search-input" placeholder="搜索商品" placeholder-class="search-placeholder" @input="onSearchInput" :value="searchKeyword" />
|
||||
</view>
|
||||
<view class="filter-btn" @tap="toggleFilter">
|
||||
<text class="filter-icon">⚙</text>
|
||||
<text class="filter-text">筛选</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 国家选择条 -->
|
||||
<scroll-view class="country-bar" :scroll-x="true" :enhanced="true" :show-scrollbar="false">
|
||||
<view :class="'country-item ' + (selectedCountry === item.id ? 'active' : '')" @tap="selectCountry" :data-id="item.id" v-for="(item, index) in countries" :key="index">
|
||||
<text class="country-flag">{{ item.flag }}</text>
|
||||
|
||||
<text class="country-name">{{ item.name }}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 已选筛选标签 -->
|
||||
<view class="active-filters" v-if="activeFilters.length > 0">
|
||||
<view class="active-filter-tag" v-for="(item, index) in activeFilters" :key="index">
|
||||
<text>{{ item.label }}</text>
|
||||
|
||||
<text class="filter-remove" @tap="removeFilter" :data-key="item.key">✕</text>
|
||||
</view>
|
||||
<view class="clear-all" @tap="clearAllFilters">清除全部</view>
|
||||
</view>
|
||||
|
||||
<!-- 主体内容:侧边栏 + 产品列表 -->
|
||||
<view class="content-body">
|
||||
<!-- 左侧分类侧边栏 -->
|
||||
<scroll-view class="sidebar" :scroll-y="true">
|
||||
<view
|
||||
:class="'sidebar-item ' + (activeCategory === item.id ? 'active' : '')"
|
||||
@tap="selectCategory"
|
||||
:data-id="item.id"
|
||||
v-for="(item, index) in categories"
|
||||
:key="index"
|
||||
>
|
||||
<view class="sidebar-indicator" v-if="activeCategory === item.id"></view>
|
||||
|
||||
<text>{{ item.name }}</text>
|
||||
</view>
|
||||
<!-- 促销Banner -->
|
||||
<view class="sidebar-promo">
|
||||
<text class="promo-title">0元拿样</text>
|
||||
<text class="promo-desc">全国包邮</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 右侧产品列表 -->
|
||||
<scroll-view class="product-list-area" :scroll-y="true" @scrolltolower="loadMore">
|
||||
<!-- 子分类 -->
|
||||
<view class="sub-categories" v-if="subCategories.length > 0">
|
||||
<view
|
||||
:class="'sub-cat-item ' + (activeSubCategory === item.id ? 'active' : '')"
|
||||
@tap="selectSubCategory"
|
||||
:data-id="item.id"
|
||||
v-for="(item, index) in subCategories"
|
||||
:key="index"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 产品网格 -->
|
||||
<view class="product-grid">
|
||||
<view class="product-card" @tap="goDetail" :data-id="item.id" v-for="(item, index) in products" :key="index">
|
||||
<view class="product-img" :style="'background: ' + item.bgColor + ';'">
|
||||
<text class="product-emoji">{{ item.emoji }}</text>
|
||||
<view class="product-badges">
|
||||
<view class="product-badge" :style="'background: ' + tag.bg + '; color: ' + tag.color + ';'" v-for="(tag, index1) in item.tags" :key="index1">
|
||||
{{ tag.text }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="product-info">
|
||||
<text class="product-name">{{ item.name }}</text>
|
||||
<view class="product-bottom">
|
||||
<text class="product-price">
|
||||
¥{{ item.price }}
|
||||
<text class="product-price-unit">起</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 分页 -->
|
||||
<view class="pagination">
|
||||
<text class="page-info">显示 {{ pagination.start }}-{{ pagination.end }} 共 {{ pagination.total }} 个产品</text>
|
||||
<view class="page-controls">
|
||||
<view :class="'page-btn ' + (pagination.current === 1 ? 'disabled' : '')" @tap="changePage" data-action="prev">上一页</view>
|
||||
<view
|
||||
:class="'page-num ' + (pagination.current === item ? 'active' : '')"
|
||||
@tap="goToPage"
|
||||
:data-page="item"
|
||||
v-for="(item, index) in pageNumbers"
|
||||
:key="index"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
<view :class="'page-btn ' + (pagination.current === pagination.totalPages ? 'disabled' : '')" @tap="changePage" data-action="next">下一页</view>
|
||||
</view>
|
||||
<view class="page-size">
|
||||
<text>{{ pagination.pageSize }}/页</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 加载更多提示 -->
|
||||
<view class="loading-more" v-if="loadingMore">
|
||||
<text>加载中...</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 筛选弹窗 -->
|
||||
<view :class="'filter-overlay ' + (showFilter ? 'show' : '')" @tap="closeFilter"></view>
|
||||
<view :class="'filter-drawer ' + (showFilter ? 'show' : '')">
|
||||
<view class="filter-drawer-header">
|
||||
<text class="filter-drawer-title">筛选条件</text>
|
||||
<text class="filter-drawer-close" @tap="closeFilter">✕</text>
|
||||
</view>
|
||||
<scroll-view class="filter-drawer-body" :scroll-y="true">
|
||||
<!-- 工艺 -->
|
||||
<view class="filter-group">
|
||||
<text class="filter-group-title">工艺</text>
|
||||
<view class="filter-options">
|
||||
<view
|
||||
:class="'filter-option ' + (selectedCrafts.indexOf(item) > -1 ? 'selected' : '')"
|
||||
@tap="toggleCraft"
|
||||
:data-value="item"
|
||||
v-for="(item, index) in craftOptions"
|
||||
:key="index"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 材质 -->
|
||||
<view class="filter-group">
|
||||
<text class="filter-group-title">材质</text>
|
||||
<view class="filter-options">
|
||||
<view
|
||||
:class="'filter-option ' + (selectedMaterials.indexOf(item) > -1 ? 'selected' : '')"
|
||||
@tap="toggleMaterial"
|
||||
:data-value="item"
|
||||
v-for="(item, index) in materialOptions"
|
||||
:key="index"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 价格区间 -->
|
||||
<view class="filter-group">
|
||||
<text class="filter-group-title">价格区间</text>
|
||||
<view class="filter-price-range">
|
||||
<input class="price-input" placeholder="最低价" type="number" />
|
||||
<text class="price-divider">-</text>
|
||||
<input class="price-input" placeholder="最高价" type="number" />
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="filter-drawer-footer">
|
||||
<view class="filter-reset" @tap="resetFilters">重置</view>
|
||||
<view class="filter-confirm" @tap="confirmFilters">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
searchKeyword: '',
|
||||
selectedCountry: 'us',
|
||||
|
||||
countries: [
|
||||
{
|
||||
id: 'us',
|
||||
name: '美国',
|
||||
flag: '🇺🇸'
|
||||
},
|
||||
{
|
||||
id: 'uk',
|
||||
name: '英国',
|
||||
flag: '🇬🇧'
|
||||
},
|
||||
{
|
||||
id: 'jp',
|
||||
name: '日本',
|
||||
flag: '🇯🇵'
|
||||
},
|
||||
{
|
||||
id: 'mx',
|
||||
name: '墨西哥',
|
||||
flag: '🇲🇽'
|
||||
},
|
||||
{
|
||||
id: 'br',
|
||||
name: '巴西',
|
||||
flag: '🇧🇷'
|
||||
},
|
||||
{
|
||||
id: 'ae',
|
||||
name: '中东',
|
||||
flag: '🇦🇪'
|
||||
},
|
||||
{
|
||||
id: 'pl',
|
||||
name: '波兰',
|
||||
flag: '🇵🇱'
|
||||
},
|
||||
{
|
||||
id: 'es',
|
||||
name: '西班牙',
|
||||
flag: '🇪🇸'
|
||||
},
|
||||
{
|
||||
id: 'de',
|
||||
name: '德国',
|
||||
flag: '🇩🇪'
|
||||
},
|
||||
{
|
||||
id: 'it',
|
||||
name: '意大利',
|
||||
flag: '🇮🇹'
|
||||
},
|
||||
{
|
||||
id: 'fr',
|
||||
name: '法国',
|
||||
flag: '🇫🇷'
|
||||
},
|
||||
{
|
||||
id: 'ca',
|
||||
name: '加拿大',
|
||||
flag: '🇨🇦'
|
||||
},
|
||||
{
|
||||
id: 'au',
|
||||
name: '澳大利亚',
|
||||
flag: '🇦🇺'
|
||||
},
|
||||
{
|
||||
id: 'kr',
|
||||
name: '韩国',
|
||||
flag: '🇰🇷'
|
||||
}
|
||||
],
|
||||
|
||||
activeCategory: 'all',
|
||||
|
||||
categories: [
|
||||
{
|
||||
id: 'all',
|
||||
name: '全部商品'
|
||||
},
|
||||
{
|
||||
id: 'men',
|
||||
name: '男士服装'
|
||||
},
|
||||
{
|
||||
id: 'women',
|
||||
name: '女士服装'
|
||||
},
|
||||
{
|
||||
id: 'kids',
|
||||
name: '儿童服装'
|
||||
},
|
||||
{
|
||||
id: 'home',
|
||||
name: '家居配饰'
|
||||
},
|
||||
{
|
||||
id: 'bag',
|
||||
name: '包包配饰'
|
||||
}
|
||||
],
|
||||
|
||||
subCategories: [],
|
||||
activeSubCategory: '',
|
||||
|
||||
activeFilters: [
|
||||
{
|
||||
key: 'country',
|
||||
label: '美国'
|
||||
},
|
||||
{
|
||||
key: 'craft',
|
||||
label: '烫画'
|
||||
},
|
||||
{
|
||||
key: 'material',
|
||||
label: '棉麻'
|
||||
}
|
||||
],
|
||||
|
||||
showFilter: false,
|
||||
selectedCrafts: ['烫画'],
|
||||
selectedMaterials: ['棉麻'],
|
||||
craftOptions: ['烫画', '刺绣', '丝印', '数码直喷', '热转印'],
|
||||
materialOptions: ['棉麻', '纯棉', '涤纶', '混纺', '牛奶丝'],
|
||||
|
||||
pagination: {
|
||||
start: 1,
|
||||
end: 10,
|
||||
total: 96,
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
totalPages: 10
|
||||
},
|
||||
|
||||
pageNumbers: [1, 2, 3, 4, 5],
|
||||
loadingMore: false,
|
||||
|
||||
products: [
|
||||
{
|
||||
id: 1,
|
||||
name: '180G牛奶丝T恤 DG120',
|
||||
price: '28.00',
|
||||
bgColor: '#F5F5F5',
|
||||
emoji: '👕',
|
||||
tags: [
|
||||
{
|
||||
text: '可定制',
|
||||
bg: '#FFF0E5',
|
||||
color: '#FF6800'
|
||||
},
|
||||
{
|
||||
text: '现货',
|
||||
bg: '#E5F5FF',
|
||||
color: '#1890FF'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '纯棉连帽卫衣 HD200',
|
||||
price: '59.00',
|
||||
bgColor: '#E8E8E8',
|
||||
emoji: '🧥',
|
||||
tags: [
|
||||
{
|
||||
text: '可定制',
|
||||
bg: '#FFF0E5',
|
||||
color: '#FF6800'
|
||||
},
|
||||
{
|
||||
text: '快返',
|
||||
bg: '#F0FFE5',
|
||||
color: '#52C41A'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '260G重装T恤 TS260',
|
||||
price: '35.00',
|
||||
bgColor: '#F0F0F0',
|
||||
emoji: '👕',
|
||||
tags: [
|
||||
{
|
||||
text: '可定制',
|
||||
bg: '#FFF0E5',
|
||||
color: '#FF6800'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '精梳棉Polo衫 PL100',
|
||||
price: '45.00',
|
||||
bgColor: '#F8F8F8',
|
||||
emoji: '👔',
|
||||
tags: [
|
||||
{
|
||||
text: '可定制',
|
||||
bg: '#FFF0E5',
|
||||
color: '#FF6800'
|
||||
},
|
||||
{
|
||||
text: '现货',
|
||||
bg: '#E5F5FF',
|
||||
color: '#1890FF'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '抓绒卫裤 PT150',
|
||||
price: '42.00',
|
||||
bgColor: '#F5F5F5',
|
||||
emoji: '👖',
|
||||
tags: [
|
||||
{
|
||||
text: '快返',
|
||||
bg: '#F0FFE5',
|
||||
color: '#52C41A'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: '运动速干T恤 ST200',
|
||||
price: '32.00',
|
||||
bgColor: '#E8E8E8',
|
||||
emoji: '👕',
|
||||
tags: [
|
||||
{
|
||||
text: '可定制',
|
||||
bg: '#FFF0E5',
|
||||
color: '#FF6800'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
name: '纯棉背包 BP300',
|
||||
price: '25.00',
|
||||
bgColor: '#F0F0F0',
|
||||
emoji: '🎒',
|
||||
tags: [
|
||||
{
|
||||
text: '可定制',
|
||||
bg: '#FFF0E5',
|
||||
color: '#FF6800'
|
||||
},
|
||||
{
|
||||
text: '现货',
|
||||
bg: '#E5F5FF',
|
||||
color: '#1890FF'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
name: '儿童纯棉T恤 KD100',
|
||||
price: '22.00',
|
||||
bgColor: '#F8F8F8',
|
||||
emoji: '👶',
|
||||
tags: [
|
||||
{
|
||||
text: '可定制',
|
||||
bg: '#FFF0E5',
|
||||
color: '#FF6800'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
name: '帆布托特包 BG150',
|
||||
price: '15.00',
|
||||
bgColor: '#F5F5F5',
|
||||
emoji: '👜',
|
||||
tags: [
|
||||
{
|
||||
text: '可定制',
|
||||
bg: '#FFF0E5',
|
||||
color: '#FF6800'
|
||||
},
|
||||
{
|
||||
text: '快返',
|
||||
bg: '#F0FFE5',
|
||||
color: '#52C41A'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
name: '针织开衫 CR180',
|
||||
price: '55.00',
|
||||
bgColor: '#E8E8E8',
|
||||
emoji: '🧶',
|
||||
tags: [
|
||||
{
|
||||
text: '可定制',
|
||||
bg: '#FFF0E5',
|
||||
color: '#FF6800'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
tag: {
|
||||
bg: '',
|
||||
color: '',
|
||||
text: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.loadSubCategories('all');
|
||||
},
|
||||
methods: {
|
||||
loadSubCategories(catId) {
|
||||
const subCatMap = {
|
||||
all: [],
|
||||
men: [
|
||||
{
|
||||
id: 'tops',
|
||||
name: '上装'
|
||||
},
|
||||
{
|
||||
id: 'hoodie',
|
||||
name: '卫衣'
|
||||
},
|
||||
{
|
||||
id: 'tshirt',
|
||||
name: 'T恤'
|
||||
},
|
||||
{
|
||||
id: 'shirt',
|
||||
name: '衬衫'
|
||||
},
|
||||
{
|
||||
id: 'pants',
|
||||
name: '裤装'
|
||||
},
|
||||
{
|
||||
id: 'underwear',
|
||||
name: '内衣'
|
||||
}
|
||||
],
|
||||
women: [
|
||||
{
|
||||
id: 'dress',
|
||||
name: '连衣裙'
|
||||
},
|
||||
{
|
||||
id: 'tops',
|
||||
name: '上装'
|
||||
},
|
||||
{
|
||||
id: 'bottoms',
|
||||
name: '下装'
|
||||
}
|
||||
],
|
||||
kids: [
|
||||
{
|
||||
id: 'baby',
|
||||
name: '婴儿装'
|
||||
},
|
||||
{
|
||||
id: 'kids',
|
||||
name: '儿童装'
|
||||
}
|
||||
],
|
||||
home: [
|
||||
{
|
||||
id: 'blanket',
|
||||
name: '毛毯'
|
||||
},
|
||||
{
|
||||
id: 'pillow',
|
||||
name: '抱枕'
|
||||
}
|
||||
],
|
||||
bag: [
|
||||
{
|
||||
id: 'tote',
|
||||
name: '托特包'
|
||||
},
|
||||
{
|
||||
id: 'backpack',
|
||||
name: '背包'
|
||||
}
|
||||
]
|
||||
};
|
||||
this.setData({
|
||||
subCategories: subCatMap[catId] || [],
|
||||
activeSubCategory: subCatMap[catId]?.[0]?.id || ''
|
||||
});
|
||||
},
|
||||
|
||||
onSearchInput(e) {
|
||||
this.setData({
|
||||
searchKeyword: e.detail.value
|
||||
});
|
||||
},
|
||||
|
||||
selectCountry(e) {
|
||||
const id = e.currentTarget.dataset.id;
|
||||
const country = this.countries.find((c) => c.id === id);
|
||||
const filters = this.activeFilters.filter((f) => f.key !== 'country');
|
||||
filters.push({
|
||||
key: 'country',
|
||||
label: country.name
|
||||
});
|
||||
this.setData({
|
||||
selectedCountry: id,
|
||||
activeFilters: filters
|
||||
});
|
||||
},
|
||||
|
||||
selectCategory(e) {
|
||||
const id = e.currentTarget.dataset.id;
|
||||
this.setData({
|
||||
activeCategory: id
|
||||
});
|
||||
this.loadSubCategories(id);
|
||||
},
|
||||
|
||||
selectSubCategory(e) {
|
||||
this.setData({
|
||||
activeSubCategory: e.currentTarget.dataset.id
|
||||
});
|
||||
},
|
||||
|
||||
toggleFilter() {
|
||||
this.setData({
|
||||
showFilter: !this.showFilter
|
||||
});
|
||||
},
|
||||
|
||||
closeFilter() {
|
||||
this.setData({
|
||||
showFilter: false
|
||||
});
|
||||
},
|
||||
|
||||
toggleCraft(e) {
|
||||
const value = e.currentTarget.dataset.value;
|
||||
let crafts = [...this.selectedCrafts];
|
||||
const idx = crafts.indexOf(value);
|
||||
if (idx > -1) {
|
||||
crafts.splice(idx, 1);
|
||||
} else {
|
||||
crafts.push(value);
|
||||
}
|
||||
this.setData({
|
||||
selectedCrafts: crafts
|
||||
});
|
||||
},
|
||||
|
||||
toggleMaterial(e) {
|
||||
const value = e.currentTarget.dataset.value;
|
||||
let materials = [...this.selectedMaterials];
|
||||
const idx = materials.indexOf(value);
|
||||
if (idx > -1) {
|
||||
materials.splice(idx, 1);
|
||||
} else {
|
||||
materials.push(value);
|
||||
}
|
||||
this.setData({
|
||||
selectedMaterials: materials
|
||||
});
|
||||
},
|
||||
|
||||
removeFilter(e) {
|
||||
const key = e.currentTarget.dataset.key;
|
||||
const filters = this.activeFilters.filter((f) => f.key !== key);
|
||||
this.setData({
|
||||
activeFilters: filters
|
||||
});
|
||||
},
|
||||
|
||||
clearAllFilters() {
|
||||
this.setData({
|
||||
activeFilters: []
|
||||
});
|
||||
},
|
||||
|
||||
resetFilters() {
|
||||
this.setData({
|
||||
selectedCrafts: [],
|
||||
selectedMaterials: []
|
||||
});
|
||||
},
|
||||
|
||||
confirmFilters() {
|
||||
const filters = [];
|
||||
if (this.selectedCrafts.length > 0) {
|
||||
filters.push({
|
||||
key: 'craft',
|
||||
label: this.selectedCrafts.join(',')
|
||||
});
|
||||
}
|
||||
if (this.selectedMaterials.length > 0) {
|
||||
filters.push({
|
||||
key: 'material',
|
||||
label: this.selectedMaterials.join(',')
|
||||
});
|
||||
}
|
||||
this.setData({
|
||||
activeFilters: filters,
|
||||
showFilter: false
|
||||
});
|
||||
},
|
||||
|
||||
goDetail(e) {
|
||||
const id = e.currentTarget.dataset.id;
|
||||
uni.navigateTo({
|
||||
url: `/pages/product-detail/product-detail?id=${id}`
|
||||
});
|
||||
},
|
||||
|
||||
changePage(e) {
|
||||
const action = e.currentTarget.dataset.action;
|
||||
let current = this.pagination.current;
|
||||
if (action === 'prev' && current > 1) {
|
||||
current--;
|
||||
}
|
||||
if (action === 'next' && current < this.pagination.totalPages) {
|
||||
current++;
|
||||
}
|
||||
this.updatePagination(current);
|
||||
},
|
||||
|
||||
goToPage(e) {
|
||||
this.updatePagination(e.currentTarget.dataset.page);
|
||||
},
|
||||
|
||||
updatePagination(current) {
|
||||
const total = this.pagination.total;
|
||||
const pageSize = this.pagination.pageSize;
|
||||
const totalPages = Math.ceil(total / pageSize);
|
||||
let pageNumbers = [];
|
||||
for (let i = Math.max(1, current - 2); i <= Math.min(totalPages, current + 2); i++) {
|
||||
pageNumbers.push(i);
|
||||
}
|
||||
this.setData({
|
||||
pagination: {
|
||||
...this.pagination,
|
||||
current,
|
||||
start: (current - 1) * pageSize + 1,
|
||||
end: Math.min(current * pageSize, total),
|
||||
totalPages
|
||||
},
|
||||
pageNumbers
|
||||
});
|
||||
},
|
||||
|
||||
loadMore() {
|
||||
if (this.loadingMore) {
|
||||
return;
|
||||
}
|
||||
this.setData({
|
||||
loadingMore: true
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.setData({
|
||||
loadingMore: false
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './products.css';
|
||||
</style>
|
||||
Reference in New Issue
Block a user