Commit feecc3ca01663f57447f2b08d7fb9fcd9d2169c1
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
2 changed files
with
22 additions
and
7 deletions
packageA/pages/service_share/service_share.js
... | ... | @@ -24,7 +24,9 @@ Page({ |
24 | 24 | dis_switch:0, //-- 分销开关 -- |
25 | 25 | pattern:0, //-- 分成的方式 -- |
26 | 26 | share_hidden:1, //-- 分享的按钮隐藏 -- |
27 | - share_good:null //--- 要分享的商品 --- | |
27 | + share_good:null ,//--- 要分享的商品 --- | |
28 | + | |
29 | + isSale: true, | |
28 | 30 | }, |
29 | 31 | /** |
30 | 32 | * 生命周期函数--监听页面加载 |
... | ... | @@ -162,9 +164,15 @@ Page({ |
162 | 164 | |
163 | 165 | // 点击价格排序 |
164 | 166 | sort1() { |
167 | + this.setData({ | |
168 | + isSale: false, | |
169 | + isPrice: true, | |
170 | + isNew: false, | |
171 | + }); | |
165 | 172 | if(this.data.active2) { |
166 | 173 | this.setData({ |
167 | - active2: !this.data.active2 | |
174 | + active2: !this.data.active2, | |
175 | + | |
168 | 176 | }); |
169 | 177 | }; |
170 | 178 | if(this.data.orderField!="money"){ |
... | ... | @@ -178,6 +186,7 @@ Page({ |
178 | 186 | orderType:ty,is_no_data:0,is_no_more:0,list:[], |
179 | 187 | }); |
180 | 188 | } |
189 | + | |
181 | 190 | this.data.is_load=0; |
182 | 191 | this.data.currentPage=1; |
183 | 192 | this.requestGoodsList(); |
... | ... | @@ -218,6 +227,9 @@ Page({ |
218 | 227 | if(this.data.orderField!="sales_sum"){ |
219 | 228 | this.setData({ |
220 | 229 | active1: 0,active2:0,orderType:'desc',is_no_data:0,is_no_more:0,orderField:'sales_sum',list:[], |
230 | + isSale: true, | |
231 | + isPrice: false, | |
232 | + isNew: false, | |
221 | 233 | }); |
222 | 234 | this.data.is_load=0; |
223 | 235 | this.data.currentPage=1; |
... | ... | @@ -229,7 +241,10 @@ Page({ |
229 | 241 | new_sort:function(){ |
230 | 242 | if(this.data.orderField!="is_new"){ |
231 | 243 | this.setData({ |
232 | - active1: 0,active2:0,orderType:'desc',is_no_data:0,is_no_more:0,orderField:'is_new',list:[], | |
244 | + active1: 0,active2:0,orderType:'desc',is_no_data:0,is_no_more:0,list:[], | |
245 | + isSale: false, | |
246 | + isPrice:false, | |
247 | + isNew: true, | |
233 | 248 | }); |
234 | 249 | this.data.is_load=0; |
235 | 250 | this.data.currentPage=1; | ... | ... |
packageA/pages/service_share/service_share.wxml
... | ... | @@ -10,13 +10,13 @@ |
10 | 10 | <view class="list-container"> |
11 | 11 | <!-- 标题 --> |
12 | 12 | <view class="title"> |
13 | - <view class="title-item f1" bindtap="sale_sort">销量</view> | |
13 | + <view class="title-item f1 {{isSale?'c-red':''}}" bindtap="sale_sort">销量</view> | |
14 | 14 | |
15 | 15 | <block wx:if="{{orderField=='money'}}"> |
16 | - <view class="title-item f1" bindtap="sort1">价格<text class="iconfont {{orderType=='asc'?'icon-shang':'icon-xia'}}"></text></view> | |
16 | + <view class="title-item f1 {{isPrice?'c-red':''}}" bindtap="sort1">价格<text class="iconfont {{orderType=='asc'?'icon-shang':'icon-xia'}}"></text></view> | |
17 | 17 | </block> |
18 | 18 | <block wx:else> |
19 | - <view class="title-item f1" bindtap="sort1">价格<text class="iconfont icon-shang"></text></view> | |
19 | + <view class="title-item f1 {{isPrice?'c-red':''}}" bindtap="sort1">价格<text class="iconfont icon-shang"></text></view> | |
20 | 20 | </block> |
21 | 21 | |
22 | 22 | <!-- <block wx:if="{{orderField=='commission'}}"> |
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | <view class="title-item" bindtap="sort2">佣金<text class="iconfont icon-xia"></text></view> |
27 | 27 | </block> --> |
28 | 28 | |
29 | - <view class="title-item f1" bindtap='new_sort'>最新</view> | |
29 | + <view class="title-item f1 {{isNew?'c-red':''}}" bindtap='new_sort'>最新</view> | |
30 | 30 | </view> |
31 | 31 | <!-- 列表项 --> |
32 | 32 | <scroll-view | ... | ... |