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 | 104 | this.resetData(), this.requestOrderList(t.currentTarget.id); |
| 105 | 105 | }, |
| 106 | 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 | 123 | r += "&order_status=2"; break; |
| 124 | 124 | } |
| 125 | 125 | r+="&isdel=0"; |
| 126 | + if(this.data.searchContent) { | |
| 127 | + r+="&keyWord=" + this.data.searchContent; | |
| 128 | + } | |
| 126 | 129 | this.setData({ activeCategoryId: t }); r = r + "&page=" + e.data.currentPage; |
| 127 | 130 | s.request(r, function (t) { |
| 128 | 131 | |
| ... | ... | @@ -1385,6 +1388,7 @@ Page({ |
| 1385 | 1388 | console.log('online',this.data.searchContent); |
| 1386 | 1389 | if(this.data.searchContent) { |
| 1387 | 1390 | console.log(this.data.searchContent); |
| 1391 | + this.resetData(), this.requestOrderList(this.data.activeCategoryId); | |
| 1388 | 1392 | } else { |
| 1389 | 1393 | wx.showToast({ |
| 1390 | 1394 | title: '您还没有输入搜索内容~', |
| ... | ... | @@ -1403,6 +1407,7 @@ Page({ |
| 1403 | 1407 | this.setData({ |
| 1404 | 1408 | currentPage2: 1, |
| 1405 | 1409 | list2: [], |
| 1410 | + is_no_data2: 0, | |
| 1406 | 1411 | }); |
| 1407 | 1412 | |
| 1408 | 1413 | ... | ... |