修改微信小程序的空白区域

This commit is contained in:
zhonghua.li
2026-02-08 22:05:30 +08:00
parent 94b0367ac5
commit e76cb09bf7
41 changed files with 707 additions and 7732 deletions

View File

@@ -3,32 +3,65 @@ page {
background-color: #F5F5F5;
}
.page {
min-height: 100vh;
/* 微信小程序:确保页面容器铺满整个视口 */
height: 100vh !important;
min-height: 100vh !important;
background-color: #F5F5F5;
}
.content {
padding-top: 0; /* 移除padding-top因为tab页和列表组件都使用绝对定位 */
padding-top: 0; /* 移除padding-top因为tab页和scroll-view都使用绝对定位 */
margin-top: 0;
position: relative;
min-height: 100vh; /* 确保content有足够高度 */
/* 微信小程序:确保内容容器铺满整个视口,底部导航栏是 fixed 定位,不占用文档流 */
height: 100vh !important;
min-height: 100vh !important;
max-height: 100vh !important;
}
/* 隐藏导航栏占位区域,避免产生空白 */
/* 隐藏导航栏占位区域(红色区域) */
.uni-navbar__placeholder {
display: none !important;
height: 0 !important;
}
.uni-navbar__placeholder-view {
display: none !important;
height: 0 !important;
}
/* 标签页 - 使用绝对定位紧贴导航栏 */
/* 隐藏导航栏底部边框 */
.uni-navbar--border {
border-bottom: none !important;
}
/* 标签页 - 使用固定定位,确保显示在导航栏下方 */
.tabs {
display: flex;
display: flex !important; /* 强制显示 */
visibility: visible !important; /* 强制可见 */
opacity: 1 !important; /* 强制不透明 */
background-color: #FFFFFF;
border-bottom: 1px solid #E0E0E0;
padding: 0 32rpx;
position: absolute;
top: 88rpx; /* 导航栏高度 */
padding: 0 16rpx;
margin-top: 0;
position: fixed; /* 改为fixed定位确保始终可见 */
/* 导航栏高度statusBar + navbar动态计算 */
/* 使用内联样式动态设置top值 */
left: 0;
right: 0;
z-index: 1;
z-index: 999; /* 提高z-index确保在最上层 */
height: 72rpx; /* 明确设置标签页高度 */
box-sizing: border-box;
align-items: center;
/* 确保tab栏始终可见 */
will-change: top; /* 优化渲染性能 */
}
.tab-item {
padding: 24rpx 32rpx;
@@ -77,20 +110,118 @@ page {
}
/* 服务记录列表 */
.service-list {
height: calc(100vh - 420rpx);
background-color: #FFFFFF;
/* 标签管理列表区:使用绝对定位,与服务状态列表保持一致 */
.tag-list {
/* 使用绝对定位从tab页底部开始到底部导航栏结束 */
position: absolute;
/* top值通过内联样式动态设置 */
left: 0;
right: 0;
/* 微信小程序:底部导航栏是 fixed 定位,不占用文档流,容器可以延伸到视口底部 */
bottom: 0 !important;
background-color: #F5F5F5;
padding: 24rpx 16rpx 0 16rpx;
padding-bottom: 0 !important; /* 确保底部没有padding */
box-sizing: border-box;
}
/* 标签管理工具栏样式 */
.service-status-toolbar {
display: flex;
flex-wrap: nowrap;
align-items: center;
gap: 8rpx;
padding: 12rpx 8rpx;
margin-bottom: 24rpx;
background-color: #F8F8FA;
border-radius: 8rpx;
border: 1px solid #EFEFF2;
overflow-x: auto;
min-height: 64rpx;
box-sizing: border-box;
}
.toolbar-total {
font-size: 24rpx;
color: #666;
white-space: nowrap;
flex-shrink: 0;
margin-right: 8rpx;
line-height: 1.2;
padding: 0 4rpx;
}
.toolbar-input {
flex: 1;
min-width: 120rpx;
max-width: 200rpx;
height: 56rpx;
line-height: 56rpx;
background-color: #F5F6FA;
border-radius: 8rpx;
padding: 0 12rpx;
font-size: 24rpx;
border: 1px solid transparent;
box-sizing: border-box;
flex-shrink: 1;
}
.toolbar-actions {
display: flex;
align-items: center;
margin-left: auto;
flex-shrink: 0;
gap: 8rpx;
}
.toolbar-btn {
padding: 0 12rpx;
height: 56rpx;
min-width: 56rpx;
color: #2A68FF;
display: flex;
align-items: center;
justify-content: center;
gap: 4rpx;
font-size: 24rpx;
font-weight: 400;
line-height: 1;
box-sizing: border-box;
}
.service-item {
padding: 32rpx;
border-bottom: 1px solid #F0F0F0;
width: 100%;
box-sizing: border-box;
background-color: #FFFFFF;
border-radius: 16rpx;
padding: 32rpx;
margin-bottom: 24rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
position: relative;
}
.service-item:last-child {
margin-bottom: 0 !important; /* 最后一项不设置下边距 */
}
/* 客户卡片样式 */
.customer-card {
width: 100%;
box-sizing: border-box;
background-color: #FFFFFF;
border-radius: 16rpx;
padding: 32rpx;
margin-bottom: 24rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}
.customer-card:last-child {
margin-bottom: 0 !important; /* 最后一项不设置下边距 */
}
.service-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16rpx;
position: relative;
}
.service-title {
font-size: 32rpx;