refactor(order): 优化订单列表倒计时展示逻辑

- 更新 API 基础 URL 以适应开发环境
- 调整倒计时组件样式,移除冗余样式
- 优化订单列表中倒计时的显示逻辑
- 统一处理订单状态文本和颜色
This commit is contained in:
2025-08-19 13:49:00 +08:00
parent 6db0b5e03f
commit 2ddf0e9605
4 changed files with 49 additions and 58 deletions

View File

@@ -7,32 +7,30 @@
color: white;
padding: 4px 8px;
border-radius: 12px;
font-size: 12px;
font-weight: 500;
box-shadow: 0 2px 4px rgba(255, 71, 87, 0.3);
margin-left: 8px;
.countdown-text {
color: white;
font-size: 12px;
font-weight: 500;
}
/* 紧急状态少于1小时 */
&.urgent {
background: linear-gradient(135deg, #ff6b6b, #ee5a52);
color: #ff6b6b;
animation: pulse 2s infinite;
}
/* 非常紧急状态少于10分钟 */
&.critical {
background: linear-gradient(135deg, #ff4757, #c44569);
color: #c44569;
animation: flash 1s infinite;
}
/* 过期状态 */
&.expired {
background: linear-gradient(135deg, #95a5a6, #7f8c8d);
color: #95a5a6;
animation: none;
}
}
@@ -40,21 +38,20 @@
/* 纯文本模式样式 */
.payment-countdown-text {
color: #ff4757;
font-size: 12px;
font-weight: 500;
/* 紧急状态 */
&.urgent {
color: #ff6b6b;
animation: textPulse 2s infinite;
}
/* 非常紧急状态 */
&.critical {
color: #ff4757;
animation: textFlash 1s infinite;
}
/* 过期状态 */
&.expired {
color: #95a5a6;
@@ -64,39 +61,39 @@
/* 动画效果 */
@keyframes pulse {
0% {
opacity: 1;
0% {
opacity: 1;
transform: scale(1);
}
50% {
opacity: 0.8;
50% {
opacity: 0.8;
transform: scale(1.02);
}
100% {
opacity: 1;
100% {
opacity: 1;
transform: scale(1);
}
}
@keyframes flash {
0% {
opacity: 1;
0% {
opacity: 1;
transform: scale(1);
}
25% {
opacity: 0.7;
25% {
opacity: 0.7;
transform: scale(1.05);
}
50% {
opacity: 1;
50% {
opacity: 1;
transform: scale(1);
}
75% {
opacity: 0.7;
75% {
opacity: 0.7;
transform: scale(1.05);
}
100% {
opacity: 1;
100% {
opacity: 1;
transform: scale(1);
}
}
@@ -118,35 +115,30 @@
/* 响应式调整 */
@media (max-width: 375px) {
.payment-countdown-badge {
font-size: 11px;
padding: 3px 6px;
.countdown-text {
font-size: 11px;
}
}
.payment-countdown-text {
font-size: 11px;
}
}
/* 详情页专用样式 */
.order-detail-countdown {
.payment-countdown-badge {
font-size: 14px;
padding: 6px 12px;
border-radius: 16px;
margin: 8px 0;
.countdown-text {
font-size: 14px;
font-weight: 600;
}
}
.payment-countdown-text {
font-size: 14px;
font-weight: 600;
}
}
@@ -154,17 +146,16 @@
/* 列表页专用样式 */
.order-list-countdown {
.payment-countdown-badge {
font-size: 11px;
padding: 2px 6px;
border-radius: 10px;
margin-left: 6px;
.countdown-text {
font-size: 11px;
}
}
.payment-countdown-text {
font-size: 11px;
}
}