cart.wxml 1.7 KB
<view class="nodata" wx:if="{{carlist.length==0}}">
    购物车空空如也
</view>
<view class="carts" wx:else>
    <view class="cartitem" wx:for="{{carlist}}" wx:key="{{item.id}}">
        <view bindtap="selectList" class="cartbox" data-index="{{index}}" wx:if="{{item.selected}}">
            <view class=" iconfont icon-duihao-copy"></view>
        </view>
        <view bindtap="selectList" class="cartbox" data-index="{{index}}" wx:else></view>
        <navigator class="cartimg" url="../index/goodsdetail/goodsdetail?id={{item.gid}}">
            <image src="{{item.thumb}}"></image>
        </navigator>
        <view class="cartright">
            <view class="cartrightbox">
                <text class="cartname">{{item.name}}</text>
                <text bindtap="deleteList" class="del" data-index="{{index}}">删除</text>
            </view>
            <view class="cartrightbox">
                <text class="cartstandard">{{item.standard}}</text>
                <text class="del"></text>
            </view>
            <view class="cartrightbox">
                <view class="prices">¥{{item.pprice}}</view>
                <view class="stepper">
                    <text bindtap="bindMinus" class="minusStatus" data-index="{{index}}">-</text>
                    <input bindchange="bindManual" type="number" value="{{item.count}}"></input>
                    <text bindtap="bindPlus" class="normal" data-index="{{index}}">+</text>
                </view>
            </view>
        </view>
    </view>
</view>
<view class="payfor">
    <view>合计:¥{{totalPrice}}</view>
    <view bindtap="topay" class="paybtn">去结算
        <text class="paynum"> ({{totalnum}})</text>
    </view>
</view>