list.wxml 2.45 KB
<!--pages/customer/list.wxml-->
<nav hasHome>我的订单</nav>
<view class="tabs flex-lr">
    <view class="item {{tabType==1?'active':''}}" data-type="1" bindtap="switchType">等待确认</view>
    <view class="item {{tabType==2?'active':''}}" data-type="2" bindtap="switchType">预订成功</view>
    <view class="item {{tabType==3?'active':''}}" data-type="3" bindtap="switchType">历史订单</view>
    <view class="item {{tabType==4?'active':''}}" data-type="4" bindtap="switchType">无效预订</view>
</view>
<view class="page">
    <block wx:if="{{list[tabType].length==0}}">
        <view class="flex-vc empry">
            <image src="http://nosqn.colorcun.com/reserve/images/order-empty.png"></image>
            <view class="Medium">暂无订单</view>
        </view>
    </block>
    <block wx:else="">
        <block wx:for="{{list[tabType]}}" wx:key="success.key" wx:for-item="detail" wx:for-index="dateIndex">
            <view class="card">
                <card
                        hasShowStatus bindevent="gotoDetail"
                        seller="{{detail.seller}}" detail="{{detail}}"></card>
            </view>
        </block>
    </block>
</view>
<block wx:if="{{list[tabType].length==0 && rsl.length>0}}">
    <view class="rsl-block">
        <view class="line-push">为你推荐</view>
        <view class="transverse-list">
            <swiper
                    indicator-dots="{{false}}" autoplay="{{false}}" circular="{{false}}" vertical="{{false}}"
                    interval="2000" duration="500"
                    previous-margin="{{15}}px" next-margin="{{15}}px" style="height: 350rpx;"
                    current="{{current}}" bindchange="bindtransition" bindanimationfinish="bindtransition">
                <block wx:for="{{rsl}}" wx:key="rsl.key">
                    <swiper-item bindtap="gotoSellerDetail" id="{{item.id}}">
                        <view class="seller" id="seller-{{item.id}}">
                            <sb-tr seller="{{item}}"
                                   hasActivityTags="{{false}}"
                                   hasActivityShort="{{true}}"
                                   hasBrand="true" hasActivityTese="true"
                                   hasSlogan="{{false}}"></sb-tr>
                        </view>
                    </swiper-item>
                </block>
            </swiper>
        </view>
    </view>
</block>
<getpos bindpos="onpos" id="getpos" hasAllowFail hasAllowLoading="{{false}}"></getpos>