29 lines
1.2 KiB
Plaintext
29 lines
1.2 KiB
Plaintext
![]() |
<view class="cart-container">
|
||
|
<block wx:for="{{ cartItems }}" wx:key="id">
|
||
|
<view class="cart-item">
|
||
|
<checkbox class="item-checkbox" checked="{{ item.selected }}" data-id="{{ item.id }}" bindtap="toggleSelection"></checkbox>
|
||
|
<image src="{{ item.image }}" class="item-image"></image>
|
||
|
<view class="item-details">
|
||
|
<text class="item-name">{{ item.name }}</text>
|
||
|
<view class="item-footer">
|
||
|
<text class="item-price">¥{{ item.price }}</text>
|
||
|
<view class="quantity-control">
|
||
|
<button bindtap="decreaseQuantity" data-id="{{ item.id }}">-</button>
|
||
|
<text>{{ item.quantity }}</text>
|
||
|
<button bindtap="increaseQuantity" data-id="{{ item.id }}">+</button>
|
||
|
</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</block>
|
||
|
<view class="checkout-bar">
|
||
|
<view class="select-all">
|
||
|
<checkbox class="select-all-checkbox" checked="{{ allSelected }}" bindtap="toggleAllSelection"></checkbox>
|
||
|
<text>全选</text>
|
||
|
</view>
|
||
|
<view class="total-and-checkout">
|
||
|
<text>总计: ¥{{ total }}</text>
|
||
|
<button bindtap="checkout">去结算({{ total_goods }})</button>
|
||
|
</view>
|
||
|
</view>
|
||
|
</view>
|