Showing
4 changed files
with
56 additions
and
14 deletions
| @@ -11,8 +11,13 @@ Page({ | @@ -11,8 +11,13 @@ Page({ | ||
| 11 | /** | 11 | /** |
| 12 | * 生命周期函数--监听页面加载 | 12 | * 生命周期函数--监听页面加载 |
| 13 | */ | 13 | */ |
| 14 | + eventChannel:null, | ||
| 14 | onLoad: function (options) { | 15 | onLoad: function (options) { |
| 15 | - | 16 | + this.eventChannel = this.getOpenerEventChannel() |
| 17 | + // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 | ||
| 18 | + this.eventChannel.on('acceptDataFromMapPage', findSellerData=> { | ||
| 19 | + console.log('findSellerData',findSellerData) | ||
| 20 | + }) | ||
| 16 | }, | 21 | }, |
| 17 | 22 | ||
| 18 | /** | 23 | /** |
| @@ -58,6 +63,8 @@ Page({ | @@ -58,6 +63,8 @@ Page({ | ||
| 58 | }, | 63 | }, |
| 59 | 64 | ||
| 60 | howEvent(e){ | 65 | howEvent(e){ |
| 61 | - console.log('howEvent',e) | 66 | + //console.log('howEvent',e) |
| 67 | + this.eventChannel.emit('findSellerData',e.detail) | ||
| 68 | + wx.navigateBack() | ||
| 62 | }, | 69 | }, |
| 63 | }) | 70 | }) |
| @@ -475,6 +475,9 @@ Page({ | @@ -475,6 +475,9 @@ Page({ | ||
| 475 | if(this.data.hasSuggestion){ | 475 | if(this.data.hasSuggestion){ |
| 476 | param.centre_pos=`${this.data.suggestion.latitude},${this.data.suggestion.longitude}` | 476 | param.centre_pos=`${this.data.suggestion.latitude},${this.data.suggestion.longitude}` |
| 477 | } | 477 | } |
| 478 | + if(this.findSellerData){ | ||
| 479 | + param=Object.assign(param,this.findSellerData.paramObj) | ||
| 480 | + } | ||
| 478 | this.selectComponent('#list').getList(param); | 481 | this.selectComponent('#list').getList(param); |
| 479 | this.param=param; | 482 | this.param=param; |
| 480 | let now_sid=[]; | 483 | let now_sid=[]; |
| @@ -850,7 +853,18 @@ Page({ | @@ -850,7 +853,18 @@ Page({ | ||
| 850 | tags:this.param.tags, | 853 | tags:this.param.tags, |
| 851 | centre_pos:this.param.centre_pos, | 854 | centre_pos:this.param.centre_pos, |
| 852 | hasSuggestion:this.data.hasSuggestion?1:'' | 855 | hasSuggestion:this.data.hasSuggestion?1:'' |
| 853 | - },'./indexList') | 856 | + },'./indexList'), |
| 857 | + success: res=> { | ||
| 858 | + // 通过eventChannel向被打开页面传送数据 | ||
| 859 | + if(this.findSellerData){ | ||
| 860 | + res.eventChannel.emit('acceptDataFromMapPage', this.findSellerData) | ||
| 861 | + } | ||
| 862 | + res.eventChannel.on('findSellerData',findSellerData=>{ | ||
| 863 | + console.log('findSellerData',findSellerData) | ||
| 864 | + this.findSellerData=findSellerData | ||
| 865 | + setTimeout(()=>{this.getMarkers();},0) | ||
| 866 | + }) | ||
| 867 | + } | ||
| 854 | }); | 868 | }); |
| 855 | }, | 869 | }, |
| 856 | setTSLocal(){ | 870 | setTSLocal(){ |
| @@ -871,4 +885,21 @@ Page({ | @@ -871,4 +885,21 @@ Page({ | ||
| 871 | } | 885 | } |
| 872 | this.setData(sdobj) | 886 | this.setData(sdobj) |
| 873 | }, | 887 | }, |
| 888 | + findSellerData:null, | ||
| 889 | + findSeller(){ | ||
| 890 | + wx.navigateTo({ | ||
| 891 | + url: './findSeller', | ||
| 892 | + success: res=> { | ||
| 893 | + // 通过eventChannel向被打开页面传送数据 | ||
| 894 | + if(this.findSellerData){ | ||
| 895 | + res.eventChannel.emit('acceptDataFromMapPage', this.findSellerData) | ||
| 896 | + } | ||
| 897 | + res.eventChannel.on('findSellerData',findSellerData=>{ | ||
| 898 | + console.log('findSellerData',findSellerData) | ||
| 899 | + this.findSellerData=findSellerData | ||
| 900 | + setTimeout(()=>{this.getMarkers();},0) | ||
| 901 | + }) | ||
| 902 | + } | ||
| 903 | + }) | ||
| 904 | + }, | ||
| 874 | }) | 905 | }) |
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | enable-scroll | 14 | enable-scroll |
| 15 | enable-rotate | 15 | enable-rotate |
| 16 | subkey="SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ" | 16 | subkey="SDEBZ-I74W4-QLGUX-XXYXU-HIR23-3QFBJ" |
| 17 | - style="width: 100%; height: {{map.height+30}}px;"></map> | 17 | + style="width: 100%; height: {{map.height+60}}px;"></map> |
| 18 | <formids url="/pages/reserve/search" style="position: fixed;"> | 18 | <formids url="/pages/reserve/search" style="position: fixed;"> |
| 19 | <cover-view | 19 | <cover-view |
| 20 | class="flex-ll" | 20 | class="flex-ll" |
| @@ -57,12 +57,10 @@ | @@ -57,12 +57,10 @@ | ||
| 57 | bindtap="tagsChange" | 57 | bindtap="tagsChange" |
| 58 | data-id="{{item.id}}">{{item.name}}</view> | 58 | data-id="{{item.id}}">{{item.name}}</view> |
| 59 | </block> | 59 | </block> |
| 60 | - <navigator url="./findSeller"> | ||
| 61 | - <view class="fingSeller flex-ll"> | ||
| 62 | - <view class="icon"></view> | ||
| 63 | - <view>查找餐厅</view> | ||
| 64 | - </view> | ||
| 65 | - </navigator> | 60 | + <view class="fingSeller flex-ll" bindtap="findSeller"> |
| 61 | + <view class="icon"></view> | ||
| 62 | + <view>查找餐厅</view> | ||
| 63 | + </view> | ||
| 66 | </view> | 64 | </view> |
| 67 | <view class="transverse-list"> | 65 | <view class="transverse-list"> |
| 68 | <swiper | 66 | <swiper |
| @@ -105,8 +103,14 @@ | @@ -105,8 +103,14 @@ | ||
| 105 | </view> | 103 | </view> |
| 106 | </view> | 104 | </view> |
| 107 | <view class="info" wx:elif="{{hasSearchLimit}}"> | 105 | <view class="info" wx:elif="{{hasSearchLimit}}"> |
| 108 | - <view class="info-msg Semibold">未找到符合要求的餐厅</view> | 106 | + <view class="info-msg Semibold" style="margin-top: 58rpx;">未找到符合要求的餐厅</view> |
| 109 | <view class="info-txt">修改或减少条件,获取更多餐厅</view> | 107 | <view class="info-txt">修改或减少条件,获取更多餐厅</view> |
| 108 | + <button class="button-none flex-lr info-button" | ||
| 109 | + style="display: flex;margin-top: 50rpx;margin-left: 0;" | ||
| 110 | + open-type="contact"> | ||
| 111 | + <view>人工帮订</view> | ||
| 112 | + <view class="info-button-gt"></view> | ||
| 113 | + </button> | ||
| 110 | </view> | 114 | </view> |
| 111 | <view class="info" wx:else="hasSearchLimit" bindtap="setTSLocal"> | 115 | <view class="info" wx:else="hasSearchLimit" bindtap="setTSLocal"> |
| 112 | <view class="info-msg Semibold">你可以切换到其他城市看看</view> | 116 | <view class="info-msg Semibold">你可以切换到其他城市看看</view> |
| @@ -192,7 +192,7 @@ page{ | @@ -192,7 +192,7 @@ page{ | ||
| 192 | margin-left: 30rpx; | 192 | margin-left: 30rpx; |
| 193 | } | 193 | } |
| 194 | .empty-txt .seller .empty .info .info-msg{ | 194 | .empty-txt .seller .empty .info .info-msg{ |
| 195 | - margin-bottom: 40rpx; | 195 | + margin-bottom: 14rpx; |
| 196 | font-size: 34rpx; | 196 | font-size: 34rpx; |
| 197 | margin-top: 78rpx; | 197 | margin-top: 78rpx; |
| 198 | height: 48rpx; | 198 | height: 48rpx; |
| @@ -209,8 +209,8 @@ page{ | @@ -209,8 +209,8 @@ page{ | ||
| 209 | padding: 0 20rpx; | 209 | padding: 0 20rpx; |
| 210 | color: #F05522; | 210 | color: #F05522; |
| 211 | font-size: 28rpx; | 211 | font-size: 28rpx; |
| 212 | - width: 146rpx; | ||
| 213 | - max-width: 146rpx; | 212 | + min-width: 146rpx; |
| 213 | + max-width: 170rpx; | ||
| 214 | box-sizing: border-box; | 214 | box-sizing: border-box; |
| 215 | } | 215 | } |
| 216 | .info-button-gt{ | 216 | .info-button-gt{ |
-
Please register or login to post a comment