16 changed files with 319 additions and 64 deletions
|
After Width: | Height: | Size: 485 KiB |
|
After Width: | Height: | Size: 996 KiB |
|
After Width: | Height: | Size: 286 KiB |
|
After Width: | Height: | Size: 376 KiB |
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
||||
export default { |
||||
navigationBarTitleText: '首页', |
||||
navigationStyle: 'custom', |
||||
usingComponents: {}, |
||||
} |
||||
|
||||
@ -1,44 +1,166 @@
@@ -1,44 +1,166 @@
|
||||
/** |
||||
* 首页样式 |
||||
* 设计稿宽度: 750px |
||||
*/ |
||||
|
||||
.index-page { |
||||
min-height: 100vh; |
||||
// background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
||||
// 高度为 100vh 减去 tabbar 高度(100Px + 安全区域) |
||||
height: calc(100vh - 40Px); |
||||
height: calc(100vh - 40Px - constant(safe-area-inset-bottom)); // iOS 11.0-11.2 |
||||
height: calc(100vh - 40Px - env(safe-area-inset-bottom)); // iOS 11.2+ |
||||
background-color: red; |
||||
position: relative; |
||||
overflow-x: hidden; |
||||
overflow-y: auto; // 超出计算高度后才可以滚动 |
||||
box-sizing: border-box; |
||||
} |
||||
|
||||
.header { |
||||
padding: 80px 32px 40px; |
||||
text-align: center; |
||||
/* 轮播图区域 */ |
||||
.swiper-container { |
||||
width: 100%; |
||||
height: 465px; // 设计稿高度 465px |
||||
position: relative; |
||||
|
||||
.title { |
||||
font-size: 48px; |
||||
font-weight: bold; |
||||
color: #fff; |
||||
} |
||||
.swiper { |
||||
width: 100%; |
||||
height: 100%; |
||||
} |
||||
|
||||
.content { |
||||
padding: 32px; |
||||
|
||||
.welcome { |
||||
background: #fff; |
||||
border-radius: 16px; |
||||
padding: 40px 32px; |
||||
text-align: center; |
||||
margin-bottom: 40px; |
||||
|
||||
.welcome-text { |
||||
font-size: 32px; |
||||
color: #333; |
||||
display: block; |
||||
margin-bottom: 16px; |
||||
} |
||||
|
||||
.user-name { |
||||
font-size: 36px; |
||||
font-weight: bold; |
||||
color: #667eea; |
||||
} |
||||
} |
||||
.swiper-image { |
||||
width: 100%; |
||||
height: 100%; |
||||
display: block; |
||||
} |
||||
|
||||
.swiper-indicator { |
||||
position: absolute; |
||||
bottom: 40px; |
||||
left: 50%; |
||||
transform: translateX(-50%); |
||||
} |
||||
} |
||||
|
||||
/* 内容区域 - 上移覆盖轮播图 */ |
||||
.content-area { |
||||
position: relative; |
||||
margin-top: -20px; // 上移 20px 覆盖轮播图 |
||||
background-color: #121212; |
||||
border-top-left-radius: 25px; |
||||
border-top-right-radius: 25px; |
||||
padding: 33px; |
||||
} |
||||
|
||||
/* 卡片容器 */ |
||||
.card-container { |
||||
display: flex; |
||||
justify-content: space-between; |
||||
gap: 25px; // 左右间距 25px |
||||
} |
||||
|
||||
/* 通用卡片背景图 */ |
||||
.card-bg { |
||||
position: absolute; |
||||
top: 0; |
||||
left: 0; |
||||
width: 100%; |
||||
height: 100%; |
||||
border-radius: 20px; |
||||
} |
||||
|
||||
/* 通用卡片文字内容 */ |
||||
.card-text-content { |
||||
position: absolute; |
||||
top: 28px; |
||||
left: 30px; |
||||
z-index: 1; |
||||
|
||||
.card-text-title { |
||||
font-family: 'Source Han Sans CN', sans-serif; |
||||
font-weight: bold; |
||||
font-size: 33px; |
||||
color: #FFFFFF; |
||||
margin-bottom: 20px; |
||||
} |
||||
|
||||
.actions { |
||||
margin-top: 40px; |
||||
.card-text-desc { |
||||
font-family: 'Source Han Sans CN', sans-serif; |
||||
font-weight: 400; |
||||
font-size: 23px; |
||||
color: #FFFFFF; |
||||
} |
||||
} |
||||
|
||||
/* 左侧扫码开台卡片 */ |
||||
.scan-card { |
||||
width: 330px; |
||||
height: 335px; // 设计稿尺寸 330px * 335px |
||||
border-radius: 20px; |
||||
position: relative; |
||||
overflow: hidden; |
||||
flex-shrink: 0; |
||||
} |
||||
|
||||
/* 右侧卡片容器 */ |
||||
.right-cards { |
||||
display: flex; |
||||
flex-direction: column; |
||||
justify-content: space-between; |
||||
height: 335px; // 与左侧扫码开台高度一致 |
||||
flex: 1; |
||||
} |
||||
|
||||
/* 附近门店卡片 */ |
||||
.nearby-store-card { |
||||
width: 100%; |
||||
height: 155px; // (335 - 25) / 2 = 155px,使总高度与左侧一致 |
||||
border-radius: 20px; |
||||
position: relative; |
||||
overflow: hidden; |
||||
|
||||
.card-content { |
||||
position: absolute; |
||||
top: 0; |
||||
left: 0; |
||||
right: 0; |
||||
bottom: 0; |
||||
padding: 24px; |
||||
display: flex; |
||||
flex-direction: column; |
||||
justify-content: center; |
||||
z-index: 1; |
||||
} |
||||
|
||||
.card-title { |
||||
font-size: 36px; |
||||
font-weight: bold; |
||||
color: #fff; |
||||
margin-bottom: 8px; |
||||
} |
||||
|
||||
.store-name { |
||||
font-size: 24px; |
||||
color: rgba(255, 255, 255, 0.9); |
||||
margin-bottom: 12px; |
||||
} |
||||
|
||||
.store-distance { |
||||
display: flex; |
||||
align-items: center; |
||||
gap: 8px; |
||||
color: #fff; |
||||
|
||||
.distance-text { |
||||
font-size: 22px; |
||||
color: rgba(255, 255, 255, 0.85); |
||||
} |
||||
} |
||||
} |
||||
|
||||
/* 团购核销卡片 */ |
||||
.group-buy-card { |
||||
width: 100%; |
||||
height: 155px; // (335 - 25) / 2 = 155px,使总高度与左侧一致 |
||||
border-radius: 20px; |
||||
position: relative; |
||||
overflow: hidden; |
||||
} |
||||
|
||||
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
||||
export default { |
||||
navigationBarTitleText: '消息', |
||||
navigationStyle: 'custom', |
||||
usingComponents: {}, |
||||
} |
||||
|
||||
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
||||
export default { |
||||
navigationBarTitleText: '扫码', |
||||
navigationStyle: 'custom', |
||||
usingComponents: {}, |
||||
} |
||||
|
||||
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
||||
export default { |
||||
navigationBarTitleText: '门店', |
||||
navigationStyle: 'custom', |
||||
usingComponents: {}, |
||||
} |
||||
|
||||
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
||||
export default { |
||||
navigationBarTitleText: '我的', |
||||
navigationStyle: 'custom', |
||||
usingComponents: {}, |
||||
} |
||||
|
||||
Loading…
Reference in new issue