Commit 0658828d0d69178a26aa4126358cd2bef62ee176

Authored by vking
1 parent e1c5262d

search

... ... @@ -189,7 +189,7 @@ Page({
if(/xiaomi/i.test(systemInfo.brand)){
this.transverseViewHeight=transverseViewHeight+15;
}else{
//this.transverseViewHeight=transverseViewHeight+20;
this.transverseViewHeight=transverseViewHeight-15;
}
pt = systemInfo.statusBarHeight;
h = 48;
... ...
... ... @@ -117,7 +117,9 @@ Page({
onUnload: function () {
if(this.hasOneListPage()){
PubSub.off('searchParamList')
if(this.hasCleanSuggestion){
if(this.suggestion){
PubSub.emit('searchParam',{fun:'setSuggestion',suggestion:this.suggestion})
}else if(this.hasCleanSuggestion){
PubSub.emit('searchParam', {fun:'moveToLocation'})
}
}
... ...
... ... @@ -95,9 +95,9 @@ Page({
this.setData({
backfill: this.data.suggestion[i].title
});
PubSub.emit('searchParam',{fun:'setSuggestion',suggestion:this.data.suggestion[i]})
PubSub.emit('searchParamList',{fun:'setSuggestion',suggestion:this.data.suggestion[i]})
this.setSuggestion({fun:'setSuggestion',suggestion:this.data.suggestion[i]})
wx.navigateBack();
break;
}
}
},
... ... @@ -230,8 +230,7 @@ Page({
//let pages = getCurrentPages();
//let p = pages[pages.length - 2];
//p.setSuggestion(item)
PubSub.emit('searchParam',{fun:'setSuggestion',suggestion:item})
PubSub.emit('searchParamList',{fun:'setSuggestion',suggestion:item})
this.setSuggestion({fun:'setSuggestion',suggestion:item})
this.setData({
backfill: item.title
});
... ... @@ -302,4 +301,13 @@ Page({
this.selectComponent('#as').show(e.detail.seller);
}
},
setSuggestion(data){//只通知前页变更数据
let pages = getCurrentPages();
let p = pages[pages.length - 2];
if(p.route=='pages/reserve/index'){
PubSub.emit('searchParam',data)
}else{
PubSub.emit('searchParamList',data)
}
},
})
\ No newline at end of file
... ...