You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
3.7 KiB
1 line
3.7 KiB
<view><block wx:if="{{cartGoods.length==0}}"><view class="text-center">购物车空了!!</view></block><block wx:else><view class="cart-top flex justify-between bg-white"><view></view><view data-event-opts="{{[['tap',[['editCart',['$event']]]]]}}" bindtap="__e">{{isEdit?'取消编辑':'编辑商品'}}</view></view><view style="height:80rpx;"></view><view class="cart-shop-box"><block wx:for="{{cartGoods}}" wx:for-item="shop" wx:for-index="shopIndex" wx:key="shopIndex"><view class="cart-shop-item bg-white"><view class="shop-name-box flex align-center"><text data-event-opts="{{[['tap',[['checkShop',[shopIndex]]]]]}}" class="{{[shop.shopChecked?'cuIcon-roundcheckfill text-red':'cuIcon-round text-gray']}}" bindtap="__e"></text><image class="shop-logo" src="{{IMAGE_URL+shop.brandLogo}}" mode="widthFix"></image><view class="shop-name">{{shop.brandName}}</view></view><view class="cart-goods-box"><block wx:for="{{shop.children}}" wx:for-item="goods" wx:for-index="goodsIndex" wx:key="goodsIndex"><view class="cart-goods-item flex justify-between align-start"><view class="flex align-center" style="height:200rpx;"><text data-event-opts="{{[['tap',[['checkGoods',[shopIndex,goodsIndex]]]]]}}" class="{{[goods.goodsChecked?'cuIcon-roundcheckfill text-red':'cuIcon-round text-gray']}}" bindtap="__e"></text></view><navigator class="cart-goods-pic bg-img" style="{{('background-image: url('+IMAGE_URL+goods.mainPhotoUrl+');')}}" url="{{'/pages/goodsDetail/goodsDetail?id='+goods.goodsId}}"></navigator><view class="cart-goods-msg flex-sub"><view class="msg-top flex flex-direction justify-between clear align-start"><view><view class="cart-goods-name">{{goods.goodsName}}</view><text class="cart-goods-spec">{{goods.skuName}}</text></view><view class="text-red tip">{{"赚"+goods.commission}}</view></view><view class="msg-bottom flex justify-between" style="line-height:50rpx;padding-top:15rpx;"><view class="flex"><text class="text-red" style="font-size:30rpx;">{{"¥"+goods.price}}</text><text style="text-decoration:line-through;font-size:20rpx;margin-left:5rpx;color:#898989;">{{"¥"+goods.originalPrice}}</text></view><u-number-box vue-id="{{'1775f8c0-1-'+shopIndex+'-'+goodsIndex}}" min="{{1}}" input-width="{{72}}" size="{{24}}" value="{{goods.quantity}}" data-event-opts="{{[['^change',[['changeNum',['$0','$1'],[[['cartGoods','',shopIndex],['children','',goodsIndex,'shoppingTrolleyId']],[['cartGoods','',shopIndex],['children','',goodsIndex,'quantity']]]]]],['^input',[['__set_model',['$0','quantity','$event',[]],[[['cartGoods','',shopIndex],['children','',goodsIndex]]]]]]]}}" bind:change="__e" bind:input="__e" bind:__l="__l"></u-number-box></view></view></view></block></view></view></block></view><view class="cart-bottom bg-white flex justify-between align-center"><view data-event-opts="{{[['tap',[['selectAll',['$event']]]]]}}" class="all-select-box flex align-center" bindtap="__e"><text class="{{[allChecked?'cuIcon-roundcheckfill text-red':'cuIcon-round text-gray']}}"></text><view style="font-size:28rpx;margin-left:10rpx;">全选</view></view><view class="flex align-center"><view style="margin-right:30rpx;"><block wx:if="{{isEdit}}"><view>{{"已选择"+totalNum+"件商品"}}</view></block><block wx:else><view style="font-size:28rpx;">{{"合计:¥"+totalPrice}}</view><view class="text-red" style="font-size:18rpx;">{{"赚"+totalCommission}}</view></block></view><block wx:if="{{isEdit}}"><button data-event-opts="{{[['tap',[['delGoods',['$event']]]]]}}" class="cu-btn text-white round bg-red" bindtap="__e">删除</button></block><block wx:else><button data-event-opts="{{[['tap',[['creatCartOrder',['$event']]]]]}}" class="cu-btn text-white round bg-red" bindtap="__e">{{"结算("+totalNum+")"}}</button></block></view></view></block></view> |