Files
SupplierSystem/miniprogram/components/mall-panel/index.wxss
T
Ubuntu 4e0cf2e217
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
fix(小程序): 商城面板与商品溯源模块顺序对齐配送系统
2026-10-28 21:38:19 +08:00

499 lines
8.1 KiB
Plaintext

.mall-panel {
padding: 0 24rpx 260rpx;
}
.mall-panel.is-embedded {
padding-top: 16rpx;
}
.mall-state {
padding: 60rpx 0;
text-align: center;
font-size: 26rpx;
color: #94a3b8;
}
.mall-state--empty {
width: 100%;
padding: 120rpx 0;
}
.mall-search {
padding: 0 0 16rpx;
}
.mall-search-input {
width: 100%;
box-sizing: border-box;
height: 76rpx;
padding: 0 28rpx;
border-radius: 999rpx;
background: #ffffff;
border: 1rpx solid #e5e7eb;
font-size: 26rpx;
}
.mall-cats {
white-space: nowrap;
padding-bottom: 16rpx;
}
.mall-cat {
display: inline-block;
margin-right: 12rpx;
padding: 10rpx 24rpx;
border-radius: 999rpx;
background: #ffffff;
border: 1rpx solid #e5e7eb;
color: #475569;
font-size: 24rpx;
font-weight: 600;
}
.mall-cat.is-active {
background: #047857;
border-color: #047857;
color: #ffffff;
}
.mall-grid {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: space-between;
padding-top: 4rpx;
}
.mall-card {
display: flex;
flex-direction: column;
width: calc(50% - 8rpx);
box-sizing: border-box;
margin-bottom: 12rpx;
padding: 12rpx;
border-radius: 16rpx;
background: #ffffff;
border: 1rpx solid #f1f5f9;
}
.mall-thumb-wrap {
position: relative;
width: 100%;
height: 180rpx;
border-radius: 12rpx;
overflow: hidden;
background: #f1f5f9;
}
.mall-thumb {
width: 100%;
height: 100%;
display: block;
}
.mall-thumb--empty {
background: linear-gradient(135deg, #eef2f7 0%, #e2e8f0 100%);
}
.mall-card-badge {
position: absolute;
top: 12rpx;
right: 12rpx;
min-width: 40rpx;
height: 40rpx;
padding: 0 10rpx;
box-sizing: border-box;
border-radius: 999rpx;
background: #059669;
color: #ffffff;
font-size: 22rpx;
font-weight: 700;
line-height: 40rpx;
text-align: center;
}
.mall-name {
margin-top: 8rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
font-size: 26rpx;
font-weight: 600;
line-height: 1.25;
color: #0f172a;
}
.mall-meta {
margin-top: 2rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 20rpx;
color: #94a3b8;
}
.mall-desc {
margin-top: 2rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
font-size: 20rpx;
line-height: 1.3;
color: #64748b;
}
.mall-card-foot {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8rpx;
margin-top: 6rpx;
padding-top: 0;
}
.mall-price {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 28rpx;
font-weight: 700;
color: #047857;
}
.mall-price-unit {
margin-left: 2rpx;
font-size: 20rpx;
font-weight: 400;
color: #64748b;
}
.mall-price.is-missing {
font-size: 24rpx;
color: #94a3b8;
font-weight: 500;
}
.mall-step {
display: flex;
align-items: center;
gap: 8rpx;
flex-shrink: 0;
}
.mall-step-btn {
width: 40rpx;
height: 40rpx;
border-radius: 999rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
line-height: 1;
color: #047857;
background: #ecfdf5;
border: 1rpx solid #a7f3d0;
}
.mall-step-btn--add {
color: #ffffff;
background: #059669;
border-color: #059669;
}
.mall-step-btn--add.is-disabled {
color: #9ca3af;
background: #f3f4f6;
border-color: #e5e7eb;
}
.mall-step-qty {
min-width: 28rpx;
text-align: center;
font-size: 24rpx;
font-weight: 700;
color: #0f172a;
}
.mall-bar {
position: fixed;
left: 24rpx;
right: 24rpx;
/* app-tab-bar 高约 116rpx + 安全区,购物车条必须浮在它上方 */
bottom: calc(136rpx + env(safe-area-inset-bottom));
z-index: 300;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16rpx;
padding: 16rpx 20rpx 16rpx 24rpx;
border-radius: 999rpx;
background: rgba(15, 23, 42, 0.94);
box-shadow: 0 12rpx 30rpx rgba(15, 23, 42, 0.24);
}
.mall-bar-left {
display: flex;
align-items: center;
gap: 12rpx;
min-width: 0;
}
.mall-bar-badge {
min-width: 40rpx;
height: 40rpx;
padding: 0 10rpx;
box-sizing: border-box;
border-radius: 999rpx;
background: #10b981;
color: #ffffff;
font-size: 22rpx;
font-weight: 700;
line-height: 40rpx;
text-align: center;
}
.mall-bar-total {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 28rpx;
font-weight: 700;
color: #ffffff;
}
.mall-bar-btn {
flex-shrink: 0;
padding: 12rpx 36rpx;
border-radius: 999rpx;
background: #10b981;
color: #ffffff;
font-size: 26rpx;
font-weight: 700;
}
.mall-bar-btn.is-disabled {
background: rgba(255, 255, 255, 0.24);
color: rgba(255, 255, 255, 0.6);
}
.mall-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1000;
display: flex;
align-items: flex-end;
background: rgba(9, 9, 11, 0.45);
}
.mall-sheet {
width: 100%;
max-height: 86vh;
display: flex;
flex-direction: column;
box-sizing: border-box;
padding: 24rpx 28rpx calc(28rpx + env(safe-area-inset-bottom));
border-radius: 28rpx 28rpx 0 0;
background: #ffffff;
}
/* 整个弹层只有一个滚动区(头部与底部按钮固定),避免嵌套滚动条 */
.mall-sheet-body {
flex: 1;
min-height: 0;
max-height: calc(86vh - 220rpx);
}
.mall-sheet-head {
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 8rpx;
}
.mall-sheet-title {
font-size: 30rpx;
font-weight: 700;
color: #0f172a;
}
.mall-sheet-close {
padding: 8rpx 4rpx 8rpx 24rpx;
font-size: 26rpx;
color: #64748b;
}
.mall-sheet-items {
margin: 8rpx 0 4rpx;
padding: 12rpx 20rpx;
border-radius: 16rpx;
background: #f8fafc;
box-sizing: border-box;
}
.mall-sheet-item {
display: flex;
flex-direction: row;
align-items: center;
gap: 8rpx;
padding: 14rpx 0;
border-bottom: 1rpx solid #eef2f7;
font-size: 24rpx;
color: #334155;
}
.mall-sheet-item:last-child {
border-bottom: none;
}
.mall-sheet-item-name {
flex: 0 1 auto;
max-width: 200rpx;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.mall-sheet-item-qty {
flex-shrink: 0;
color: #64748b;
}
.mall-item-field {
height: 48rpx;
padding: 0 10rpx;
box-sizing: border-box;
border-radius: 10rpx;
background: #ffffff;
border: 1rpx solid #e2e8f0;
font-size: 22rpx;
color: #334155;
}
.mall-item-method {
position: relative;
flex: none;
width: 148rpx;
}
.mall-item-method-input {
width: 100%;
padding-right: 28rpx;
}
.mall-item-method-pick {
position: absolute;
top: 0;
right: 0;
bottom: 0;
}
.mall-item-method-arrow {
width: 28rpx;
height: 48rpx;
line-height: 48rpx;
text-align: center;
font-size: 18rpx;
color: #94a3b8;
}
.mall-sheet-item-amount {
flex-shrink: 0;
min-width: 96rpx;
text-align: right;
font-weight: 600;
color: #0f172a;
}
.mall-item-remark {
flex: 1 1 200rpx;
min-width: 160rpx;
width: auto;
}
.mall-field {
display: flex;
align-items: center;
justify-content: space-between;
gap: 20rpx;
padding: 20rpx 0;
border-bottom: 1rpx solid #f4f4f5;
}
.mall-field--address {
flex-direction: column;
align-items: stretch;
gap: 8rpx;
}
.mall-input--address {
width: 100%;
height: 64rpx;
padding: 0 16rpx;
box-sizing: border-box;
border-radius: 12rpx;
background: #f8fafc;
border: 1rpx solid #e2e8f0;
font-size: 24rpx;
color: #334155;
text-align: left;
}
.mall-label {
flex-shrink: 0;
font-size: 26rpx;
color: #475569;
}
.mall-value {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 26rpx;
color: #0f172a;
text-align: right;
}
.mall-input {
flex: 1;
min-width: 0;
font-size: 26rpx;
text-align: right;
}
.mall-sheet-actions {
flex-shrink: 0;
display: flex;
gap: 20rpx;
margin-top: 20rpx;
}
.mall-btn {
flex: 1;
text-align: center;
padding: 22rpx 0;
border-radius: 999rpx;
font-size: 28rpx;
font-weight: 700;
}
.mall-btn--ghost {
color: #475569;
background: #f4f4f5;
}
.mall-btn--primary {
color: #ffffff;
background: #059669;
}