<!-- 搜索 -->
<block wx:if="{{goodsArr.length > 0}}">
    <form bindsubmit="searchForm" class="mallSearch">
        <view class="mallSearch-cont">
            <image class="mallSearch-cont-icon" src="https://storage.funnyzhibo.com/images/2020/05/06/search_icon.png"></image>
            <input class="search-navigator" placeholder="输入关键字" value="{{name}}" name="search" confirm-type="search" bindconfirm='confirmTap'></input>
            <button class="mallSearch-btn" form-type="submit">搜索</button>
        </view>
    </form>

    <!-- 分类 -->
    <view class="mallTag">
        <view class="mallTag-name {{ordertype == 'sales' ? 'active':''}}" data-type="sales" bindtap="orderTap">
            销量
            <!-- <image src="/static/icons/price_icon.png" wx:if="{{orderasc == 'asc'}}"></image>
        <image src="/static/icons/price_icon_active.png" wx:else></image> -->
        </view>
        <view class="mallTag-name {{ordertype == 'price' ? 'active':''}}" data-index="{{daindex}}" data-type="price" bindtap="orderTap">
            价格
            <block wx:if="{{orderasc != ''}}">
                <image src="/static/icons/price_icon.png" wx:if="{{orderasc == 'asc'}}"></image>
                <image src="/static/icons/price_icon_active.png" wx:else></image>
            </block>
            <block wx:else>
                <image src="/static/icons/price_nr.png"></image>
            </block>
        </view>
        <image class="mallTag-one" src="/static/icons/sort.png" bindtap="sortShow"></image>
    </view>

    <view class="goodsList">
        <view bindtap="detailsGo" data-id="{{item.goods_id}}" class="goodsItem" wx:for="{{goodsArr}}" wx:key="goodsArr">
            <view class="goodsItem-img">
                <image mode="aspectFill" src="{{item.cover}}"></image>
            </view>
            <view class="goodsItem-cont">
                <view class="nowrap goodsItem-name">{{item.name}}</view>
                <view class="nowrap goodsItem-text">{{item.description}}</view>
                <view class="goodsItem-tips">
                    <view class="goodsItem-price">￥{{item.original_price}}</view>
                    <view class="goodsItem-sales">月销 {{item.sales}}</view>
                </view>
            </view>
        </view>
        <view class="pagesLoding" wx:if="{{lodingStats}}">
            <block wx:if="{{page.has_more}}">
                <image class="pagesLoding-icon" src="/static/icons/refresh_loding.gif" mode="widthFix"></image>加载中...
            </block>
            <block wx:else>
                没有更多了~
            </block>
        </view>
    </view>
</block>
<view class="pack-center pages-hint" wx:else>
    <image src="/static/imgs/text_null.png"></image>
    <view>暂无商品</view>
</view>

<!-- 分类展示 -->
<view class="sortBack {{sortStaus ? 'active' : ''}}" bindtap="sortShow"></view>
<view class="sortCont {{sortStaus ? 'active' : ''}}">
    <scroll-view class="stair-nav" scroll-y>
        <view class="stair-nav-li {{categorieArr[categorieindex].category_id == item.category_id ? 'active' : ''}}" wx:for="{{categorieArr}}" wx:key="categorieArr" bindtap="categorieTap" data-index="{{index}}">
            {{item.name}}</view>
    </scroll-view>
    <scroll-view class="level-content" scroll-y>
        <view class="levelList-title">{{categorieArr[categorieindex].name}}</view>
        <view wx:if="{{categorieArr[categorieindex].children != ''}}">
            <view class="level-nav">
                <navigator hover-class="none" open-type="redirect" url="/pages/mall/goods/goods?id={{categorieArr[categorieindex].category_id}}" class="level-nav-li" wx:for="{{categorieArr[categorieindex].children}}" wx:key="children" wx:for-item="level">
                    <view class="level-nav-cover">
                        <image src="{{level.cover}}" mode="aspectFill"></image>
                    </view>
                    <view class="level-nav-title">{{level.name}}</view>
                </navigator>
            </view>
        </view>
        <view class="level-tips" wx:else>
            暂无产品
        </view>
    </scroll-view>
</view>