Commit 7eb5ec67 by chenwq

优化拍卖卡片组件,调整数据处理逻辑,更新样式和展示内容

1 parent 9db31456
...@@ -4,9 +4,20 @@ Component({ ...@@ -4,9 +4,20 @@ Component({
type: Object, type: Object,
value: {}, value: {},
observer: function (newVal) { observer: function (newVal) {
if (newVal && newVal.status != null) { if (newVal) {
if (newVal.status != null) {
this.generateButtons(newVal.status); this.generateButtons(newVal.status);
} }
if (newVal.createTime && !newVal.createTimeStr) {
const timeParts = newVal.createTime.split(' ')[0].split('-');
if (timeParts.length === 3) {
const createTimeStr = `${parseInt(timeParts[1], 10)}/${parseInt(timeParts[2], 10)}`;
this.setData({
['item.createTimeStr']: createTimeStr
});
}
}
}
} }
}, },
statusMap: { statusMap: {
......
...@@ -116,36 +116,35 @@ ...@@ -116,36 +116,35 @@
.info-grid { .info-grid {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
background: #f9f9f9; background: #E7E7E733;
border-radius: 8rpx; border-radius: 16rpx;
padding: 24rpx; padding: 24rpx;
margin-bottom: 24rpx;
.grid-item { .grid-item {
flex: 1; flex: 1;
text-align: center;
.label { .label {
font-size: 22rpx; font-size: 24rpx;
color: #999999; color: #00000099;
margin-bottom: 8rpx; margin-bottom: 8rpx;
} }
.value { .value {
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #000000E5;
font-weight: 500; font-weight: 600;
&.price { &.price {
color: #e34d59; color: #EE3140;
font-size: 36rpx; font-size: 36rpx;
.unit {
font-size: 24rpx;
}
.unit-w { .unit-w {
font-size: 24rpx; font-size: 24rpx;
} }
} }
&.p-t-4 {
padding-top: 4rpx;
}
} }
} }
} }
......
...@@ -31,11 +31,11 @@ ...@@ -31,11 +31,11 @@
</view> </view>
<view class="grid-item"> <view class="grid-item">
<view class="label">里程</view> <view class="label">里程</view>
<view class="value">{{item.mileage || '0'}}万公里</view> <view class="value p-t-4">{{item.mileage || '0'}}万公里</view>
</view> </view>
<view class="grid-item"> <view class="grid-item">
<view class="label">申请时间</view> <view class="label">申请时间</view>
<view class="value">{{item.createTime || '--'}}</view> <view class="value p-t-4">{{item.createTimeStr || '--'}}</view>
</view> </view>
</view> </view>
</view> </view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!