|
|
<view><view class="goods-list"><block wx:if="{{goodsList.length===0}}"><empty vue-id="1775f8c0-1" tip="购物车是空的哦" bind:__l="__l"></empty></block><block wx:for="{{goodsList}}" wx:for-item="row" wx:for-index="index" wx:key="index"><view class="row"><view data-event-opts="{{[['tap',[['deleteGoods',['$0'],[[['goodsList','',index,'id']]]]]]]}}" class="menu" catchtap="__e"><view class="icon shanchu"></view></view><view data-event-opts="{{[['touchstart',[['touchStart',[index,'$event']]]],['touchmove',[['touchMove',[index,'$event']]]],['touchend',[['touchEnd',[index,'$event']]]]]}}" class="{{['carrier',theIndex==index?'open':oldIndex==index?'close':'']}}" bindtouchstart="__e" bindtouchmove="__e" bindtouchend="__e"><block wx:if="{{row.kucun}}"><view data-event-opts="{{[['tap',[['selected',[index]]]]]}}" class="checkbox-box" bindtap="__e"><view class="checkbox"><view class="{{[row.selected?'on':'']}}"></view></view></view></block><block wx:if="{{!row.kucun}}"><view class="checkbox-box"><view class="sellq">售罄</view></view></block><view data-event-opts="{{[['tap',[['toGoods',['$0'],[[['goodsList','',index]]]]]]]}}" class="goods-info" bindtap="__e"><view class="img"><image src="{{row.img}}"></image></view><view class="info"><view class="title">{{row.mc}}</view><view class="spec">{{row.gg}}</view><view class="kucun">{{"库存 "+row.kucun}}</view><block wx:if="{{row.kucun}}"><view class="price-number"><view class="price">{{"¥"+row.price}}</view><view class="number"><view data-event-opts="{{[['tap',[['sub',[index]]]]]}}" class="sub" catchtap="__e"><view class="icon jian"></view></view><view data-event-opts="{{[['tap',[['discard',['$event']]]]]}}" class="input" catchtap="__e"><input type="number" data-event-opts="{{[['input',[['__set_model',['$0','num','$event',[]],[[['goodsList','',index]]]],['sum',['$event',index]]]]]}}" value="{{row.num}}" bindinput="__e"/></view><view data-event-opts="{{[['tap',[['add',[index]]]]]}}" class="add" catchtap="__e"><view class="icon jia"></view></view></view></view></block><block wx:if="{{!row.kucun}}"><view class="price-number"><view class="deltip">左滑可删除</view></view></block></view></view></view></view></block></view><view class="footer" style="{{'bottom:'+(footerbottom)+';'}}"><view data-event-opts="{{[['tap',[['allSelect',['$event']]]]]}}" class="checkbox-box" bindtap="__e"><view class="checkbox"><view class="{{[isAllselected?'on':'']}}"></view></view><view class="text">全选</view></view><block wx:if="{{selectedList.length>0}}"><view data-event-opts="{{[['tap',[['deleteList',['$event']]]]]}}" class="delBtn" bindtap="__e">删除</view></block><view class="settlement"><view class="sum">合计:<view class="money">{{"¥"+sumPrice}}</view></view><block wx:if="{{sumPrice>0&&sumPrice-startingPrice>=0}}"><view data-event-opts="{{[['tap',[['toConfirmation',['$event']]]]]}}" class="btn" bindtap="__e">{{"结算("+selectedList.length+")"}}</view></block><block wx:else><view class="btn btn_gray"><block wx:if="{{startingPrice>=0}}"><text>{{"差¥"+$root.f0+"起送"}}</text></block></view></block></view></view></view>
|