<view class="mall-container">
    <page-loding wx:if="{{showLoding}}"></page-loding>
    <active-window hotsale="{{hotsale}}"></active-window>
    <view class="search">
        <navigator class="hd-search" url="/pages/goodsSearch/goodsSearch">
            <image src="/img/search.png"></image> 搜索好物</navigator>
    </view>
    <view class="page-header">
        <view class="user-info">
            <navigator class="not-login" hoverClass="hover" url="/pages/login/login" wx:if="{{user.uid==0}}">
                <image class="avatar"></image>点击登录 </navigator>
            <view class="is-login" wx:if="{{user.uid>0}}">
                <navigator class="l" hoverClass="hover" url="/pages/user/user">
                    <image class="avatar" src="{{user.avatar}}"></image>{{user.nickname||user.username}} </navigator>
                <navigator class="r" hoverClass="hover" url="/pages/orderList/orderList?tab=all">
                    <view class="num">{{user.ordernum}}</view>
                    <view>订单</view>
                </navigator>
            </view>
        </view>
    </view>
    <view class="module-wrap" wx:if="{{banner.length>0}}">
        <view class="ad-wrap">
            <view class="list">
                <swiper>
                    <swiper-item wx:for="{{banner}}" wx:key="index">
                        <view class="item">
                            <navigator class="inner" url="/{{item.link}}">
                                <image src="{{item.image}}"></image>
                            </navigator>
                        </view>
                    </swiper-item>
                </swiper>
            </view>
        </view>
    </view>
    <popular-recommendation list="{{recommendedList}}" wx:if="{{recommendedList.length>0}}"></popular-recommendation>
    <view class="module-wrap">
        <view class="recommend-tabs">
            <view class="item {{tab==item.type?'active':''}}" wx:for="{{tabList}}" wx:key="index">
                <view bindtap="changeTab" data-tab="{{item.type}}" style="position: relative;">{{item.name}}</view>
            </view>
        </view>
        <goods-list isdistance="{{tab=='shortrange'?true:false}}" list="{{lists}}"></goods-list>
        <view class="loading" wx:if="{{loading}}">正在加载...</view>
        <view class="van-list__finished-text" wx:if="{{page==0&&!loading}}">没有更多了</view>
    </view>
</view>
