49 lines
1.5 KiB
Plaintext
49 lines
1.5 KiB
Plaintext
![]() |
<view class="box">
|
||
|
<checkbox-group bindchange="onChange">
|
||
|
<view class="box3">
|
||
|
<block a:for="{{productList}}" a:key="id">
|
||
|
<view class="box1">
|
||
|
<view class="box4">
|
||
|
<label>
|
||
|
<!-- Use selectedItems[index] to check whether the item is selected -->
|
||
|
<checkbox
|
||
|
color="red"
|
||
|
checked="{{selectedItems[index]}}"
|
||
|
data-index="{{index}}"
|
||
|
/>
|
||
|
</label>
|
||
|
</view>
|
||
|
<image class="image" mode="scaleToFill" src="{{item.commoditiesImage}}" />
|
||
|
<view class="box5">
|
||
|
<view>
|
||
|
<text class="text" style="font-size:20px">{{item.commoditiesName}}</text>
|
||
|
</view>
|
||
|
<view>
|
||
|
<text class="text" style="font-size:15px">¥{{item.commoditiesPrice}}</text>
|
||
|
</view>
|
||
|
<view class="container">
|
||
|
<stepper defaultValue="{{0}}" min="{{1}}" max="{{999}}" step="{{1}}" />
|
||
|
</view>
|
||
|
</view>
|
||
|
<text style="font-size:12px;color:#a8b0b8" onTap="yichu" data-id="{{item.cartId}}">移除购物车</text>
|
||
|
</view>
|
||
|
</block>
|
||
|
</view>
|
||
|
</checkbox-group>
|
||
|
|
||
|
<view class="boxall">
|
||
|
<!-- Bind checkbox group for "select all" with the same logic -->
|
||
|
<checkbox
|
||
|
checked="{{checkAll}}"
|
||
|
bindchange="onCheckAllChange"
|
||
|
color="red"
|
||
|
>
|
||
|
全选
|
||
|
</checkbox>
|
||
|
<text class="text2">合计:¥{{totalPrice}}</text>
|
||
|
<view class="boxd">
|
||
|
<text class="text1">结算</text>
|
||
|
</view>
|
||
|
</view>
|
||
|
</view>
|