Commit 6c4216cd3112bae686afacf800763a6aec1f54ff
1 parent
d5de6d66
我的小店除价格外默认降序排列
Showing
1 changed file
with
8 additions
and
4 deletions
packageA/pages/distribution/shop/shop.js
... | ... | @@ -123,7 +123,7 @@ Page({ |
123 | 123 | }); |
124 | 124 | |
125 | 125 | // 请求数据 |
126 | - app.request.promiseGet('/api/weshop/users/distribut/pagemyshop', { | |
126 | + app.request.promiseGet('/api/weshop/users/distribut/pagemyshop?orderType=desc', { | |
127 | 127 | data: this.data.currentQuery, |
128 | 128 | }).then(res => { |
129 | 129 | self.setData({ |
... | ... | @@ -133,7 +133,7 @@ Page({ |
133 | 133 | }); |
134 | 134 | |
135 | 135 | // 新品 |
136 | - app.request.promiseGet('/api/weshop/users/distribut/pagemyshop?type=2', { | |
136 | + app.request.promiseGet('/api/weshop/users/distribut/pagemyshop?type=2&orderType=desc', { | |
137 | 137 | data: self.data.currentQuery, |
138 | 138 | }).then(res => { |
139 | 139 | self.setData({ |
... | ... | @@ -466,6 +466,7 @@ Page({ |
466 | 466 | }; |
467 | 467 | this.setData({ |
468 | 468 | list: null, |
469 | + isAll: true, | |
469 | 470 | currentTabIndex: currentIndex, |
470 | 471 | isSort, |
471 | 472 | pageNum: 1, |
... | ... | @@ -491,9 +492,12 @@ Page({ |
491 | 492 | |
492 | 493 | if(currentIndex == 3) { |
493 | 494 | // console.log('点击价格'); |
495 | + if(data.orderType) {// 清除orderType | |
496 | + delete data.orderType; | |
497 | + }; | |
494 | 498 | return; |
495 | 499 | }; |
496 | - | |
500 | + data.orderType = 'desc'; | |
497 | 501 | this.data.currentQuery = data; |
498 | 502 | this.getData(true, '/api/weshop/users/distribut/pagemyshop', data); |
499 | 503 | }, |
... | ... | @@ -687,7 +691,7 @@ Page({ |
687 | 691 | isAll: false, |
688 | 692 | }); |
689 | 693 | |
690 | - this.getData(true, '/api/weshop/users/distribut/pagemyshop?type=2', data); | |
694 | + this.getData(true, '/api/weshop/users/distribut/pagemyshop?type=2&orderType=desc', data); | |
691 | 695 | // app.request.promiseGet('/api/weshop/users/distribut/pagemyshop?type=2', { |
692 | 696 | // data: data, |
693 | 697 | // }).then(res => { | ... | ... |