diff --git a/src/pages/product/select.vue b/src/pages/product/select.vue index 13251aa..ed84290 100644 --- a/src/pages/product/select.vue +++ b/src/pages/product/select.vue @@ -27,10 +27,13 @@ - + {{ item.name }} - {{ item.spec || '-' }} + + {{ item.spec || '-' }} + {{ item.length }} x {{ item.width }} = {{ item.area }} m² + ¥{{ item.price }} @@ -116,6 +119,12 @@ export default { this.getProducts() }, methods: { + selectProduct(item) { + const pages = getCurrentPages() + const prevPage = pages[pages.length - 2] + prevPage.$vm.addProduct(item) + uni.navigateBack() + }, calcArea() { const length = parseFloat(this.selectedProduct.length) || 0 const width = parseFloat(this.selectedProduct.width) || 0 @@ -278,6 +287,21 @@ export default { color: #999; } +.product-row { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 8rpx; +} + +.product-size { + font-size: 22rpx; + color: #667eea; + background: #f0f0ff; + padding: 2rpx 8rpx; + border-radius: 4rpx; +} + .product-price { text-align: right; }