This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop-wechat/pages/category/index.wxml
2020-04-25 22:59:04 +08:00

75 lines
3.2 KiB
Plaintext

<view class="container">
<!-- 搜索框 -->
<view class="index-search-box">
<navigator class="index-search" hover-class="none" openType="navigate" url="../search/index">
<view class="index-cont-search t-c">
<icon class="text-center" color="{{searchColor}}" size="{{searchSize}}" type="search"></icon>
<text>{{searchName}}</text>
</view>
</navigator>
</view>
<!-- 分类样式:一级分类(大图) 10 -->
<view class="cate-content" wx:if="{{ templet.category_style == 10 && list.length > 0 }}">
<view class="cate-wrapper cate_style__10">
<scroll-view scroll-y="true" style="height: {{scrollHeight - 10}}px; ">
<view class="cate-item" wx:for="{{list}}" wx:key="this">
<navigator hover-class="none" url="../category/list?category_id={{item.category_id}}">
<image mode="widthFix" src="{{item.image.file_path}}"></image>
</navigator>
</view>
</scroll-view>
</view>
</view>
<!-- 分类样式:一级分类(小图) 11 -->
<view class="cate-content" wx:elif="{{ templet.category_style == 11 && list.length > 0 }}">
<view class="cate-wrapper cate_style__11">
<scroll-view class="clear" scroll-y="true" style="height: {{ scrollHeight - 10 }}px; ">
<view class="cate-item" wx:for="{{ list }}" wx:key="this">
<navigator hover-class="none" url="../category/list?category_id={{item.category_id}}">
<image mode="widthFix" src="{{ item.image.file_path }}"></image>
<text class="f-26">{{ item.name }}</text>
</navigator>
</view>
</scroll-view>
</view>
</view>
<!-- 分类样式:二级分类 20 -->
<view class="cate-content dis-flex" wx:elif="{{ templet.category_style == 20 && list.length > 0 }}">
<!-- 左侧 一级分类 -->
<scroll-view class="cate-left f-28" scroll-y="{{ true }}" style="height: {{ scrollHeight }}px; ">
<text bindtap="selectNav" class="type-nav {{curNav==item.category_id?'selected':''}}" data-id="{{ item.category_id }}" data-index="{{index}}" wx:for="{{list}}" wx:key="cateLeft">{{ item.name }}</text>
</scroll-view>
<!-- 右侧 二级分类 -->
<scroll-view class="cate-right b-f" scroll-top="{{ scrollTop }}" scroll-y="true" style="height: {{ scrollHeight }}px; ">
<view wx:if="{{list[curIndex]}}">
<view class="cate-right-cont">
<view class="cate-two-box">
<view class="cate-cont-box">
<view class="flex-three" data-list="{{index}}" wx:for="{{list[curIndex].child}}" wx:key="cit">
<navigator hover-class="none" url="../category/list?category_id={{item.category_id}}">
<view class="cate-img" id="{{item.file_id}}">
<image src="{{item.image.file_path}}"></image>
</view>
<text>{{item.name}}</text>
</navigator>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
<view wx:if="{{ !list.length && notcont }}">
<view class="yoshop-notcont">
<text class="iconfont icon-wushuju"></text>
<text class="cont">亲,暂无商品分类哦</text>
</view>
</view>
</view>