Authored by 李奇

商品列表筛选组件修改

<view class="product-list-filter">
<ul class="filter-items" bindtap="sortChange">
<li class="item {{curSortType == 'def' ? 'active' : ''}}" data-sort="def">默认</li>
<li class="item {{curSortType == 'def' ? 'active' : ''}} default" data-sort="def">
默认
<image class="item-icon" wx:if="{{curSortType == 'def'}}"
src="../../static/icons/triangle_active@2x.png"></image>
<image class="item-icon" wx:if="{{curSortType != 'def'}}"
src="../../static/icons/triangle_normal@2x.png"></image>
</li>
<li class="item {{curSortType == 'time' ? 'active' : ''}}" data-sort="time">新品</li>
<li class="item {{curSortType == 'popular' ? 'active' : ''}}" data-sort="popular">人气</li>
<li class="item {{curSortType == 'price' ? 'active' : ''}}" data-sort="price">价格</li>
<li class="item {{curGender ? 'active' : ''}}" catchtap="subFilterGenderTap">{{subFilterText}}</li>
<li class="item {{curSortType == 'price' ? 'active' : ''}}" data-sort="price">
价格
<image class="item-icon" wx:if="{{curSortField != 's_p_asc' && curSortField != 's_p_desc'}}"
src="../../static/icons/db_arrow_normal@2x.png"></image>
<image class="item-icon" wx:if="{{curSortField == 's_p_desc'}}"
src="../../static/icons/db_down_active@2x.png"></image>
<image class="item-icon" wx:if="{{curSortField == 's_p_asc'}}"
src="../../static/icons/db_up_active@2x.png"></image>
</li>
<li class="item {{curGender ? 'active' : ''}}" catchtap="subFilterGenderTap">
{{subFilterText}}
<image class="item-icon" wx:if="{{curGender == ''}}"
src="../../static/icons/sg_down_normal@2x.png"></image>
<image class="item-icon" wx:if="{{curGender != ''}}"
src="../../static/icons/sg_down_active@2x.png"></image>
</li>
</ul>
<view wx:if="{{showSubGender}}" class="sub-gender" bindtap="selectGenderTap">
<view class="gender-item {{curGender == '1,3' ? 'active' : ''}}" data-gender="1,3">男生/BOYS</view>
... ...
... ... @@ -19,6 +19,26 @@
letter-spacing: 0.33px;
}
.product-list-filter .item .item-icon {
position: absolute;
height: 28rpx;
width: 20rpx;
top: 50%;
left: 50%;
margin-top: -14rpx;
margin-left: 34rpx;
}
.product-list-filter .item.default .item-icon{
position: absolute;
height: 10rpx;
width: 18rpx;
top: 50%;
left: 50%;
margin-top: -5rpx;
margin-left: 34rpx;
}
.product-list-filter .item:after {
display: inline-block;
content: '';
... ...
... ... @@ -14,7 +14,8 @@ Component({
indicatorDots: false,
interval: 5000,
autoplay: true,
duration: 1000,
duration: 500,
circular: true,
swiperCurrent: 0
},
methods: {
... ...
<wxs src="../../../wxs/helper.wxs" module="helper" />
<view class="resource-focus">
<swiper class="swiper-wrapper" indicator-dots="{{indicatorDots}}"
autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" bindchange="swiperChange">
autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"
circular="{{circular}}" bindchange="swiperChange">
<block wx:for="{{swiperList}}" wx:key="{{index}}">
<swiper-item>
<anchor url="{{item.url}}">
... ...