1 |
- <view class="container"><block wx:if="{{!hasLogin||empty===true}}"><view class="empty"><image class="emptyImg" src="/static/error/emptyCart.png" mode="aspectFit"></image><block wx:if="{{hasLogin}}"><view class="empty-tips">空空如也<block wx:if="{{hasLogin}}"><navigator class="navigator" url="../index/index" open-type="switchTab">随便逛逛></navigator></block></view></block><block wx:else><view class="empty-tips">空空如也<view data-event-opts="{{[['tap',[['navToLogin',['$event']]]]]}}" class="navigator" bindtap="__e">去登陆></view></view></block></view></block><block wx:else><view><view class="cart-hand flex"><view class="hand-tit">购物车共<text>{{' '+cartList.length+" 件"}}</text>商品</view><view data-event-opts="{{[['tap',[['clearCart']]]]}}" class="hand-btn" bindtap="__e">清空购物车</view></view><view class="cart-list"><block wx:for="{{cartList}}" wx:for-item="item" wx:for-index="index" wx:key="id"><block><view class="{{['cart-item',(index!==cartList.length-1)?'b-b':'']}}"><view class="image-wrapper"><image class="{{[item.loaded]}}" src="{{item.productInfo.image}}" mode="aspectFill" lazy-load="{{true}}" data-event-opts="{{[['load',[['onImageLoad',['cartList',index]]]],['error',[['onImageError',['cartList',index]]]]]}}" bindload="__e" binderror="__e"></image><view data-event-opts="{{[['tap',[['check',['item',index]]]]]}}" class="{{['iconfont','iconroundcheckfill','checkbox',(item.checked)?'checked':'']}}" bindtap="__e"></view></view><view class="item-right"><text class="clamp title">{{item.productInfo.store_name}}</text><text class="attr">{{item.productInfo.attrInfo.suk}}</text><text class="price">{{"¥"+item.productInfo.price}}</text><view class="munbox flex"><image src="../../static/icon/reduce.png" mode data-event-opts="{{[['tap',[['reduce',['$0',index],[[['cartList','id',item.id]]]]]]]}}" bindtap="__e"></image><input type="number" disabled="{{true}}" value="{{item.cart_num}}"/><image src="../../static/icon/add.png" mode data-event-opts="{{[['tap',[['add',['$0'],[[['cartList','id',item.id]]]]]]]}}" bindtap="__e"></image></view></view></view></block></block></view><view class="action-section"><view class="checkbox"><view data-event-opts="{{[['tap',[['check',['all']]]]]}}" class="{{['iconfont','iconroundcheckfill','icon-checked-box',(allChecked)?'icon-checked':'']}}" bindtap="__e"></view></view><view class="total-box"><text class="price">{{"¥"+total}}</text></view><button class="no-border confirm-btn" type="primary" data-event-opts="{{[['tap',[['createOrder',['$event']]]]]}}" bindtap="__e">去结算</button></view></view></block></view>
|