From 74ca300ee64d86d50e70a5b7da084444f8730c48 Mon Sep 17 00:00:00 2001 From: taiwan Date: Fri, 4 Mar 2022 17:47:24 +0800 Subject: [PATCH] 搜索框优化 --- pages/goods/search/search.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pages/goods/search/search.js b/pages/goods/search/search.js index f7812e8..364086a 100644 --- a/pages/goods/search/search.js +++ b/pages/goods/search/search.js @@ -324,7 +324,12 @@ Page({ resetData: function() { - e.resetConfig(), this.data.requestData = null, this.data.currentPage = 1; + e.resetConfig(), + // this.data.requestData = null, + this.data.currentPage = 1; + this.setData({ + requestData: null, + }); }, //---回复最初的设置---显示全部分类-- @@ -358,6 +363,12 @@ Page({ //热搜关键字 searchHotWord: function(t) { var word = t.currentTarget.dataset.word; + if(word) { + this.setData({ + keyword: word, + hiddenClear: false, + }); + }; this.historyRecord(word); this.search(word); }, -- libgit2 0.21.4