改造店务小程序预约时间选择器

This commit is contained in:
2026-07-23 14:50:37 +08:00
parent e443db55bb
commit 7d6929bcf6
6 changed files with 513 additions and 179 deletions
+175 -43
View File
@@ -1,3 +1,51 @@
.appointment-page {
animation: appointment-page-enter 0.22s ease-out both;
}
@keyframes appointment-page-enter {
from {
opacity: 0;
transform: translateY(12rpx);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes appointment-mask-enter {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes appointment-sheet-enter {
from {
opacity: 0;
transform: translateY(36rpx);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes appointment-spinner-rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.form-card {
padding: 8rpx 0;
overflow: visible;
@@ -392,6 +440,7 @@
align-items: flex-end;
justify-content: center;
background: rgba(18, 15, 12, 0.48);
animation: appointment-mask-enter 0.18s ease-out both;
}
.product-modal {
@@ -433,6 +482,13 @@
box-shadow: 0 -18rpx 40rpx rgba(41, 31, 23, 0.16);
}
.product-modal,
.template-modal,
.artist-modal,
.time-modal {
animation: appointment-sheet-enter 0.22s ease-out both;
}
.modal-head {
display: flex;
align-items: center;
@@ -781,72 +837,106 @@
text-align: center;
}
.time-list {
max-height: 620rpx;
padding-right: 2rpx;
.time-picker-panel {
padding-top: 4rpx;
}
.time-group {
margin-bottom: 28rpx;
.time-picker-summary {
display: flex;
align-items: center;
justify-content: space-between;
gap: 18rpx;
padding: 18rpx 22rpx;
border: 1rpx solid #eadfd2;
border-radius: 18rpx;
background: #fffdf8;
}
.time-group:last-child {
margin-bottom: 0;
.time-picker-label {
display: block;
color: #8c8177;
font-size: 22rpx;
line-height: 1.25;
}
.time-group-title {
.time-picker-value {
display: block;
margin-bottom: 14rpx;
color: #4d453e;
font-size: 26rpx;
min-width: 160rpx;
color: #2f2923;
font-size: 42rpx;
font-weight: 900;
line-height: 1.1;
text-align: right;
}
.time-grid {
.time-picker-head {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 14rpx;
grid-template-columns: repeat(2, minmax(0, 1fr));
margin: 20rpx 0 10rpx;
color: #8c8177;
font-size: 22rpx;
font-weight: 800;
text-align: center;
}
.time-picker-view {
width: 100%;
height: 370rpx;
overflow: hidden;
border: 1rpx solid #eadfd2;
border-radius: 18rpx;
background: #fffaf4;
}
.time-chip {
.time-picker-item {
display: flex;
min-height: 88rpx;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4rpx;
border: 2rpx solid #eadfd2;
height: 92rpx;
color: #312a24;
font-size: 34rpx;
font-weight: 900;
line-height: 92rpx;
}
.time-picker-indicator {
height: 92rpx;
border-top: 1rpx solid #e1d4c5;
border-bottom: 1rpx solid #e1d4c5;
background: rgba(255, 242, 223, 0.82);
}
.time-picker-mask {
background: transparent;
}
.time-picker-actions {
margin-top: 22rpx;
}
.time-confirm-btn {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 88rpx;
margin: 0;
padding: 0;
border-radius: 18rpx;
background: #fff;
color: #302923;
box-shadow: 0 8rpx 18rpx rgba(92, 66, 43, 0.06);
transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.time-chip:active {
transform: scale(0.98);
}
.time-chip.active {
border-color: #c9874d;
background: #fff2df;
color: #9f5f2d;
}
.time-chip text:first-child {
background: #6f8f83;
color: #fff;
font-size: 28rpx;
font-weight: 900;
line-height: 1.2;
line-height: 88rpx;
}
.time-chip text:last-child {
color: #8c8177;
font-size: 20rpx;
line-height: 1.2;
.time-confirm-btn::after {
border: 0;
}
.time-chip.active text:last-child {
color: #a26428;
.time-confirm-btn[disabled] {
background: #d7d0c8;
color: #fff;
}
.time-empty {
@@ -919,6 +1009,7 @@
justify-content: center;
padding: 38rpx 28rpx;
background: rgba(18, 15, 12, 0.48);
animation: appointment-mask-enter 0.18s ease-out both;
}
.manual-sheet {
@@ -929,6 +1020,7 @@
border-radius: 28rpx;
background: #f7efe7;
box-shadow: 0 24rpx 54rpx rgba(41, 31, 23, 0.22);
animation: appointment-sheet-enter 0.22s ease-out both;
}
.manual-sheet-head {
@@ -1227,3 +1319,43 @@
min-width: 0;
max-width: none;
}
.page-loading-mask {
position: fixed;
inset: 0;
z-index: 140;
display: flex;
align-items: center;
justify-content: center;
padding: 40rpx;
background: rgba(36, 30, 24, 0.34);
animation: appointment-mask-enter 0.16s ease-out both;
}
.page-loading-card {
display: flex;
min-width: 248rpx;
min-height: 168rpx;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 22rpx;
padding: 32rpx 36rpx;
border: 1rpx solid rgba(255, 255, 255, 0.78);
border-radius: 20rpx;
background: rgba(255, 253, 248, 0.96);
color: #3d352f;
font-size: 26rpx;
font-weight: 900;
box-shadow: 0 24rpx 54rpx rgba(41, 31, 23, 0.2);
animation: appointment-sheet-enter 0.2s ease-out both;
}
.page-loading-spinner {
width: 54rpx;
height: 54rpx;
border: 6rpx solid #dfe8e2;
border-top-color: #6f8f83;
border-radius: 50%;
animation: appointment-spinner-rotate 0.78s linear infinite;
}