Commit 7b88d81deddd69376e4a9bb26f2aec5c0a39c9b5
1 parent
23728547
手店小程序线上订单搜索功能完成
Showing
1 changed file
with
6 additions
and
1 deletions
pages/user/order_list/order_list.js
@@ -104,7 +104,7 @@ Page({ | @@ -104,7 +104,7 @@ Page({ | ||
104 | this.resetData(), this.requestOrderList(t.currentTarget.id); | 104 | this.resetData(), this.requestOrderList(t.currentTarget.id); |
105 | }, | 105 | }, |
106 | resetData: function() { | 106 | resetData: function() { |
107 | - s.resetConfig(), this.data.orderList = null, this.data.currentPage = 1; | 107 | + s.resetConfig(),this.data.orderList = null, this.data.currentPage = 1; |
108 | }, | 108 | }, |
109 | 109 | ||
110 | 110 | ||
@@ -123,6 +123,9 @@ Page({ | @@ -123,6 +123,9 @@ Page({ | ||
123 | r += "&order_status=2"; break; | 123 | r += "&order_status=2"; break; |
124 | } | 124 | } |
125 | r+="&isdel=0"; | 125 | r+="&isdel=0"; |
126 | + if(this.data.searchContent) { | ||
127 | + r+="&keyWord=" + this.data.searchContent; | ||
128 | + } | ||
126 | this.setData({ activeCategoryId: t }); r = r + "&page=" + e.data.currentPage; | 129 | this.setData({ activeCategoryId: t }); r = r + "&page=" + e.data.currentPage; |
127 | s.request(r, function (t) { | 130 | s.request(r, function (t) { |
128 | 131 | ||
@@ -1385,6 +1388,7 @@ Page({ | @@ -1385,6 +1388,7 @@ Page({ | ||
1385 | console.log('online',this.data.searchContent); | 1388 | console.log('online',this.data.searchContent); |
1386 | if(this.data.searchContent) { | 1389 | if(this.data.searchContent) { |
1387 | console.log(this.data.searchContent); | 1390 | console.log(this.data.searchContent); |
1391 | + this.resetData(), this.requestOrderList(this.data.activeCategoryId); | ||
1388 | } else { | 1392 | } else { |
1389 | wx.showToast({ | 1393 | wx.showToast({ |
1390 | title: '您还没有输入搜索内容~', | 1394 | title: '您还没有输入搜索内容~', |
@@ -1403,6 +1407,7 @@ Page({ | @@ -1403,6 +1407,7 @@ Page({ | ||
1403 | this.setData({ | 1407 | this.setData({ |
1404 | currentPage2: 1, | 1408 | currentPage2: 1, |
1405 | list2: [], | 1409 | list2: [], |
1410 | + is_no_data2: 0, | ||
1406 | }); | 1411 | }); |
1407 | 1412 | ||
1408 | 1413 |