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 @@ |
|||||||
export default { |
export default { |
||||||
navigationBarTitleText: '首页', |
navigationStyle: 'custom', |
||||||
usingComponents: {}, |
usingComponents: {}, |
||||||
} |
} |
||||||
|
|||||||
@ -1,44 +1,166 @@ |
|||||||
|
/** |
||||||
|
* 首页样式 |
||||||
|
* 设计稿宽度: 750px |
||||||
|
*/ |
||||||
|
|
||||||
.index-page { |
.index-page { |
||||||
min-height: 100vh; |
// 高度为 100vh 减去 tabbar 高度(100Px + 安全区域) |
||||||
// background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
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; |
||||||
|
} |
||||||
|
|
||||||
|
/* 轮播图区域 */ |
||||||
|
.swiper-container { |
||||||
|
width: 100%; |
||||||
|
height: 465px; // 设计稿高度 465px |
||||||
|
position: relative; |
||||||
|
|
||||||
|
.swiper { |
||||||
|
width: 100%; |
||||||
|
height: 100%; |
||||||
|
} |
||||||
|
|
||||||
|
.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 |
||||||
|
} |
||||||
|
|
||||||
.header { |
/* 通用卡片背景图 */ |
||||||
padding: 80px 32px 40px; |
.card-bg { |
||||||
text-align: center; |
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; |
||||||
|
|
||||||
.title { |
.card-text-title { |
||||||
font-size: 48px; |
font-family: 'Source Han Sans CN', sans-serif; |
||||||
font-weight: bold; |
font-weight: bold; |
||||||
color: #fff; |
font-size: 33px; |
||||||
|
color: #FFFFFF; |
||||||
|
margin-bottom: 20px; |
||||||
} |
} |
||||||
|
|
||||||
|
.card-text-desc { |
||||||
|
font-family: 'Source Han Sans CN', sans-serif; |
||||||
|
font-weight: 400; |
||||||
|
font-size: 23px; |
||||||
|
color: #FFFFFF; |
||||||
} |
} |
||||||
|
} |
||||||
|
|
||||||
.content { |
/* 左侧扫码开台卡片 */ |
||||||
padding: 32px; |
.scan-card { |
||||||
|
width: 330px; |
||||||
|
height: 335px; // 设计稿尺寸 330px * 335px |
||||||
|
border-radius: 20px; |
||||||
|
position: relative; |
||||||
|
overflow: hidden; |
||||||
|
flex-shrink: 0; |
||||||
|
} |
||||||
|
|
||||||
.welcome { |
/* 右侧卡片容器 */ |
||||||
background: #fff; |
.right-cards { |
||||||
border-radius: 16px; |
display: flex; |
||||||
padding: 40px 32px; |
flex-direction: column; |
||||||
text-align: center; |
justify-content: space-between; |
||||||
margin-bottom: 40px; |
height: 335px; // 与左侧扫码开台高度一致 |
||||||
|
flex: 1; |
||||||
|
} |
||||||
|
|
||||||
.welcome-text { |
/* 附近门店卡片 */ |
||||||
font-size: 32px; |
.nearby-store-card { |
||||||
color: #333; |
width: 100%; |
||||||
display: block; |
height: 155px; // (335 - 25) / 2 = 155px,使总高度与左侧一致 |
||||||
margin-bottom: 16px; |
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; |
||||||
} |
} |
||||||
|
|
||||||
.user-name { |
.card-title { |
||||||
font-size: 36px; |
font-size: 36px; |
||||||
font-weight: bold; |
font-weight: bold; |
||||||
color: #667eea; |
color: #fff; |
||||||
|
margin-bottom: 8px; |
||||||
} |
} |
||||||
|
|
||||||
|
.store-name { |
||||||
|
font-size: 24px; |
||||||
|
color: rgba(255, 255, 255, 0.9); |
||||||
|
margin-bottom: 12px; |
||||||
} |
} |
||||||
|
|
||||||
.actions { |
.store-distance { |
||||||
margin-top: 40px; |
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 @@ |
|||||||
export default { |
export default { |
||||||
navigationBarTitleText: '消息', |
navigationStyle: 'custom', |
||||||
usingComponents: {}, |
usingComponents: {}, |
||||||
} |
} |
||||||
|
|||||||
@ -1,4 +1,4 @@ |
|||||||
export default { |
export default { |
||||||
navigationBarTitleText: '扫码', |
navigationStyle: 'custom', |
||||||
usingComponents: {}, |
usingComponents: {}, |
||||||
} |
} |
||||||
|
|||||||
@ -1,4 +1,4 @@ |
|||||||
export default { |
export default { |
||||||
navigationBarTitleText: '门店', |
navigationStyle: 'custom', |
||||||
usingComponents: {}, |
usingComponents: {}, |
||||||
} |
} |
||||||
|
|||||||
@ -1,4 +1,4 @@ |
|||||||
export default { |
export default { |
||||||
navigationBarTitleText: '我的', |
navigationStyle: 'custom', |
||||||
usingComponents: {}, |
usingComponents: {}, |
||||||
} |
} |
||||||
|
|||||||
Loading…
Reference in new issue