shopcar.wxml 2.7 KB
<!-- <import src="../template/template.wxml" />
<template is="tabBar" data='{{num:num}}' /> -->

<!-- 购物车为空 -->

<view class="cartkong" wx:if="{{items.length==0}}">
  <view class="cartimg">
    <image src="../../img/aicon_06@2x.png"></image>
  </view>

  <view class="cartname">购物车内还没有商品哦~</view>
  <view class="clearshop guang">去逛逛</view>
</view>

<!-- 购物车列表 -->
<block wx:else>
  <view class="container">
    <view class="touch-item {{item.isTouchMove ? 'touch-move-active' : ''}}" data-index="{{index}}" bindtouchstart="touchstart" bindtouchmove="touchmove" wx:for="{{items}}" wx:key="">
      <view class="shopcarlsit content">
        <view class="selectimg" catchtap='select' data-idx="{{index}}" data-id="{{item.id}}">
          <image src="{{item.select==true?'../../img/aicon_35@2x.png':'../../img/aicon_02@2x.png'}}"></image>
        </view>
        <view class="shocarpimg">

          <view class="shopitemimg">
            <image src="../../img/tu@2x.png"></image>
          </view>

          <view class="shopremainnum">仅剩5件</view>
        </view>

        <view class="shopcarmem">


          <view class="shopcarinfo">
            <view class="shopcarname">办公足踏系统</view>
            <view class="shopcarcolor">颜色:深蓝色</view>
          </view>

          <view class="shopcarplace">
            <view class="shopcarprice">¥{{item.sell_price}}</view>
            <view class="shopcarnum">
              <view class="reduceimg" catchtap="reducenum" data-index="{{index}}" data-id="{{item.id}}">
                <image src="../../img/aicon_05@2x.png"></image>
              </view>
              <view class="carnum">{{item.number}}</view>

              <view class="addimg" catchtap="add" data-index="{{index}}" data-id="{{item.id}}">
                <image src="../../img/aicon_03@2x.png"></image>
              </view>
            </view>
          </view>
        </view>
      </view>
      <view class="del" catchtap="del" data-index="{{index}}">删除</view>
    </view>

    <view class="clearshop">清空失效商品</view>



  </view>
</block>

<view class="backbottom">
  <view class="sunbottom">

    <view class="selectname">
      <view class="selectimg" bindtap="selectallgood">
        <image src="{{allselect==true?'../../img/aicon_35@2x.png':'../../img/aicon_02@2x.png'}}"></image>
      </view>

      <view class="allname">全选</view>
    </view>

    <view class="total">
      <text class="totalname">合计</text>
      <text class="totalmonet">¥{{money}}</text>
    </view>
    <view class="gosub" wx:if="{{type==2}}" bindtap="gotap">去提交</view>

     <view class="gosub" wx:else bindtap="jeisuan">去结算</view>


  </view>
</view>