food-card.wxml 2.63 KB
<view class="flex-ll-top hasListModel" style="width:100%;">
    <view class="avatar">
        <image mode="aspectFill" lazy-load="true" src="{{item.image}}"/>
    </view>
    <view class="content">
        <view class="name Semibold">
            {{item.name}}
        </view>
        <view class="desc">
            {{item.desc||''}}
        </view>
        <view class="label">
            <block wx:if="{{item.labelList}}">
                <view class="menu-ptop-mark">
                    <block wx:for="{{item.labelList}}" wx:for-item="son" wx:key="labelList-key">
                        <image class="labelListImg" src="{{labelIcon[son.icon]||son.icon}}" mode="aspectFit"></image>
                    </block>
                </view>
            </block>
        </view>
        <view class="flex-lr price">
            <view class="flex-ll">
                <view class="rmb">¥</view>
                <view class="money">{{item.spec[0].price>0 ? item.spec[0].price : item.price}}</view>
            </view>
            <view class="opt flex-ll">
                <block wx:if="{{item_clear_num==0}}">
                    <image
                            class="avater"
                            src="http://qn.colorcun.com/custom/lite/image/clear.png"
                            style="width:41px;height:26px;margin-top:3px;position:relative;top:-2px;float:right;"
                            class="{{item.image?bg_white:bg_pink}}"/>
                </block>
                <block wx:else="">
                    <block wx:if="{{item.num>0}}">
                        <foodSpec item="{{item}}" type="-" id="foodSpecDel"
                                  sellerid="{{sellerid}}" orderid="{{orderid}}"
                                  fromSoucre="{{fromSoucre}}" request_uri="{{request_uri}}"
                                  bindfoodSpecCallback="foodSpecCallback">
                            <view class='jian'></view>
                        </foodSpec>
                        <view class="t-align-c">{{item.num}}</view>
                    </block>
                    <foodSpec item="{{item}}" type="+"
                              sellerid="{{sellerid}}" orderid="{{orderid}}"
                              fromSoucre="{{fromSoucre}}" request_uri="{{request_uri}}"
                              bindfoodSpecCallback="foodSpecCallback">
                        <view class='add'></view>
                    </foodSpec>
                </block>
            </view>
        </view>
        <view  wx:if="{{item_clear_num>0}}" style="padding:0rpx 10rpx;">
            <text class="food-clear-content">剩{{item_clear_num}}份</text>
        </view>
    </view>
</view>