Commit 74ca300ee64d86d50e70a5b7da084444f8730c48
1 parent
bce5a200
搜索框优化
Showing
1 changed file
with
12 additions
and
1 deletions
pages/goods/search/search.js
... | ... | @@ -324,7 +324,12 @@ Page({ |
324 | 324 | |
325 | 325 | |
326 | 326 | resetData: function() { |
327 | - e.resetConfig(), this.data.requestData = null, this.data.currentPage = 1; | |
327 | + e.resetConfig(), | |
328 | + // this.data.requestData = null, | |
329 | + this.data.currentPage = 1; | |
330 | + this.setData({ | |
331 | + requestData: null, | |
332 | + }); | |
328 | 333 | }, |
329 | 334 | |
330 | 335 | //---回复最初的设置---显示全部分类-- |
... | ... | @@ -358,6 +363,12 @@ Page({ |
358 | 363 | //热搜关键字 |
359 | 364 | searchHotWord: function(t) { |
360 | 365 | var word = t.currentTarget.dataset.word; |
366 | + if(word) { | |
367 | + this.setData({ | |
368 | + keyword: word, | |
369 | + hiddenClear: false, | |
370 | + }); | |
371 | + }; | |
361 | 372 | this.historyRecord(word); |
362 | 373 | this.search(word); |
363 | 374 | }, | ... | ... |