Files
Smart-Farm/front/shop/pages/car.wxml
2025-12-22 17:13:05 +08:00

1 line
3.7 KiB
Plaintext

<block wx:if="{{isLoad}}"><view class="pages-shop"><block wx:for="{{shopCarList.list}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="{{['item-child','mb-md','ml-sm','mr-sm','pt-lg','pl-lg','pr-lg','fill-base','radius-24',[(index==0)?'mt-md':'']]}}"><view data-event-opts="{{[['tap',[['goDetail',[index]]]]]}}" class="flex-y-center mb-lg" bindtap="__e"><view class="iconfont icon-dianpu mr-sm _i"></view><view class="f-title c-title text-bold ellipsis">{{item.farmer_info.title}}</view><view class="iconfont icon-right _i"></view></view><block wx:for="{{item.goods_list}}" wx:for-item="aitem" wx:for-index="aindex" wx:key="aindex"><view data-event-opts="{{[['tap',[['toUpdateStatus',[index,aindex]]]]]}}" class="{{['flex-warp','pb-lg','b-1px-b',[(aindex!=0)?'pt-lg':'']]}}" catchtap="__e"><view class="{{['iconfont','flex-y-center','mr-md','_i',[(!aitem.status)?'icon-xuanze':''],[(aitem.status)?'icon-xuanze-fill':'']]}}" style="{{'color:'+(aitem.status?primaryColor:'')+';'}}"></view><image class="goods-img radius-16" mode="aspectFill" lazy-load="{{true}}" src="{{aitem.cover}}"></image><view class="flex-1 ml-md"><view class="goods-title f-title c-title text-bold ellipsis">{{''+aitem.goods_name+''}}</view><view class="flex-between mt-sm"><view class="goods-spe pl-sm pr-sm f-caption c-paragraph ellipsis radius-4">{{''+aitem.spe_name+''}}</view><view class="flex-1"></view></view><block wx:if="{{aitem.integral_id}}"><view class="f-desc c-warning mt-sm">{{''+(aitem.i_price*1>0?aitem.integral+'积分+'+aitem.i_price+'元':aitem.integral+'积分')+''}}</view></block><view class="{{['flex-between',[(!aitem.integral_id)?'mt-md':'']]}}"><view class="flex-y-baseline f-caption c-warning"><block wx:if="{{aitem.integral_id}}"><view class="f-caption c-caption mr-sm">商城价</view></block>¥<view class="f-title text-bold">{{''+aitem.price+''}}</view></view><view class="flex-warp"><view class="add-remove-item flex-center"><view data-event-opts="{{[['tap',[['toUpdateCar',['$0','$1','$2',-1],[[['shopCarList.list','',index],['goods_list','',aindex,'farmer_id']],[['shopCarList.list','',index],['goods_list','',aindex,'id']],[['shopCarList.list','',index],['goods_list','',aindex,'spe_id']]]]]]]}}" class="iconfont icon-remove-circle c-caption _i" catchtap="__e"></view><view class="number flex-center f-desc pl-sm pr-sm">{{aitem.goods_num+''}}</view><view data-event-opts="{{[['tap',[['toUpdateCar',['$0','$1','$2',1],[[['shopCarList.list','',index],['goods_list','',aindex,'farmer_id']],[['shopCarList.list','',index],['goods_list','',aindex,'goods_id']],[['shopCarList.list','',index],['goods_list','',aindex,'spe_id']]]]]]]}}" class="iconfont icon-add-circle _i" style="{{'color:'+(primaryColor)+';'}}" catchtap="__e"></view></view></view></view></view></view></block></view></block><block wx:if="{{$root.g0<=0}}"><abnor vue-id="3c9b8488-1" bind:__l="__l"></abnor></block><view class="space-footer"></view><block wx:if="{{$root.g1>0}}"><view class="fix footer-info flex-center"><view class="item-height flex-1 flex-between fill-base pl-lg pr-lg"><view data-event-opts="{{[['tap',[['toUpdateStatus',[-1]]]]]}}" class="flex-y-center" bindtap="__e"><view class="{{['iconfont','mr-md','_i',[(!shopCarList.selectAll)?'icon-xuanze':''],[(shopCarList.selectAll)?'icon-xuanze-fill':'']]}}" style="{{'color:'+(shopCarList.selectAll?primaryColor:'')+';'}}"></view>全选</view><view class="flex-y-baseline f-paragraph c-title" style="line-height:35rpx;">合计:<view class="f-title c-warning text-bold">{{'¥'+(shopCarList.car_price||0)+''}}</view></view></view><view data-event-opts="{{[['tap',[['goOrder',['$event']]]]]}}" class="item-height pay-btn flex-center f-sm-title c-base" style="{{'background:'+(primaryColor)+';'}}" bindtap="__e">去付款</view></view></block></view></block>