Commit 0e05c2faa479a3b49805bc599388b50b4ba9af45

Authored by wangfan
1 parent 41565da4

golist

@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <view class="seller flex-ll {{sellerStyle}}" > 2 <view class="seller flex-ll {{sellerStyle}}" >
3 <view class="image"> 3 <view class="image">
4 <image mode="aspectFill" 4 <image mode="aspectFill"
5 - src="{{seller.seller_image?seller.seller_image+'?imageView2/2/w/320/interlace/0/q/100':'http://qn.colorcun.com/custom/lite-online/image/seller-def.png'}}"></image> 5 + src="{{seller.seller_image?seller.seller_image+'?imageView2/2/w/320/interlace/0/q/100':'http://qn.colorcun.com/reserve/images/%E6%9A%82%E6%97%A0%E7%85%A7%E7%89%87.png'}}"></image>
6 <view class="room_num" wx:if="{{seller.room_num>0}}">{{seller.room_num}}个包间</view> 6 <view class="room_num" wx:if="{{seller.room_num>0}}">{{seller.room_num}}个包间</view>
7 </view> 7 </view>
8 <view class="info flex-tb"> 8 <view class="info flex-tb">
@@ -114,6 +114,7 @@ Page({ @@ -114,6 +114,7 @@ Page({
114 northeast:{}, 114 northeast:{},
115 }, 115 },
116 }, 116 },
  117 + mapDataLast:null,//最后一次成功视角,防止地图视角丢失
117 onReady: function () { 118 onReady: function () {
118 this.mapCtx = wx.createMapContext('map') 119 this.mapCtx = wx.createMapContext('map')
119 // this.mapCtx.moveToLocation({ 120 // this.mapCtx.moveToLocation({
@@ -372,8 +373,19 @@ Page({ @@ -372,8 +373,19 @@ Page({
372 hasInRegionFlag:false, 373 hasInRegionFlag:false,
373 hasInRegion(){//定位是否在地图视野内 374 hasInRegion(){//定位是否在地图视野内
374 let map = this.mapData; 375 let map = this.mapData;
375 - if(!map.region.northeast.latitude || !map.region.northeast.longitude) return {flag:false,msg:'未获得视野'};//未获得视野  
376 - if(!map.region.southwest.latitude || !map.region.southwest.longitude) return {flag:false,msg:'未获得视野'};//未获得视野 376 + if(!map.region.northeast.latitude || !map.region.northeast.longitude) {//未获得视野
  377 + if(this.mapDataLast){
  378 + this.mapData=this.mapDataLast
  379 + }
  380 + return {flag:false,msg:'未获得视野',map:map,mapDataLast:this.mapDataLast};
  381 + }
  382 + if(!map.region.southwest.latitude || !map.region.southwest.longitude) {//未获得视野
  383 + if(this.mapDataLast){
  384 + this.mapData=this.mapDataLast
  385 + }
  386 + return {flag:false,msg:'未获得视野',map:map,mapDataLast:this.mapDataLast};
  387 + }
  388 + this.mapDataLast=JSON.parse(JSON.stringify(this.mapData));
377 if(this.hasInRegionFlag) return {flag:true,msg:'二次获取'}; 389 if(this.hasInRegionFlag) return {flag:true,msg:'二次获取'};
378 if(!this.user.latitude) return {flag:false,msg:'用户无定位'};//用户无定位 390 if(!this.user.latitude) return {flag:false,msg:'用户无定位'};//用户无定位
379 //if(this.user.latitude==def_latitude && this.user.longitude==def_longitude) return false;//默认位置 391 //if(this.user.latitude==def_latitude && this.user.longitude==def_longitude) return false;//默认位置
@@ -33,7 +33,9 @@ @@ -33,7 +33,9 @@
33 <view class="transverse-view"> 33 <view class="transverse-view">
34 <view class="flex-vc transverse-view-top" bindtap="listShow"> 34 <view class="flex-vc transverse-view-top" bindtap="listShow">
35 <view class="line"></view> 35 <view class="line"></view>
36 - <view class="text">{{markers.length>0?'查看其它':'已扩大范围为你找到'}}{{listMoreCount}}家餐厅</view> 36 + <view class="text">
  37 + <text wx:if="{{hasGetSellersEnd}}">{{hasSellers?'查看其它':'已扩大范围为你找到'}}{{listMoreCount}}家餐厅</text>
  38 + </view>
37 </view> 39 </view>
38 <view class="transverse-search flex-ll"> 40 <view class="transverse-search flex-ll">
39 <view 41 <view