Sanakey
2020-08-13 d98d05000c3d14e1f12a7754ebeea11ec1fa0f0b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!--pages/result/result.wxml-->
<import src="../template/search-input/search-input-template" />
<import src="../template/goods-item/goods-item-template" />
<import src="../template/goods-item-row/goods-item-row-template" />
<!-- style="height:{{clientHeight}};overflow:{{overflow}};" -->
<view>
 
  <view class="header">
    <template is="searchInputTemplate" data="{{...inpData}}" />
    <view class="sort-list  {{scrollTop>50 ? 'fixed':''}}">
      <view data-index="0" class="sort " bindtap="onOverallTag">
        <text class="{{selected == 0?'sort-active':''}}">{{sortSelected}}</text>
        <text class="iconfont icon-xiangxiazhankai"></text>
      </view>
      <view data-index="1" bindtap="onTapTag" class="sort {{selected == 1?'sort-active':''}}">
        销量最高
      </view>
      <view data-index="2" bindtap="onTapTag" class="sort {{selected == 2?'sort-active':''}}">
        距离最近
      </view>
      <view class="sort" bindtap="showLayer">
        <text>筛选</text>
        <text class="iconfont icon-shaixuanguolv"></text>
      </view>
    </view>
    <!--排序弹出框  -->
    <view class="hidden-layer2 " wx:if="{{isShow2}}" catchtouchmove="preventMove">
      <view class="overall-sort-list">
        <block wx:for="{{sortList}}" wx:key="">
          <view class="overall-sort {{active == index?'sort-active':''}}" data-index="{{index}}" bindtap="sortSelected">{{item.sort}}</view>
        </block>
      </view>
    </view>
  </view>
 
 
  <view class="goods-container">
    <block wx:for="{{goodsItem}}" wx:for-item="goods" wx:key="key">
      <view class="single-view-container">
        <template wx:if="{{!isSwitch}}" is="goodsItemTemplate" data="{{...goods}}" />
        <template wx:if="{{isSwitch}}" is="goodsItemRowTemplate" data="{{...goods}}" />
      </view>
    </block>
    <view wx:if="{{isNull}}">没有找到您要的结果,换个关键词试试看!</view>
  </view>
 
 
 
 
 
 
  <!--筛选弹出框-->
  <view class="mask" bindtap="hideLayer" wx:if="{{isShow||isShow2}}" catchtouchmove="preventMove"></view>
  <view animation="{{animationData}}" class="hidden-layer " wx:if="{{isShow}}" catchtouchmove="preventMove">
    <view class="filterList">
      <view class="filterList-characteristic-title">筛选条件</view>
      <view class="filterList-characteristic-items">
        <block wx:for="{{filterList}}" wx:key="">
          <view class="filterList-characteristic-item {{characteristicSelected[index]==true?'characteristic-selected':''}}" catchtap="characteristicSelected" data-index="{{index}}">{{item.text}}</view>
        </block>
      </view>
    </view>
    <view class="filterList-footer">
      <view class="filterList-footer-delect" catchtap="clearSelectedNumb">重置</view>
      <view class="filterList-footer-finish" bindtap="finish">确定
        <view class="filterList-footer-finish-number" hidden="{{selectedNumb==0}}">{{selectedNumb}}
        </view>
      </view>
    </view>
  </view>
 
 
 
 
 
</view>
 
 
 
<!-- <view class="mask" hidden="{{mask1Hidden}}" bindtap="mask1Cancel">
  <view class="sort-list">
    <view class="sort" bindtap="onOverallTag">{{sortSelected}}
      <text class="iconfont icon-xiangxiazhankai" style="width:20rpx;height:20rpx;"></text>
    </view>
    <view data-index="0" bindtap="onTapTag" class="sort {{selected == 0?'sort-active':''}}">
      销量最高
    </view>
    <view data-index="1" bindtap="onTapTag" class="sort {{selected == 1?'sort-active':''}}">
      距离最近
    </view>
    <view class="sort" bindtap="onFilter">筛选
      <text class="iconfont icon-shaixuanguolv" style="width:22rpx;height:22rpx;"></text>
    </view>
  </view>
  <view class="overall-sort-list">
    <block wx:for="{{sortList}}" wx:key="">
      <view class="overall-sort" data-index="{{index}}" bindtap="sortSelected">{{item.sort}}</view>
    </block>
  </view>
</view>
<view class="mask" hidden="{{mask2Hidden}}" bindtap="mask2Cancel">
  <view class="sort-list">
    <view class="sort" bindtap="onOverallTag">{{sortSelected}}
      <text class="iconfont icon-xiangxiazhankai" style="width:20rpx;height:20rpx;"></text>
    </view>
    <view data-index="0" bindtap="onTapTag" class="sort {{selected == 0?'sort-active':''}}">
      销量最高
    </view>
    <view data-index="1" bindtap="onTapTag" class="sort {{selected == 1?'sort-active':''}}">
      距离最近
    </view>
    <view class="sort" bindtap="onFilter">筛选
      <text class="iconfont icon-shaixuanguolv" style="width:22rpx;height:22rpx;"></text>
    </view>
  </view>
  <scroll-view class="filterList" scroll-y="true">
    <view class="filterList-characteristic-title">商家特色</view>
    <view class="filterList-characteristic-items">
      <block wx:for="{{characteristicList}}" wx:key="">
        <view class="filterList-characteristic-item {{characteristicSelected[index]==true?'characteristic-selected':''}}" catchtap="characteristicSelected" data-index="{{index}}">{{item.text}}</view>
      </block>
    </view>
    <view class="filterList-discount-title">优惠活动(单选)</view>
    <view class="filterList-discount-items">
      <block wx:for="{{discountList}}" wx:key="">
        <view class="filterList-discount-item {{discountSelected==index?'discount-selected':''}}" catchtap="discountSelected" data-index="{{index}}">
          <text class="filterList-discount-item-icon" style="background:{{item.iconColor}}">{{item.icon}}</text> {{item.text}}
        </view>
      </block>
    </view>
  </scroll-view>
  <view class="filterList-footer">
    <view class="filterList-footer-delect" catchtap="clearSelectedNumb">清除筛选</view>
    <view class="filterList-footer-finish" bindtap="finish">完成
      <view class="filterList-footer-finish-number" hidden="{{selectedNumb==0}}">{{selectedNumb}}
      </view>
    </view>
  </view>
</view> -->