Commit ca837fa776497f61ae60f69eff58c1feabf904d4

Authored by vking
1 parent 312db319

search

... ... @@ -11,8 +11,13 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
eventChannel:null,
onLoad: function (options) {
this.eventChannel = this.getOpenerEventChannel()
// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
this.eventChannel.on('acceptDataFromMapPage', findSellerData=> {
console.log('findSellerData',findSellerData)
})
},
/**
... ... @@ -58,6 +63,8 @@ Page({
},
howEvent(e){
console.log('howEvent',e)
//console.log('howEvent',e)
this.eventChannel.emit('findSellerData',e.detail)
wx.navigateBack()
},
})
\ No newline at end of file
... ...
... ... @@ -475,6 +475,9 @@ Page({
if(this.data.hasSuggestion){
param.centre_pos=`${this.data.suggestion.latitude},${this.data.suggestion.longitude}`
}
if(this.findSellerData){
param=Object.assign(param,this.findSellerData.paramObj)
}
this.selectComponent('#list').getList(param);
this.param=param;
let now_sid=[];
... ... @@ -850,7 +853,18 @@ Page({
tags:this.param.tags,
centre_pos:this.param.centre_pos,
hasSuggestion:this.data.hasSuggestion?1:''
},'./indexList')
},'./indexList'),
success: res=> {
// 通过eventChannel向被打开页面传送数据
if(this.findSellerData){
res.eventChannel.emit('acceptDataFromMapPage', this.findSellerData)
}
res.eventChannel.on('findSellerData',findSellerData=>{
console.log('findSellerData',findSellerData)
this.findSellerData=findSellerData
setTimeout(()=>{this.getMarkers();},0)
})
}
});
},
setTSLocal(){
... ... @@ -871,4 +885,21 @@ Page({
}
this.setData(sdobj)
},
findSellerData:null,
findSeller(){
wx.navigateTo({
url: './findSeller',
success: res=> {
// 通过eventChannel向被打开页面传送数据
if(this.findSellerData){
res.eventChannel.emit('acceptDataFromMapPage', this.findSellerData)
}
res.eventChannel.on('findSellerData',findSellerData=>{
console.log('findSellerData',findSellerData)
this.findSellerData=findSellerData
setTimeout(()=>{this.getMarkers();},0)
})
}
})
},
})
\ No newline at end of file
... ...
... ... @@ -14,7 +14,7 @@
enable-scroll
enable-rotate
subkey="SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ"
style="width: 100%; height: {{map.height+30}}px;"></map>
style="width: 100%; height: {{map.height+60}}px;"></map>
<formids url="/pages/reserve/search" style="position: fixed;">
<cover-view
class="flex-ll"
... ... @@ -57,12 +57,10 @@
bindtap="tagsChange"
data-id="{{item.id}}">{{item.name}}</view>
</block>
<navigator url="./findSeller">
<view class="fingSeller flex-ll">
<view class="icon"></view>
<view>查找餐厅</view>
</view>
</navigator>
<view class="fingSeller flex-ll" bindtap="findSeller">
<view class="icon"></view>
<view>查找餐厅</view>
</view>
</view>
<view class="transverse-list">
<swiper
... ... @@ -105,8 +103,14 @@
</view>
</view>
<view class="info" wx:elif="{{hasSearchLimit}}">
<view class="info-msg Semibold">未找到符合要求的餐厅</view>
<view class="info-msg Semibold" style="margin-top: 58rpx;">未找到符合要求的餐厅</view>
<view class="info-txt">修改或减少条件,获取更多餐厅</view>
<button class="button-none flex-lr info-button"
style="display: flex;margin-top: 50rpx;margin-left: 0;"
open-type="contact">
<view>人工帮订</view>
<view class="info-button-gt"></view>
</button>
</view>
<view class="info" wx:else="hasSearchLimit" bindtap="setTSLocal">
<view class="info-msg Semibold">你可以切换到其他城市看看</view>
... ...
... ... @@ -192,7 +192,7 @@ page{
margin-left: 30rpx;
}
.empty-txt .seller .empty .info .info-msg{
margin-bottom: 40rpx;
margin-bottom: 14rpx;
font-size: 34rpx;
margin-top: 78rpx;
height: 48rpx;
... ... @@ -209,8 +209,8 @@ page{
padding: 0 20rpx;
color: #F05522;
font-size: 28rpx;
width: 146rpx;
max-width: 146rpx;
min-width: 146rpx;
max-width: 170rpx;
box-sizing: border-box;
}
.info-button-gt{
... ...