1234567891011121314151617181920212223242526272829303132333435363738 |
- <view class="container">
- <view class="empty" wx:if="{{!hasLogin||empty===true}}">
- <image class="emptyImg" mode="aspectFit" src="/static/error/emptyCart.png"></image>
- <view class="empty-tips" wx:if="{{hasLogin}}">空空如也<navigator class="navigator" openType="switchTab" url="../index/index" wx:if="{{hasLogin}}">随便逛逛></navigator>
- </view>
- <view class="empty-tips" wx:else>空空如也<view bindtap="__e" class="navigator" data-event-opts="{{[ [ 'tap',[ [ 'navToLogin',['$event'] ] ] ] ]}}">去登陆></view>
- </view>
- </view>
- <view wx:else>
- <view class="cart-list">
- <view class="{{['cart-item',index!==cartList.length-1?'b-b':'']}}" wx:for="{{cartList}}" wx:key="id">
- <view class="image-wrapper">
- <image binderror="__e" bindload="__e" class="{{[item.loaded]}}" data-event-opts="{{[ [ 'load',[ [ 'onImageLoad',['cartList',index] ] ] ],[ 'error',[ [ 'onImageError',['cartList',index] ] ] ] ]}}" lazyLoad="{{true}}" mode="aspectFill" src="{{item.productInfo.image}}"></image>
- <view bindtap="__e" class="{{['iconfont iconroundcheckfill checkbox',item.checked?'checked':'']}}" data-event-opts="{{[ [ 'tap',[ [ 'check',['item',index] ] ] ] ]}}"></view>
- </view>
- <view class="item-right">
- <text class="clamp title">{{item.productInfo.store_name}}</text>
- <text class="attr">{{item.attr_val}}</text>
- <text class="price">{{'¥'+item.truePrice}}</text>
- <uni-number-box bind:__l="__l" bind:eventChange="__e" class="step" data-event-opts="{{[ [ '^eventChange',[ ['numberChange'] ] ] ]}}" index="{{index}}" isMax="{{item.cart_num>=item.productInfo.stock?true:false}}" isMin="{{item.cart_num===1}}" max="{{item.productInfo.stock}}" min="{{1}}" value="{{item.cart_num>item.productInfo.stock?item.productInfo.stock:item.cart_num}}" vueId="{{'1775f8c0-1-'+index}}"></uni-number-box>
- </view>
- <text bindtap="__e" class="del-btn iconfont iconclose" data-event-opts="{{[ [ 'tap',[ [ 'deleteCartItem',[index] ] ] ] ]}}"></text>
- </view>
- </view>
- <view class="action-section">
- <view class="checkbox">
- <image bindtap="__e" data-event-opts="{{[ [ 'tap',[ [ 'check',['all'] ] ] ] ]}}" mode="aspectFit" src="{{allChecked?'/static/icon/selected.png':'/static/icon/select.png'}}"></image>
- <view bindtap="__e" class="{{['clear-btn',allChecked?'show':'']}}" data-event-opts="{{[ [ 'tap',[ [ 'e0',['$event'] ] ] ] ]}}">
- <text>清空</text>
- </view>
- </view>
- <view class="total-box">
- <text class="price">{{'¥'+total}}</text>
- </view>
- <button bindtap="__e" class="no-border confirm-btn" data-event-opts="{{[ [ 'tap',[ [ 'createOrder',['$event'] ] ] ] ]}}" type="primary">去结算</button>
- </view>
- </view>
- </view>
|