Files
WXProgram/miniprogram/pages/index/index.less

461 lines
8.0 KiB
Plaintext

/**index.less**/
page {
height: 100vh;
display: flex;
flex-direction: column;
background-color: #f8f8f8;
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* 容器样式 */
.map-container {
position: absolute;
top: 120rpx;
right: 20rpx;
z-index: 999;
width: auto;
height: auto;
}
/* 用户控制区域 */
.user-controls {
position: absolute;
top: 20rpx;
right: 20rpx;
z-index: 999;
}
/* 登录按钮样式 */
.login-btn {
background-color: #1aad19;
color: white;
font-size: 28rpx;
padding: 12rpx 32rpx;
border-radius: 40rpx;
border: none;
height: 64rpx;
line-height: 64rpx;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
}
.login-btn:active {
background-color: #179b16;
}
/* 小头像样式 - 更新为与其他按钮相同大小 */
.user-avatar-small {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
overflow: hidden;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.15);
background-color: #f8f8f8;
display: flex;
align-items: center;
justify-content: center;
border: 2rpx solid #e0e0e0;
}
.avatar-image-small {
width: 70rpx;
height: 70rpx;
object-fit: contain;
}
/* 地图样式 */
.map {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
/* 右侧控制按钮组容器 */
.right-controls-container {
position: absolute;
top: 25%; /* 顶部1/4位置开始 */
right: 30rpx;
z-index: 100;
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 30rpx;
pointer-events: none;
}
/* 认证按钮组 */
.auth-buttons {
display: flex;
flex-direction: column;
gap: 20rpx;
align-items: flex-end;
pointer-events: auto;
}
/* 控制按钮区域样式 */
.map-controls {
display: flex;
flex-direction: column;
gap: 30rpx;
pointer-events: auto;
}
.control-btn {
width: 100rpx;
height: 100rpx;
background-color: #ffffff;
border: none;
border-radius: 50%;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.15);
display: flex;
align-items: center;
justify-content: center;
padding: 0;
margin: 0;
/* 确保按钮可以点击,但不会阻止地图交互 */
pointer-events: auto;
}
.control-btn:active {
transform: scale(0.95);
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
}
.control-btn image {
width: 50rpx;
height: 50rpx;
}
/* 调试信息样式 - 已移除 */
.btn-signin, .btn-join-delivery {
font-size: 28rpx;
padding: 12rpx 24rpx;
border-radius: 40rpx;
height: 64rpx;
line-height: 64rpx;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
min-width: 120rpx; /* 确保按钮宽度一致 */
}
/* 控制按钮样式统一 */
.control-btn.signin-btn,
.control-btn.register-btn,
.control-btn.sign-out-btn,
.control-btn.auth-btn,
.control-btn.location-btn,
.control-btn.reset-btn,
.control-btn.staff-management-btn {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-shadow: 0 6rpx 30rpx rgba(0, 0, 0, 0.2);
font-size: 24rpx;
padding: 0;
margin: 0;
border: none;
color: #333333;
text-align: center;
line-height: 1;
background: rgba(255, 255, 255, 0.9);
border: 1rpx solid rgba(0, 0, 0, 0.1);
}
/* 按钮图标样式 */
.btn-icon {
font-size: 40rpx;
margin-bottom: 8rpx;
display: block;
line-height: 1;
}
/* 按钮文字样式 */
.btn-text {
font-size: 22rpx;
font-weight: 500;
display: block;
line-height: 1.2;
}
.control-btn.signin-btn:active,
.control-btn.register-btn:active,
.control-btn.sign-out-btn:active {
transform: scale(0.95);
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
}
/* 所有按钮点击状态 */
.control-btn.signin-btn:active,
.control-btn.register-btn:active,
.control-btn.auth-btn:active,
.control-btn.sign-out-btn:active,
.control-btn.location-btn:active,
.control-btn.reset-btn:active,
.control-btn.staff-management-btn:active {
background: rgba(240, 240, 240, 0.9);
transform: scale(0.95);
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
border: 1rpx solid rgba(0, 0, 0, 0.2);
}
.btn-signin {
background-color: #1aad19;
color: white;
border: none;
}
.btn-signin:active {
background-color: #179b16;
}
.btn-join-delivery {
background-color: #ffffff;
color: #333333;
border: 1rpx solid #ddd;
}
.btn-join-delivery:active {
background-color: #f5f5f5;
}
/* 位置信息显示区域 */
.location-info {
position: absolute;
top: 20rpx;
left: 20rpx;
right: 120rpx;
background-color: rgba(255, 255, 255, 0.9);
padding: 20rpx;
border-radius: 12rpx;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
z-index: 999;
}
.location-info text {
font-size: 28rpx;
color: #333333;
}
/* 用户信息面板样式 */
.user-panel {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 85%;
max-width: 640rpx;
background-color: white;
border-radius: 24rpx;
box-shadow: 0 16rpx 64rpx rgba(0, 0, 0, 0.15);
z-index: 1000;
overflow: hidden;
}
.user-panel-header {
padding: 32rpx;
background-color: #f8f8f8;
border-bottom: 2rpx solid #eee;
display: flex;
justify-content: space-between;
align-items: center;
}
.user-panel-title {
font-size: 32rpx;
font-weight: 600;
color: #333;
}
.close-btn {
font-size: 48rpx;
color: #999;
line-height: 1;
padding: 8rpx;
}
.close-btn:active {
color: #666;
}
.user-panel-content {
padding: 40rpx;
display: flex;
flex-direction: column;
align-items: center;
gap: 32rpx;
}
.user-avatar {
width: 160rpx;
height: 160rpx;
border-radius: 50%;
overflow: hidden;
border: 4rpx solid #f0f0f0;
}
.avatar-image {
width: 100%;
height: 100%;
}
.user-info {
text-align: center;
}
.user-name {
font-size: 36rpx;
font-weight: 600;
color: #333;
display: block;
margin-bottom: 16rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.user-id, .user-gender {
font-size: 28rpx;
color: #666;
display: block;
margin-bottom: 8rpx;
}
/* 信息窗口样式 */
.info-window {
position: fixed;
max-width: 560rpx;
background-color: white;
border-radius: 16rpx;
box-shadow: 0 8rpx 40rpx rgba(0, 0, 0, 0.15);
z-index: 1000;
overflow: hidden;
pointer-events: auto;
}
/* 货运师傅信息窗口 - 更宽的样式 */
.delivery-person-window {
max-width: 680rpx; /* 比普通窗口更宽 */
}
/* 居中对齐的窗口样式 */
.center-window {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 24rpx; /* 更大的圆角 */
box-shadow: 0 12rpx 60rpx rgba(0, 0, 0, 0.2); /* 更明显的阴影 */
animation: fadeIn 0.3s ease-out;
}
/* 淡入动画 */
@keyframes fadeIn {
from {
opacity: 0;
transform: translate(-50%, -45%);
}
to {
opacity: 1;
transform: translate(-50%, -50%);
}
}
.info-window-header {
padding: 24rpx 32rpx;
background-color: #f8f8f8;
border-bottom: 2rpx solid #eee;
display: flex;
justify-content: space-between;
align-items: center;
}
.info-window-title {
font-size: 30rpx;
font-weight: 600;
color: #333;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.info-window-content {
padding: 32rpx;
}
.info-item {
display: flex;
margin-bottom: 16rpx;
}
.info-label {
font-size: 28rpx;
color: #666;
min-width: 120rpx;
}
.info-value {
font-size: 28rpx;
color: #333;
flex: 1;
}
/* 遮罩层样式 */
.overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 999;
pointer-events: auto;
}
/* 适配不同屏幕尺寸 */
@media screen and (min-width: 768px) {
.map-controls {
bottom: 240rpx;
right: 40rpx;
}
.control-btn {
width: 120rpx;
height: 120rpx;
}
.control-btn image {
width: 60rpx;
height: 60rpx;
}
.user-panel {
width: 60%;
max-width: 800rpx;
}
.info-window {
max-width: 640rpx;
}
.location-info {
padding: 24rpx;
}
.location-info text {
font-size: 32rpx;
}
}