Showing
1 changed file
with
7 additions
and
2 deletions
@@ -36,21 +36,25 @@ var $listNav = $('#list-nav'), | @@ -36,21 +36,25 @@ var $listNav = $('#list-nav'), | ||
36 | //导航数据信息 | 36 | //导航数据信息 |
37 | navInfo = { | 37 | navInfo = { |
38 | discount13: { | 38 | discount13: { |
39 | + order: 0, | ||
39 | reload: true, | 40 | reload: true, |
40 | page: 0, | 41 | page: 0, |
41 | end: false | 42 | end: false |
42 | }, | 43 | }, |
43 | discount46: { | 44 | discount46: { |
45 | + order: 0, | ||
44 | reload: true, | 46 | reload: true, |
45 | page: 0, | 47 | page: 0, |
46 | end: false | 48 | end: false |
47 | }, | 49 | }, |
48 | discount79: { | 50 | discount79: { |
51 | + order: 0, | ||
49 | reload: true, | 52 | reload: true, |
50 | page: 0, | 53 | page: 0, |
51 | end: false | 54 | end: false |
52 | }, | 55 | }, |
53 | all: { | 56 | all: { |
57 | + order: 0, | ||
54 | reload: true, | 58 | reload: true, |
55 | page: 0, | 59 | page: 0, |
56 | end: false | 60 | end: false |
@@ -171,6 +175,7 @@ function search(opt) { | @@ -171,6 +175,7 @@ function search(opt) { | ||
171 | } | 175 | } |
172 | 176 | ||
173 | $.extend(setting, defaultOpt, { | 177 | $.extend(setting, defaultOpt, { |
178 | + order: nav.order, | ||
174 | page: page | 179 | page: page |
175 | }); | 180 | }); |
176 | 181 | ||
@@ -273,9 +278,9 @@ $listNav.delegate('li', 'touchstart', function() { | @@ -273,9 +278,9 @@ $listNav.delegate('li', 'touchstart', function() { | ||
273 | 278 | ||
274 | if ($this.hasClass('active')) { | 279 | if ($this.hasClass('active')) { |
275 | 280 | ||
276 | - // 价格/折扣切换排序状态 | 281 | + // 折扣切换排序状态 |
277 | $this.find('.icon > .iconfont').toggleClass('cur'); | 282 | $this.find('.icon > .iconfont').toggleClass('cur'); |
278 | - $pre = $this; //更新pre为当前项 | 283 | + $pre = $this; |
279 | nav.reload = true; //重置reload,HTML会被替换为逆序的HTML | 284 | nav.reload = true; //重置reload,HTML会被替换为逆序的HTML |
280 | nav.order = nav.order === 0 ? 1 : 0; //切换排序 | 285 | nav.order = nav.order === 0 ? 1 : 0; //切换排序 |
281 | 286 |
-
Please register or login to post a comment