diff --git a/src/pages/share/order.vue b/src/pages/share/order.vue index b4f091c..543e33b 100644 --- a/src/pages/share/order.vue +++ b/src/pages/share/order.vue @@ -50,7 +50,8 @@ 商品明细 - 商品 + 商品信息 + 总面积(m²) 数量 单价 小计 @@ -60,10 +61,11 @@ :key="index" class="item-row" > - {{ item.productName }} + {{ item.productName }}{{ item.productSpec ? ' ' + item.productSpec : '' }}\n{{ item.length || '-' }}x{{ item.width || '-' }} + {{ calcArea(item) }} {{ item.quantity }} ¥{{ item.price }} - ¥{{ (item.price * item.quantity).toFixed(2) }} + ¥{{ (item.price * item.quantity).toFixed(0) }} @@ -153,6 +155,12 @@ export default { formatTime(time) { if (!time) return '' return time.substring(0, 16).replace('T', ' ') + }, + calcArea(item) { + if (item.length && item.width && item.quantity) { + return (item.length * item.width * item.quantity / 1000000).toFixed(4) + } + return '-' } } } @@ -284,9 +292,10 @@ export default { .item-row { display: flex; - padding: 20rpx 0; + padding: 16rpx 0; border-bottom: 1rpx solid #f8f8f8; - font-size: 26rpx; + font-size: 24rpx; + align-items: center; } .item-row.header { @@ -295,12 +304,32 @@ export default { color: #666; } -.item-name { - flex: 2; +.item-info { + flex: 3; + white-space: pre-line; + font-size: 24rpx; + color: #333; + line-height: 1.6; +} + +.item-name-text { + color: #333; + font-weight: 500; +} + +.item-spec-text { + color: #999; +} + +.item-area { + flex: 1.2; + text-align: center; + color: #667eea; + font-weight: 500; } .item-qty { - flex: 1; + flex: 0.8; text-align: center; }