cart.wxml 3.9 KB
<!-- 删除购物车成功 -->
<view class="register" bindtap="hidedel" wx:if="{{delshow}}">
  <view class="delwrap">
    <view class="delsuccess">
      <image src='/img/delsuccess.png'></image>
    </view>

    <view class="delname">删除成功</view>
  </view>
</view>

<!-- 是否删除购物车 -->

<view class="register" wx:if="{{hidedelcart}}" bindtap="hidecart">
  <view class="delcartwrap">
    <view class="delcatname">确认你已选中的商品删除吗</view>
    <view class="delbottom">
      <view class="delbottomleft" catchtap='cancelhidecar'>取消</view>
      <view class="delbottomright" catchtap='surecancelcar'>确定</view>
    </view>

  </view>
</view>

<view class="manage" bindtap="manage">
    <view class="manageitem">
        <view class="manageimg">
            <image src="/img/seetingimger.png"></image>
        </view>
        <view class="guanli" wx:if="{{delalldshow==false}}">管理</view>
        <view class="guanli" wx:else>完成</view>
    </view>
</view>

<view class="nodata" wx:if="{{cartlist.length==0}}">暂无数据</view>

<view class="cartbox" wx:else>
  <view class="cartboxitem" wx:for="{{cartlist}}" wx:key=''>
    <view class="xuancar" bindtap="selcart" data-id="{{item.id}}">
    <view class="cartboxitemleft" >
      <image src="/img/nosel.png" wx:if="{{item.sel==false}}"></image>
       <image src="/img/selcart.png" wx:else></image>
    </view>
    </view>
    
    <view class="cartboxitemright">
      <view class="goodkindbox">
        <view class='goodkindrightitemleft'>
          <view class="goodkindleftimg">
            <image src="{{item.image}}"></image>
          </view>
          <view class="xiename">
            <view class="xienameleft">
              <image src="/img/good.png"></image>
            </view>
            <view class="goodname">{{item.goods_name}}</view>
          </view>
        </view>
        <view class="songk">
          <image src="/img/send.png"></image>
        </view>
        <view class='goodkindrightitemleft'>
          <view class="goodkindleftimg">
            <image src="{{item.gift.image}}"></image>
          </view>
          <view class="xiename">
            <view class="xienameleft">
              <image src="/img/zeng.png"></image>
            </view>
            <view class="goodname">{{item.gift.goods_name}}</view>
          </view>
        </view>
      </view>


      <view class="goodkindprice">
        <view class="goodkindpriceleft">
          ¥{{item.price}}
        </view>
        <view class="goodkindpriceright" wx:if="{{item.freight=='0.00'}}">运费:免运费</view>
        <view class="goodkindpriceright" wx:else>运费:{{item.freight}}元</view>

        <view class="goodkindpriceright" wx:if="{{item.gift.freight=='0.00'}}">运费:免运费</view>
        <view class="goodkindpriceright" wx:else>运费:{{item.gift.freight}}元</view>



      </view>

      <view class="goodkind">
        <view class="goodkindnum">
          <view class="goodkindnumleft" bindtap="reducecartnum" data-id="{{item.id}}">
            <image src="/img/jian.png"></image>
          </view>
          <view class="goodnum">{{item.number}}</view>
          <view class="goodkindnumleft" bindtap="addcartnum" data-id="{{item.id}}">
              <image src="/img/add.png"></image>
          </view>
        </view>
      </view>
    </view>
  </view>
</view>
<view class="cartbottom" wx:if="{{delalldshow}}">
  <view class="cartbottomleft">
    <view class="cartbottomleftsel" bindtap="selquan">
     <image src="/img/selcart.png" wx:if="{{selall}}"></image>
      <image src="/img/nosel.png" wx:else></image>
     
    </view>
    <view class="cartbottomleftname">全选</view>
  </view>

  <view class="cartbottomright" bindtap="delcart">删除</view>
</view>

<view class="cartbottom" wx:else>
  <view class="cartbottomleft">
    <view class="totalmoney">总计:{{totalmoney}}</view>
  </view>

  <view class="cartbottomright" bindtap="jiesuan">结算</view>
</view>