|
@@ -95,9 +95,9 @@ Page({ |
|
@@ -95,9 +95,9 @@ Page({ |
|
95
|
this.setData({
|
95
|
this.setData({
|
|
96
|
backfill: this.data.suggestion[i].title
|
96
|
backfill: this.data.suggestion[i].title
|
|
97
|
});
|
97
|
});
|
|
98
|
- PubSub.emit('searchParam',{fun:'setSuggestion',suggestion:this.data.suggestion[i]})
|
|
|
|
99
|
- PubSub.emit('searchParamList',{fun:'setSuggestion',suggestion:this.data.suggestion[i]})
|
98
|
+ this.setSuggestion({fun:'setSuggestion',suggestion:this.data.suggestion[i]})
|
|
100
|
wx.navigateBack();
|
99
|
wx.navigateBack();
|
|
|
|
100
|
+ break;
|
|
101
|
}
|
101
|
}
|
|
102
|
}
|
102
|
}
|
|
103
|
},
|
103
|
},
|
|
@@ -230,8 +230,7 @@ Page({ |
|
@@ -230,8 +230,7 @@ Page({ |
|
230
|
//let pages = getCurrentPages();
|
230
|
//let pages = getCurrentPages();
|
|
231
|
//let p = pages[pages.length - 2];
|
231
|
//let p = pages[pages.length - 2];
|
|
232
|
//p.setSuggestion(item)
|
232
|
//p.setSuggestion(item)
|
|
233
|
- PubSub.emit('searchParam',{fun:'setSuggestion',suggestion:item})
|
|
|
|
234
|
- PubSub.emit('searchParamList',{fun:'setSuggestion',suggestion:item})
|
233
|
+ this.setSuggestion({fun:'setSuggestion',suggestion:item})
|
|
235
|
this.setData({
|
234
|
this.setData({
|
|
236
|
backfill: item.title
|
235
|
backfill: item.title
|
|
237
|
});
|
236
|
});
|
|
@@ -302,4 +301,13 @@ Page({ |
|
@@ -302,4 +301,13 @@ Page({ |
|
302
|
this.selectComponent('#as').show(e.detail.seller);
|
301
|
this.selectComponent('#as').show(e.detail.seller);
|
|
303
|
}
|
302
|
}
|
|
304
|
},
|
303
|
},
|
|
|
|
304
|
+ setSuggestion(data){//只通知前页变更数据
|
|
|
|
305
|
+ let pages = getCurrentPages();
|
|
|
|
306
|
+ let p = pages[pages.length - 2];
|
|
|
|
307
|
+ if(p.route=='pages/reserve/index'){
|
|
|
|
308
|
+ PubSub.emit('searchParam',data)
|
|
|
|
309
|
+ }else{
|
|
|
|
310
|
+ PubSub.emit('searchParamList',data)
|
|
|
|
311
|
+ }
|
|
|
|
312
|
+ },
|
|
305
|
}) |
313
|
}) |