| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <!--pages/cart/cart.wxml-->
- <import src="cart.skeleton.wxml" />
- <template is="skeleton" wx:if="{{loading}}" />
- <view class="noLogin" wx:if="{{(userInfo && cartList.length == 0) || !userInfo.userId}}">
- <image src="/images/cartEmpty.png" style="width: 360rpx;height: 360rpx;" mode="heightFix"></image>
- <!-- <view class="iconfont icon-gouwuchequeshengye1" style="font-size: 150rpx;"></view> -->
- <view>空空如也 <text wx:if="{{!userInfo || !userInfo.userId}}" class="iconfont keyboard_arrow_right loginText" bind:tap="toLogin">去登录</text></view>
- </view>
- <view wx:else="{{loading == false}}" class="cartList">
- <view wx:if="{{cartList.length > 0}}" class="topToolBar">
- <view class="iconfont {{checkAll ? 'icon-Check' : 'icon-weixuan'}} switch-icon {{checkNum > 0 ? 'active' : ''}}" data-all="{{true}}" bind:tap="switchChange">{{checkAll ? '全选' : '已选'}}({{checkNum}})</view>
- <view class="iconfont icon-shanchu {{checkNum>0?'active':''}}" bind:tap="delBtn"></view>
- </view>
- <view class="goodsInfo {{item.isTouchMove ? 'touch-move-active' : ''}}" wx:for="{{cartList}}" wx:key="goodsId" wx:for-index="index" data-index="{{index}}" bindtouchstart="touchstart" bindtouchmove="touchmove" bindtouchend="touchE">
- <!-- <switch class="wx-switch-input" type="checkbox" checked="{{true}}" bindchange="switch1Change" color="#00BC8A" /> -->
- <view class="content">
- <view class="iconfont {{item.check ? 'icon-Check' : 'icon-weixuan'}} switch-icon" data-index="{{index}}" bind:tap="switchChange"></view>
- <image src="{{item.picArr ? (!item.picArr[0] ? '/images/empty.png' : item.picArr[0]) : '/images/empty.png'}}" mode="aspectFit" data-item="{{item}}" catch:tap="toGoods"></image>
- <view class="goods">
- <view class="name text2" data-item="{{item}}" catch:tap="toGoods">{{item.picTitle}}</view>
- <view class="brief text2" data-item="{{item}}" catch:tap="toGoods">{{item.simpleTitle || ''}}</view>
- <view class="brief text2">可供库存:{{item.usableStocks}}</view>
- <view class="priceTool">
- <view><text class="rmb2">¥</text>{{item.price || 0}}</view>
- <view class="number">
- <view class="iconfont icon-Less1" style="{{item.qty == 1 ? 'color:#E6E6E6;' : ''}}" data-index="{{index}}" bind:tap="jianNum"></view>
- <input value="{{item.qty}}" data-index="{{index}}" disabled readonly />
- <view class="iconfont icon-More" data-index="{{index}}" bind:tap="jiaNum" style="{{(item.qty > item.usableStocks || item.qty == item.limitQty) ? 'color:#E6E6E6;' : ''}}"></view>
- </view>
- </view>
- </view>
- </view>
- <view class="del">
- <view class='delete' data-item="{{item}}" catch:tap="delBtn1">删除</view>
- </view>
- </view>
- <view style="height: 300rpx;"></view>
- <view wx:if="{{cartList.length > 0}}" class="toolBar">
- <view class="iconfont {{checkAll ? 'icon-Check' : 'icon-weixuan'}} switch-icon {{checkNum > 0 ? 'active' : ''}}" data-all="{{true}}" style="padding-left: 0;" bind:tap="switchChange">{{checkAll ? '全选' : '已选'}}({{checkNum}})</view>
- <view class="priceInfo">合计:<view><text class="rmb2">¥</text>{{checkPrice || 0}}</view>
- </view>
- <view class="nextBtn" bind:tap="nextBtn">下一步</view>
- </view>
- </view>
- <tabbar></tabbar>
|