Commit 6c4216cd3112bae686afacf800763a6aec1f54ff

Authored by taiyuan
1 parent d5de6d66

我的小店除价格外默认降序排列

packageA/pages/distribution/shop/shop.js
@@ -123,7 +123,7 @@ Page({ @@ -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 data: this.data.currentQuery, 127 data: this.data.currentQuery,
128 }).then(res => { 128 }).then(res => {
129 self.setData({ 129 self.setData({
@@ -133,7 +133,7 @@ Page({ @@ -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 data: self.data.currentQuery, 137 data: self.data.currentQuery,
138 }).then(res => { 138 }).then(res => {
139 self.setData({ 139 self.setData({
@@ -466,6 +466,7 @@ Page({ @@ -466,6 +466,7 @@ Page({
466 }; 466 };
467 this.setData({ 467 this.setData({
468 list: null, 468 list: null,
  469 + isAll: true,
469 currentTabIndex: currentIndex, 470 currentTabIndex: currentIndex,
470 isSort, 471 isSort,
471 pageNum: 1, 472 pageNum: 1,
@@ -491,9 +492,12 @@ Page({ @@ -491,9 +492,12 @@ Page({
491 492
492 if(currentIndex == 3) { 493 if(currentIndex == 3) {
493 // console.log('点击价格'); 494 // console.log('点击价格');
  495 + if(data.orderType) {// 清除orderType
  496 + delete data.orderType;
  497 + };
494 return; 498 return;
495 }; 499 };
496 - 500 + data.orderType = 'desc';
497 this.data.currentQuery = data; 501 this.data.currentQuery = data;
498 this.getData(true, '/api/weshop/users/distribut/pagemyshop', data); 502 this.getData(true, '/api/weshop/users/distribut/pagemyshop', data);
499 }, 503 },
@@ -687,7 +691,7 @@ Page({ @@ -687,7 +691,7 @@ Page({
687 isAll: false, 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 // app.request.promiseGet('/api/weshop/users/distribut/pagemyshop?type=2', { 695 // app.request.promiseGet('/api/weshop/users/distribut/pagemyshop?type=2', {
692 // data: data, 696 // data: data,
693 // }).then(res => { 697 // }).then(res => {