diff --git a/packageA/pages/distribution/shop/shop.js b/packageA/pages/distribution/shop/shop.js index 2adb702..3817098 100644 --- a/packageA/pages/distribution/shop/shop.js +++ b/packageA/pages/distribution/shop/shop.js @@ -123,7 +123,7 @@ Page({ }); // 请求数据 - app.request.promiseGet('/api/weshop/users/distribut/pagemyshop', { + app.request.promiseGet('/api/weshop/users/distribut/pagemyshop?orderType=desc', { data: this.data.currentQuery, }).then(res => { self.setData({ @@ -133,7 +133,7 @@ Page({ }); // 新品 - app.request.promiseGet('/api/weshop/users/distribut/pagemyshop?type=2', { + app.request.promiseGet('/api/weshop/users/distribut/pagemyshop?type=2&orderType=desc', { data: self.data.currentQuery, }).then(res => { self.setData({ @@ -466,6 +466,7 @@ Page({ }; this.setData({ list: null, + isAll: true, currentTabIndex: currentIndex, isSort, pageNum: 1, @@ -491,9 +492,12 @@ Page({ if(currentIndex == 3) { // console.log('点击价格'); + if(data.orderType) {// 清除orderType + delete data.orderType; + }; return; }; - + data.orderType = 'desc'; this.data.currentQuery = data; this.getData(true, '/api/weshop/users/distribut/pagemyshop', data); }, @@ -687,7 +691,7 @@ Page({ isAll: false, }); - this.getData(true, '/api/weshop/users/distribut/pagemyshop?type=2', data); + this.getData(true, '/api/weshop/users/distribut/pagemyshop?type=2&orderType=desc', data); // app.request.promiseGet('/api/weshop/users/distribut/pagemyshop?type=2', { // data: data, // }).then(res => {