Commit e1c5262daaa79ff69247f36071a28d9e05b491c2

Authored by vking
1 parent 03b7a48b

search

Showing 1 changed file with 7 additions and 3 deletions
... ... @@ -117,6 +117,9 @@ Page({
onUnload: function () {
if(this.hasOneListPage()){
PubSub.off('searchParamList')
if(this.hasCleanSuggestion){
PubSub.emit('searchParam', {fun:'moveToLocation'})
}
}
},
... ... @@ -246,8 +249,8 @@ Page({
hasLoading:false,
hasDisabled:this.getHasDisabled(res.data.length>0,this.data.multiIndex[0]>0 || tags.length>0 || this.findSellerData)
})
this.triggerEvent('event',{type:'getListEnd',total:res.data.length})
this.hasGetSellerEnd=true
this.triggerEvent('event',{type:'getListEnd',total:res.data.length})
if(res.data.length==0 && this.offset==1 && this.location){
this.onpos({detail:this.location})
}
... ... @@ -425,6 +428,7 @@ Page({
suggestion:null,
setSuggestion(suggestion){
this.suggestion=suggestion
this.hasCleanSuggestion=false
this.setData({
suggestion:suggestion,
hasSuggestion:true,
... ... @@ -433,13 +437,13 @@ Page({
},
moveToLocation(){
this.suggestion=null
this.hasCleanSuggestion=true,
this.hasCleanSuggestion=true
this.setData({
suggestion:null,
hasSuggestion:false,
keyword:'',
})
PubSub.emit('searchParam', {fun:'moveToLocation'})
//PubSub.emit('searchParam', {fun:'moveToLocation'})
setTimeout(()=>{this.getList()},0)
},
})
\ No newline at end of file
... ...