Browse Source

fix[litemall-wx]:如果用户没有输入关键字时,则不搜索。

Junling Bu 7 years ago
parent
commit
852d1cf78d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      litemall-wx/pages/search/search.js

+ 3 - 0
litemall-wx/pages/search/search.js

@@ -107,6 +107,9 @@ Page({
 
 
   },
   },
   getSearchResult(keyword) {
   getSearchResult(keyword) {
+    if(keyword === ''){
+      return
+    }
     this.setData({
     this.setData({
       keyword: keyword,
       keyword: keyword,
       page: 1,
       page: 1,