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,7 +24,9 @@ Page({ | ||
24 | dis_switch:0, //-- 分销开关 -- | 24 | dis_switch:0, //-- 分销开关 -- |
25 | pattern:0, //-- 分成的方式 -- | 25 | pattern:0, //-- 分成的方式 -- |
26 | share_hidden:1, //-- 分享的按钮隐藏 -- | 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,9 +164,15 @@ Page({ | ||
162 | 164 | ||
163 | // 点击价格排序 | 165 | // 点击价格排序 |
164 | sort1() { | 166 | sort1() { |
167 | + this.setData({ | ||
168 | + isSale: false, | ||
169 | + isPrice: true, | ||
170 | + isNew: false, | ||
171 | + }); | ||
165 | if(this.data.active2) { | 172 | if(this.data.active2) { |
166 | this.setData({ | 173 | this.setData({ |
167 | - active2: !this.data.active2 | 174 | + active2: !this.data.active2, |
175 | + | ||
168 | }); | 176 | }); |
169 | }; | 177 | }; |
170 | if(this.data.orderField!="money"){ | 178 | if(this.data.orderField!="money"){ |
@@ -178,6 +186,7 @@ Page({ | @@ -178,6 +186,7 @@ Page({ | ||
178 | orderType:ty,is_no_data:0,is_no_more:0,list:[], | 186 | orderType:ty,is_no_data:0,is_no_more:0,list:[], |
179 | }); | 187 | }); |
180 | } | 188 | } |
189 | + | ||
181 | this.data.is_load=0; | 190 | this.data.is_load=0; |
182 | this.data.currentPage=1; | 191 | this.data.currentPage=1; |
183 | this.requestGoodsList(); | 192 | this.requestGoodsList(); |
@@ -218,6 +227,9 @@ Page({ | @@ -218,6 +227,9 @@ Page({ | ||
218 | if(this.data.orderField!="sales_sum"){ | 227 | if(this.data.orderField!="sales_sum"){ |
219 | this.setData({ | 228 | this.setData({ |
220 | active1: 0,active2:0,orderType:'desc',is_no_data:0,is_no_more:0,orderField:'sales_sum',list:[], | 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 | this.data.is_load=0; | 234 | this.data.is_load=0; |
223 | this.data.currentPage=1; | 235 | this.data.currentPage=1; |
@@ -229,7 +241,10 @@ Page({ | @@ -229,7 +241,10 @@ Page({ | ||
229 | new_sort:function(){ | 241 | new_sort:function(){ |
230 | if(this.data.orderField!="is_new"){ | 242 | if(this.data.orderField!="is_new"){ |
231 | this.setData({ | 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 | this.data.is_load=0; | 249 | this.data.is_load=0; |
235 | this.data.currentPage=1; | 250 | this.data.currentPage=1; |
packageA/pages/service_share/service_share.wxml
@@ -10,13 +10,13 @@ | @@ -10,13 +10,13 @@ | ||
10 | <view class="list-container"> | 10 | <view class="list-container"> |
11 | <!-- 标题 --> | 11 | <!-- 标题 --> |
12 | <view class="title"> | 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 | <block wx:if="{{orderField=='money'}}"> | 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 | </block> | 17 | </block> |
18 | <block wx:else> | 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 | </block> | 20 | </block> |
21 | 21 | ||
22 | <!-- <block wx:if="{{orderField=='commission'}}"> | 22 | <!-- <block wx:if="{{orderField=='commission'}}"> |
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | <view class="title-item" bindtap="sort2">佣金<text class="iconfont icon-xia"></text></view> | 26 | <view class="title-item" bindtap="sort2">佣金<text class="iconfont icon-xia"></text></view> |
27 | </block> --> | 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 | </view> | 30 | </view> |
31 | <!-- 列表项 --> | 31 | <!-- 列表项 --> |
32 | <scroll-view | 32 | <scroll-view |