card.wxml 2.87 KB
<!--components/2.0/seller/card.wxml-->
<wxs src="../../../utils/util.wxs" module="util" />
<view class="view seller padding-sm padding-bottom-xs margin-sm {{activeSellerID==sellerx.id?'active':''}}">
    <view class="view flex avatar-block">
        <view class="view avatar">
            <image src="{{sellerx.seller_image?sellerx.seller_image+'?imageView2/2/w/320/interlace/0/q/100':'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'}}" class="avatar-image" mode="aspectFill" lazy-load></image>
            <view class="avatar-txt text-white text-xs text-center text-cut" wx:if="{{sellerx.brand.name}}">{{sellerx.brand.name}}</view>
        </view>
        <view class="view detail margin-left-sm flex-treble margin-top-sm text-cut">
            <view class="view flex align-center justify-between" style="height: 52rpx;">
                <view class="view title text-bold text-cut margin-right-sm">{{sellerx.sellername}}</view>
                <view class="view text-gray" style="font-size: 26rpx;">{{util.distance(sellerx.distance||sellerx.distance_centre)}}</view>
            </view>
            <view class="view flex align-center justify-between text-gray margin-top-xs" style="height: 36rpx;">
                <view class="view caixi text-cut">
                    <view class="view text-cut">{{sellerx.cateStr}}</view>
                </view>
                <view class="view renjun flex margin-left-lg align-center" wx:if="{{sellerx.average>0}}">
                    <view class="text-22">¥</view>
                    <view class="text-26" style="margin: 0 4rpx;">{{sellerx.average}}</view>
                    <view class="text-22">/人</view>
                </view>
            </view>
            <view class="view flex align-center margin-top-xs active" style="height: 36rpx;">
                <block wx:for="{{sellerx.activity}}" wx:key="selleractivitykey" wx:if="{{index<3}}">
                    <view class="cu-tag line-yellow view">
                        <text class="text-orange">{{(item.type==2?'满赠':item.title)}}</text>
                    </view>
                </block>
            </view>
        </view>
    </view>
    <view class="view flex align-center justify-between margin-top-sm reserve-view">
        <view class="view rooms flex-treble flex" style="overflow-x: auto">
            <block wx:for="{{sellerx.class}}" wx:key="seclass">
                <view
                        data-cid="{{item.id}}" data-cname="{{item.name}}"
                        class="cu-tag round line-blue text-blue view">{{item.name}}</view>
            </block>
            <view class="cu-tag round line-white text-blue view cu-tag-end"></view>
        </view>
        <view class="view button-view flex justify-end" catchtap="reserve">
            <view class="cu-btn bg-blue text-white round reserve-button text-df text-bold view padding-xs">订包间</view>
        </view>
    </view>
</view>