Commit a67ec8b273ad1c1d44f1a88df1897729910c3f53

Authored by vking
1 parent 53683113

search

@@ -98,7 +98,7 @@ Page({ @@ -98,7 +98,7 @@ Page({
98 getsuggest: function (e) { 98 getsuggest: function (e) {
99 //调用关键词提示接口 99 //调用关键词提示接口
100 this.inputVal=e.detail.value; 100 this.inputVal=e.detail.value;
101 - if(e.detail.value.length<1){ 101 + if(this.inputVal.length<1){
102 return this.setData({ 102 return this.setData({
103 suggestion: [] 103 suggestion: []
104 }) 104 })
@@ -112,6 +112,11 @@ Page({ @@ -112,6 +112,11 @@ Page({
112 page_index:1, 112 page_index:1,
113 key:map_key, 113 key:map_key,
114 }).then(res=>{ 114 }).then(res=>{
  115 + if(this.inputVal.length<1){
  116 + return this.setData({
  117 + suggestion: []
  118 + })
  119 + }
115 res.data=res.data.data 120 res.data=res.data.data
116 var sug = [],hasSellerMore=false,sellerSplit=-1 121 var sug = [],hasSellerMore=false,sellerSplit=-1
117 for (var i = 0; i < res.data.length; i++) { 122 for (var i = 0; i < res.data.length; i++) {
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 width: 110%; 10 width: 110%;
11 height: 110rpx; 11 height: 110rpx;
12 background-color: #fefefe; 12 background-color: #fefefe;
13 - z-index: 10; 13 + z-index: 9;
14 margin-left: -5%; 14 margin-left: -5%;
15 } 15 }
16 .searchAddr { 16 .searchAddr {