This commit is contained in:
liu
2026-08-06 16:37:04 +08:00
parent c613b520a9
commit 39b789154c
47 changed files with 3377 additions and 265 deletions
+286
View File
@@ -0,0 +1,286 @@
.cart-page {
min-height: 100vh;
background: #f7f8fa;
padding: 20rpx 24rpx 200rpx;
box-sizing: border-box;
// ===== 头部 =====
.cart-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8rpx 8rpx 24rpx;
&__title {
font-size: 36rpx;
font-weight: 600;
}
&__clear {
font-size: 26rpx;
color: #969799;
}
}
.cart-empty {
padding-top: 160rpx;
}
.cart-loading {
padding-top: 160rpx;
text-align: center;
color: #c8c9cc;
font-size: 26rpx;
}
// ===== 购物车项 =====
.cart-item {
background: #fff;
border-radius: 16rpx;
padding: 24rpx;
margin-bottom: 16rpx;
display: flex;
&--invalid {
background: #fafafa;
.cart-item__name {
color: #c8c9cc;
}
}
&__image {
width: 150rpx;
height: 150rpx;
border-radius: 12rpx;
background: #f2f3f5;
flex-shrink: 0;
}
&__info {
flex: 1;
min-width: 0;
margin-left: 20rpx;
display: flex;
flex-direction: column;
}
&__title-row {
display: flex;
align-items: center;
}
&__name {
font-size: 30rpx;
color: #323233;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&__invalid-tag {
margin-left: 12rpx;
font-size: 20rpx;
color: #c8c9cc;
border: 1rpx solid #d8d9db;
border-radius: 6rpx;
padding: 2rpx 8rpx;
flex-shrink: 0;
}
&__spec {
margin-top: 10rpx;
font-size: 24rpx;
color: #969799;
}
&__bottom {
margin-top: auto;
display: flex;
align-items: center;
justify-content: space-between;
}
&__price {
font-size: 30rpx;
color: #ee0a24;
font-weight: 600;
&--none {
color: #c8c9cc;
font-weight: 400;
font-size: 24rpx;
}
}
&__actions {
margin-left: 20rpx;
align-self: stretch;
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: space-between;
flex-shrink: 0;
}
&__amount {
font-size: 30rpx;
color: #323233;
font-weight: 600;
}
&__delete {
font-size: 24rpx;
color: #969799;
padding: 8rpx 4rpx;
}
}
.cart-invalid-hint {
padding: 20rpx;
font-size: 22rpx;
color: #fa5151;
background: #fff4f4;
border-radius: 12rpx;
margin-top: 8rpx;
}
// ===== 底部结算栏 =====
.cart-footer {
position: fixed;
left: 0;
right: 0;
bottom: calc(110rpx + env(safe-area-inset-bottom));
background: #fff;
display: flex;
align-items: center;
padding: 16rpx 24rpx;
border-top: 1rpx solid #ebedf0;
box-sizing: border-box;
&__total {
flex: 1;
display: flex;
flex-direction: column;
}
&__label {
font-size: 22rpx;
color: #969799;
}
&__amount {
font-size: 36rpx;
color: #ee0a24;
font-weight: 600;
}
&__submit {
width: 240rpx;
border-radius: 999rpx;
}
}
// ===== 下单确认弹层 =====
.order-popup {
padding: 32rpx 32rpx 24rpx;
&__title {
font-size: 34rpx;
font-weight: 600;
display: block;
}
&__list {
max-height: 480rpx;
margin-top: 20rpx;
}
&__item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 0;
border-bottom: 1rpx solid #f2f3f5;
&-info {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
}
&-name {
font-size: 28rpx;
color: #323233;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&-spec {
margin-top: 6rpx;
font-size: 22rpx;
color: #969799;
}
&-right {
display: flex;
align-items: center;
margin-left: 20rpx;
}
&-qty {
font-size: 26rpx;
color: #969799;
margin-right: 20rpx;
}
&-amount {
font-size: 28rpx;
color: #323233;
font-weight: 500;
}
}
&__remark {
margin-top: 24rpx;
}
&__remark-label {
font-size: 26rpx;
color: #323233;
}
&__remark-input {
margin-top: 12rpx;
width: 100%;
min-height: 120rpx;
background: #f7f8fa;
border-radius: 12rpx;
padding: 16rpx;
box-sizing: border-box;
font-size: 26rpx;
}
&__footer {
margin-top: 24rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
&__total {
font-size: 28rpx;
color: #323233;
// 金额颜色由内部元素控制
}
&__submit {
width: 280rpx;
border-radius: 999rpx;
}
}
}