Commit 7eb5ec67 by chenwq

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

1 parent 9db31456
......@@ -4,8 +4,19 @@ Component({
type: Object,
value: {},
observer: function (newVal) {
if (newVal && newVal.status != null) {
this.generateButtons(newVal.status);
if (newVal) {
if (newVal.status != null) {
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
});
}
}
}
}
},
......
......@@ -116,36 +116,35 @@
.info-grid {
display: flex;
justify-content: space-between;
background: #f9f9f9;
border-radius: 8rpx;
background: #E7E7E733;
border-radius: 16rpx;
padding: 24rpx;
margin-bottom: 24rpx;
.grid-item {
flex: 1;
text-align: center;
.label {
font-size: 22rpx;
color: #999999;
font-size: 24rpx;
color: #00000099;
margin-bottom: 8rpx;
}
.value {
font-size: 28rpx;
color: #333333;
font-weight: 500;
color: #000000E5;
font-weight: 600;
&.price {
color: #e34d59;
color: #EE3140;
font-size: 36rpx;
.unit {
font-size: 24rpx;
}
.unit-w {
font-size: 24rpx;
}
}
&.p-t-4 {
padding-top: 4rpx;
}
}
}
}
......
......@@ -31,11 +31,11 @@
</view>
<view class="grid-item">
<view class="label">里程</view>
<view class="value">{{item.mileage || '0'}}万公里</view>
<view class="value p-t-4">{{item.mileage || '0'}}万公里</view>
</view>
<view class="grid-item">
<view class="label">申请时间</view>
<view class="value">{{item.createTime || '--'}}</view>
<view class="value p-t-4">{{item.createTimeStr || '--'}}</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!